Merge branch 'diplomatic-quarter-live' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into merge_dq_master

 Conflicts:
	lib/config/config.dart
	lib/core/service/client/base_app_client.dart
	lib/core/service/weather_service.dart
	lib/core/viewModels/dashboard_view_model.dart
	lib/main.dart
	lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart
	lib/pages/AlHabibMedicalService/health-weather/health-weather-indicator.dart
	lib/pages/BookAppointment/Search.dart
	lib/pages/ErService/AmbulanceReq.dart
	lib/pages/MyAppointments/widgets/AppointmentCardView.dart
	lib/pages/ToDoList/ToDo.dart
	lib/pages/landing/home_page.dart
	lib/pages/landing/landing_page.dart
	lib/pages/login/login.dart
	lib/pages/login/register.dart
	lib/pages/medical/allergies_page.dart
	lib/pages/medical/balance/advance_payment_page.dart
	lib/pages/medical/doctor/doctor_home_page.dart
	lib/pages/medical/medical_profile_page.dart
	lib/pages/medical/prescriptions/prescriptions_home_page.dart
	lib/pages/medical/vital_sign/vital_sign_details_screen.dart
	lib/uitl/location_util.dart
	lib/widgets/drawer/app_drawer_widget.dart
	pubspec.yaml
merge-requests/224/head
Mohammad Aljammal 5 years ago
commit 18dad434a0

1
.gitignore vendored

@ -42,3 +42,4 @@ app.*.map.json
# Exceptions to above rules.
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
health_calculators.dart

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

@ -1 +1 @@
d69545ca05f0ca200eba92121a1458fb
59a6c452ee075b50114918f17f1ad8f5

@ -48,12 +48,17 @@ const GET_PRESCRIPTION_REPORT_ENH =
///Lab Order
const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders';
const GET_Patient_LAB_SPECIAL_RESULT = 'Services/Patients.svc/REST/GetPatientLabSpecialResults';
const GET_Patient_LAB_RESULT = 'Services/Patients.svc/REST/GetPatientLabResults';
const GET_Patient_LAB_ORDERS_RESULT = 'Services/Patients.svc/REST/GetPatientLabOrdersResults';
const SEND_LAB_RESULT_EMAIL =
'Services/Notifications.svc/REST/SendLabReportEmail';
const GET_Patient_LAB_RESULT =
'Services/Patients.svc/REST/GetPatientLabResults';
const GET_Patient_LAB_ORDERS_RESULT =
'Services/Patients.svc/REST/GetPatientLabOrdersResults';
///
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';
const GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL';
@ -215,7 +220,7 @@ const UPDATE_HEALTH_TERMS = '/services/Patients.svc/REST/UpdatePateintHealthSumm
const CHANNEL = 3;
const GENERAL_ID = 'Cs2020@2016\$2958';
const IP_ADDRESS = '10.20.10.20';
const VERSION_ID = 5.6;
const VERSION_ID = 5.8;
const SETUP_ID = '91877';
const LANGUAGE = 2;
const PATIENT_OUT_SA = 0;
@ -232,6 +237,10 @@ const GET_PAtIENTS_INSURANCE = "Services/Patients.svc/REST/Get_PatientInsuranceD
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";

@ -297,7 +297,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': 'التنفس'},
@ -1157,4 +1157,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": "لايف كير"
},
};

@ -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<String, dynamic> 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<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
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;
}
}

@ -34,7 +34,7 @@ class PatientLabOrders {
String qR;
String setupID;
List<String> 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<String, dynamic> 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<String>();
}
@ -141,6 +142,7 @@ class PatientLabOrders {
data['QR'] = this.qR;
data['SetupID'] = this.setupID;
data['Speciality'] = this.speciality;
data['IsLiveCareAppointment'] = this.isLiveCareAppointment;
return data;
}
}

@ -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<String, dynamic> 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<String>();
}
@ -141,6 +143,7 @@ class Prescriptions {
data['NoOfPatientsRate'] = this.noOfPatientsRate;
data['QR'] = this.qR;
data['Speciality'] = this.speciality;
data['IsLiveCareAppointment'] = this.isLiveCareAppointment;
return data;
}
}

@ -41,6 +41,7 @@ class FinalRadiology {
List<String> 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<String, dynamic> 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<String>();
isCVI = json['isCVI'];
isRadMedicalReport = json['isRadMedicalReport'];
} catch (e) {
print(e);
}

@ -32,6 +32,7 @@ class SickLeave {
String projectName;
String qR;
List<String> 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<String, dynamic> 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<String>();
}

@ -82,8 +82,8 @@ class BaseAppClient {
body['PatientTypeID'] = body.containsKey('PatientTypeID')
? body['PatientTypeID'] != null
? body['PatientTypeID']
: user['PatientTypeID'] != null
? user['PatientTypeID']
: user['PatientType'] != null
? user['PatientType']
: PATIENT_TYPE_ID
: PATIENT_TYPE_ID;
if (user != null) {
@ -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');
@ -221,7 +227,7 @@ class BaseAppClient {
await authenticatedUserObject.getUser();
Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).isLogin =
false;
var model = Provider.of<ToDoCountProviderModel>(AppGlobal.context);
var model = Provider.of<ToDoCountProviderModel>(AppGlobal.context,listen: false);
_vitalSignService.weightKg = "";
_vitalSignService.heightCm = "";
model.setState(0, false);

@ -27,6 +27,8 @@ class HospitalService extends BaseService {
Map<String, dynamic> body = Map();
body['Latitude'] = _latitude;
body['Longitude'] = _longitude;
body['IsOnlineCheckIn'] = true;
body['PatientOutSA'] = 0;
await baseAppClient.post(GET_PROJECT,
onSuccess: (dynamic response, int statusCode) {

@ -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<InsuranceApprovalModel> get insuranceApproval => _insuranceApproval;
InsuranceCardDetailsModel insuranceCardDetails;
List<InsuranceCardDetailsModel> 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<String,dynamic> 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,);
}
}

@ -110,17 +110,17 @@ 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(GET_Patient_LAB_SPECIAL_RESULT,
await baseAppClient.post(SEND_LAB_RESULT_EMAIL,
onSuccess: (dynamic response, int statusCode) {
}, onFailure: (String error, int statusCode) {

@ -26,6 +26,10 @@ class MyBalanceService extends BaseService {
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
MyBalanceService(){
getFamilyFiles();
}
getPatientAdvanceBalanceAmount() async {
hasError = false;
super.error = "";

@ -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;

@ -77,9 +77,10 @@ class PharmacyService extends BaseService {
hasError = false;
await _getCurrentLocation();
Map<String,dynamic> 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;

@ -0,0 +1,36 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/weahter/weather_model.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
class WeatherService extends BaseService {
List<GetCityInfoList> weatherIndicatorData = List();
Map<String, dynamic> body = Map();
String Latitude = "";
String Longitude = "";
String PhoneNumber = "";
Future getWeatherData() async {
hasError = false;
var lat = await sharedPref.getDouble(USER_LAT);
var long = await sharedPref.getDouble(USER_LONG);
body['Latitude'] = lat ?? 0;
body['Longitude'] = long ?? 0;
await baseAppClient.post(WEATHER_INDICATOR,
onSuccess: (dynamic response, int statusCode) {
weatherIndicatorData = [];
response['GetCityInfo_List'].forEach((data) {
weatherIndicatorData.add(GetCityInfoList.fromJson(data));
});
print(weatherIndicatorData);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
await this.sharedPref.setObject(WEATHER, weatherIndicatorData[0]);
return Future.value(weatherIndicatorData[0]);
}
}

@ -29,6 +29,11 @@ class BaseViewModel extends ChangeNotifier {
if (hasListeners) notifyListeners();
}
setUser(AuthenticatedUser user){
this.user = user;
notifyListeners();
}
BaseViewModel() {
//authenticatedUserObject.getUser();
user = authenticatedUserObject.user;

@ -1,13 +1,21 @@
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 {
VitalSignService _vitalSignService = locator<VitalSignService>();
String get weightKg => _vitalSignService.weightKg;
String get heightCm => _vitalSignService.heightCm;
String bloadType = "";
String get weightKg => _vitalSignService.weightKg;
String get heightCm => _vitalSignService.heightCm;
String booldType = "-";
// ToDoCountProviderModel toDoProvider =
// Provider.of<ToDoCountProviderModel>(AppGlobal.context);
getPatientRadOrders() async {
if (isLogin && _vitalSignService.weightKg.isEmpty) {
@ -15,9 +23,24 @@ class DashboardViewModel extends BaseViewModel {
await _vitalSignService.getPatientRadOrders();
if (_vitalSignService.hasError) {
error = _vitalSignService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
setState(ViewState.ErrorLocal);
} else {
booldType = await sharedPref.getString(BLOOD_TYPE) ?? "-";
setState(ViewState.Idle);
}
}
}
// getToDoCount() {
// toDoProvider.setState(0);
// ClinicListService service = new ClinicListService();
// service.getActiveAppointmentNo(AppGlobal.context).then((res) {
// print(res['AppointmentActiveNumber']);
// if (res['MessageStatus'] == 1) {
// toDoProvider.setState(res['AppointmentActiveNumber']);
// } else {}
// }).catchError((err) {
// print(err);
// });
// }
}

@ -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);
}
}

@ -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);

@ -11,7 +11,15 @@ class VitalSignViewModel extends BaseViewModel {
List<VitalSignResModel> 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);
}
}
}

@ -32,6 +32,8 @@ class MyApp extends StatelessWidget {
LocalNotification.getInstance().showNow(title: "Payload", subtitle: payload, payload: payload);
});
final themeNotifier = Provider.of<ThemeNotifier>(context);
precacheImage(AssetImage('assets/images/powerd-by.jpg'), context);
return LayoutBuilder(
builder: (context, constraints) {
return OrientationBuilder(

@ -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;

@ -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<NewEReferralStepThreePage> {
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<NewEReferralStepThreePage> {
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<NewEReferralStepThreePage> {
],
),
),
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<NewEReferralStepThreePage> {
),
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<NewEReferralStepThreePage> {
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Icon(
FontAwesomeIcons.paperclip),
Icon(FontAwesomeIcons
.paperclip),
SizedBox(
width: 8,
),
@ -346,8 +358,9 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
InkWell(
onTap: () {
setState(() {
insuredPatientImages
.remove(insuredPatientImages[index]);
insuredPatientImages.remove(
insuredPatientImages[
index]);
});
},
child: Icon(
@ -378,25 +391,37 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
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<NewEReferralStepThreePage> {
);
}
String getRelationName() {
if (_selectedCity != null)
return _selectedCity.description;
else
return "Select Relationship" /*TranslationBase.of(context).selectHospital*/;
}
}

@ -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"
],
),
),

@ -1,9 +1,11 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/weather_service.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/%E2%80%8B%20health_calculators.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/e_referral_index_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/h2o_index_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health-weather/health-weather-indicator.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_converter.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/my_web_view.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/parking_page.dart';
@ -21,13 +23,16 @@ import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart';
import 'package:diplomaticquarterapp/pages/symptom-checker/info.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/location_util.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/services)contaniner.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.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:geolocator/geolocator.dart';
import 'package:url_launcher/url_launcher.dart';
class AllHabibMedicalService extends StatefulWidget {
@ -43,11 +48,18 @@ class AllHabibMedicalService extends StatefulWidget {
class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
AppSharedPreferences sharedPref = AppSharedPreferences();
AuthenticatedUser authUser = new AuthenticatedUser();
LocationUtils locationUtils;
var weather = '--';
WeatherService _weatherService = WeatherService();
@override
void initState() {
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
getAuthUser();
locationUtils =
new LocationUtils(isShowConfirmDialog: true, context: context);
WidgetsBinding.instance.addPostFrameCallback((_) => {
Geolocator.getLastKnownPosition()
.then((value) => setLocation(value))
});
});
super.initState();
}
@ -98,17 +110,41 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
],
),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Image.asset('assets/images/Weather_ico.png',width: 80,height: 80,),
Texts(
TranslationBase.of(context).moreDetails,
color: Colors.white,
decoration: TextDecoration.underline,
),
],
),
flex: 2,
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: HealthWeatherIndicator(),
),
);
},
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
'assets/images/Weather_ico.png',
width: 60,
height: 60,
),
Directionality(
textDirection: TextDirection.ltr,
child: AppText(weather,
fontSize: 22,
color: Colors.white))
],
),
Texts(
TranslationBase.of(context).moreDetails,
color: Colors.white,
decoration: TextDecoration.underline,
),
],
)),
)
],
),
@ -235,7 +271,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
onTap: () => Navigator.push(
context,
FadePage(
page: ToDo(),
page: ToDo(isShowAppBar: true),
),
),
imageLocation:
@ -313,7 +349,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
"https://hmgwebservices.com/vt_mobile/html/index.html"),
imageLocation:
'assets/images/new-design/virtual_tour_icon.png',
title: 'Virtual Tour',
title: TranslationBase.of(context).vTour,
),
ServicesContainer(
onTap: () {
@ -336,7 +372,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
),
),
imageLocation: 'assets/images/new-design/find_us_icon.png',
title: 'Find Us',
title: TranslationBase.of(context).findUs,
),
],
),
@ -353,7 +389,25 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
setState(() {
authUser = data;
});
print(authUser.patientID);
}
var data = await this.sharedPref.getObject(WEATHER);
if (data == null) {
var d = await _weatherService.getWeatherData();
print(d);
setState(() {
weather = d != null ? d.temperature.toString() + '\u2103' : '--';
});
} else {
setState(() {
weather =
data != null ? data['Temperature'].toString() + '\u2103' : '--';
});
}
}
void setLocation(Position position) {
this.sharedPref.setDouble(USER_LAT, position.latitude ?? 0.0);
this.sharedPref.setDouble(USER_LONG, position.longitude ?? 0.0);
getAuthUser();
}
}

@ -0,0 +1,140 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/weather/weather_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/location_util.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:diplomaticquarterapp/widgets/weather_slider/weather_slider.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart';
class HealthWeatherIndicator extends StatefulWidget {
@override
_HospitalsPageState createState() => _HospitalsPageState();
}
class _HospitalsPageState extends State<HealthWeatherIndicator> {
var data;
LocationUtils locationUtils;
AppSharedPreferences sharedPref = AppSharedPreferences();
var weather = '--';
@override
void initState() {
locationUtils =
new LocationUtils(isShowConfirmDialog: true, context: context);
WidgetsBinding.instance
.addPostFrameCallback((_) => locationUtils.getCurrentLocation());
getWeather();
super.initState();
}
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<WeatherViewModel>(
onModelReady: (model) => model.getWeatherData(),
allowAny: true,
builder: (_, mode, widget) => AppScaffold(
isShowDecPage: false,
appBarTitle: TranslationBase.of(context).healthWeatherIndicators,
isShowAppBar: true,
body: mode.weatherIndicatorData.length > 0
? SingleChildScrollView(
child: Column(children: [
Container(
margin: EdgeInsets.all(8),
width: double.infinity,
height: 150,
decoration: BoxDecoration(
image: DecorationImage(
image:
ExactAssetImage('assets/images/Weather_img.png'),
fit: BoxFit.cover,
),
borderRadius: BorderRadius.circular(8.0)),
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 10.0),
child: Row(
children: [
Expanded(
flex: 3,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context)
.healthWeatherIndicators,
color: Colors.white,
fontWeight: FontWeight.w600,
),
AppText(
TranslationBase.of(context)
.healthTipsBasedOnCurrentWeather,
color: Colors.white,
fontSize: 14,
),
],
)),
Expanded(
flex: 2,
child: InkWell(
onTap: () {},
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: [
Image.asset(
'assets/images/Weather_ico.png',
width: 60,
height: 60,
),
Directionality(
textDirection: TextDirection.ltr,
child: AppText(weather,
fontSize: 22,
color: Colors.white))
],
),
],
)),
)
],
),
),
),
Padding(
padding: EdgeInsets.all(15),
child: AppText(
projectViewModel.isArabic
? mode.weatherIndicatorData[0].cityNameN
: mode.weatherIndicatorData[0].cityName,
fontSize: 24,
fontWeight: FontWeight.bold,
)),
Padding(
padding: EdgeInsets.all(15),
child: Column(
children: mode.weatherIndicatorData.map((data) {
return WeatherSlider(data);
}).toList()))
]))
: Center(child: AppCircularProgressIndicator())),
);
}
getWeather() async {
var data = await this.sharedPref.getObject(WEATHER);
setState(() {
weather = data['Temperature'].toString() + '\u2103' ?? '--';
});
}
}

@ -6,9 +6,12 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/arrow_back.dart';
import 'package:diplomaticquarterapp/widgets/others/bottom_bar.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:geolocator/geolocator.dart';
import 'components/SearchByClinic.dart';
class Search extends StatefulWidget {
final int type;
final List clnicIds;
@ -31,34 +34,40 @@ class _SearchState extends State<Search> 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,
),
)
],
),
));
}
}

@ -17,6 +17,7 @@ class DoctorInformation extends StatelessWidget {
mainAxisSize: MainAxisSize.min,
children: <Widget>[
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(

@ -34,6 +34,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
List<HospitalsModel> projectsList = [];
bool isMobileAppDentalAllow = false;
bool isLoaded = false;
bool isProjectLoaded = false;
@override
void initState() {
@ -56,6 +57,11 @@ class _SearchByClinicState extends State<SearchByClinic> {
onChanged: (bool value) {
setState(() {
nearestAppo = value;
print(nearestAppo);
if (nearestAppo)
getProjectsList();
else
isProjectLoaded = false;
});
},
),
@ -121,7 +127,8 @@ class _SearchByClinicState extends State<SearchByClinic> {
},
),
)),
isDentalSelectedAndSupported() == true || nearestAppo
isDentalSelectedAndSupported() == true ||
(nearestAppo && isProjectLoaded)
? Container(
height: 60.0,
decoration: BoxDecoration(
@ -177,24 +184,30 @@ class _SearchByClinicState extends State<SearchByClinic> {
});
});
getProjectsList();
GifLoaderDialogUtils.hideDialog(context);
} else {}
}).catchError((err) {
print(err);
GifLoaderDialogUtils.hideDialog(context);
});
}
getProjectsList() {
ClinicListService service = new ClinicListService();
List<HospitalsModel> 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) {
print(err);
});
@ -235,10 +248,6 @@ class _SearchByClinicState extends State<SearchByClinic> {
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<PatientDoctorAppointmentList> doctorByHospital =
@ -269,8 +278,6 @@ class _SearchByClinicState extends State<SearchByClinic> {
result = LinkedHashSet<String>.from(arr).toList();
numAll = result.length;
// navigateToSearchResults(
// context, doctorsList, result, numAll, arrDistance);
navigateToSearchResults(
context, doctorsList, _patientDoctorAppointmentListHospital);
} else {
@ -299,6 +306,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
List<DoctorList> docList,
List<PatientDoctorAppointmentList>
patientDoctorAppointmentListHospital) async {
isProjectLoaded = false;
Navigator.push(
context,
MaterialPageRoute(
@ -313,7 +321,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
filterClinic() {
setState(() {
if (widget.clnicIds.length > 0) {
if (widget.clnicIds != null && widget.clnicIds.length > 0) {
clinicsList = clinicsList
.where((i) => widget.clnicIds.indexOf(i.clinicID) > -1)
.toList();

@ -23,9 +23,9 @@ class _LiveChatPageState extends State<LiveChatPage>
@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);
}

@ -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<MyFamily> 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<MyFamily> 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<ProjectViewModel>(context, listen: false).user =
authenticatedUserObject.user;
Provider.of<ProjectViewModel>(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) {

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
@ -24,6 +25,7 @@ class AmbulanceReq extends StatefulWidget {
class _AmbulanceReqState extends State<AmbulanceReq>
with SingleTickerProviderStateMixin {
TabController _tabController;
List<ImagesInfo> imagesInfo = List();
@override
void initState() {
@ -39,11 +41,19 @@ class _AmbulanceReqState extends State<AmbulanceReq>
@override
Widget build(BuildContext context) {
imagesInfo.add(ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/Ambulance/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/Ambulance/ar/0.png'));
return BaseView<AmRequestViewModel>(
onModelReady: (model) => model.getAmRequestOrders(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
appBarTitle: "Ambulance Request",
appBarTitle: TranslationBase.of(context).transportationService,
description: TranslationBase.of(context).infoAmbulance,
imagesInfo: imagesInfo,
baseViewModel: model,
body: Scaffold(
extendBodyBehindAppBar: true,
@ -92,8 +102,7 @@ class _AmbulanceReqState extends State<AmbulanceReq>
Container(
width: MediaQuery.of(context).size.width * 0.40,
child: Center(
child: Texts(
"Ambulance Request"), //TranslationBase.of(context).prescriptions
child: Texts(TranslationBase.of(context).transportationService),
),
),
Container(
@ -118,8 +127,8 @@ class _AmbulanceReqState extends State<AmbulanceReq>
controller: _tabController,
children: <Widget>[
AmbulanceRequestIndexPage(
amRequestViewModel: model,
),
amRequestViewModel: model,
),
OrderLogPage(
amRequestViewModel: model,
)

@ -60,14 +60,14 @@ class _MyAppointmentsState extends State<MyAppointments>
});
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();
}

@ -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,

@ -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,

@ -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,

@ -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,

@ -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,

@ -276,14 +276,15 @@ class _AppointmentActionsState extends State<AppointmentActions> {
Future<List<AppoDetailsButton>> _getBookedAppoActionsList() async {
print("_getBookedAppoActionsList");
print(BookedButtons.buttons);
BookedButtons bookedButtons = new BookedButtons();
print(bookedButtons.buttons);
List<AppoDetailsButton> 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<AppointmentActions> {
Future<List<AppoDetailsButton>> _getBookedCheckInAppoActionsList() async {
print("_getBookedCheckInAppoActionsList");
print(BookedButtonsAllowCheckIn.buttons);
BookedButtonsAllowCheckIn bookedButtonsAllowCheckIn =
new BookedButtonsAllowCheckIn();
print(bookedButtonsAllowCheckIn.buttons);
List<AppoDetailsButton> 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<AppointmentActions> {
Future<List<AppoDetailsButton>> _getConfirmedAppoActionsList() async {
print("_getConfirmedAppoActionsList");
print(ConfirmedButtons.buttons);
ConfirmedButtons confirmedButtons = new ConfirmedButtons();
print(confirmedButtons.buttons);
List<AppoDetailsButton> 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<AppointmentActions> {
Future<List<AppoDetailsButton>> _getConfirmedCheckInAppoActionsList() async {
print("_getConfirmedAllowCheckInAppoActionsList");
print(ConfirmedButtonsAllowCheckIn.buttons);
ConfirmedButtonsAllowCheckIn confirmedButtonsAllowCheckIn =
new ConfirmedButtonsAllowCheckIn();
print(confirmedButtonsAllowCheckIn.buttons);
List<AppoDetailsButton> 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<AppointmentActions> {
Future<List<AppoDetailsButton>> _getArrivedAppoActionsList() async {
print("_getArrivedAppoActionsList");
print(ArrivedButtons.buttons);
ArrivedButtons arrivedButtons = new ArrivedButtons();
print(arrivedButtons.buttons);
List<AppoDetailsButton> 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<AppointmentActions> {
Future<List<AppoDetailsButton>> _getArrivedInvoiceAppoActionsList() async {
print("_getArrivedInvoiceAppoActionsList");
print(ArrivedButtons.buttons);
ArrivedButtons arrivedButtons = new ArrivedButtons();
List<AppoDetailsButton> 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<AppointmentActions> {
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<AppointmentActions> {
context,
FadePage(
page: VitalSignDetailsScreen(
appointmentNo: appoNo, projectID: projectID)));
appointmentNo: appoNo, projectID: projectID,isNotOneAppointment: false,)));
}
navigateToInsertComplaint() {

@ -24,6 +24,17 @@ class AppointmentCard extends StatefulWidget {
}
class _ApointmentCardState extends State<AppointmentCard> {
CountdownTimerController controller;
@override
void initState() {
super.initState();
int endTime = DateTime.now().millisecondsSinceEpoch + 1000 * 30;
controller = CountdownTimerController(
endTime: endTime,
);
}
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
@ -44,103 +55,157 @@ class _ApointmentCardState extends State<AppointmentCard> {
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
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: <Widget>[
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: <Widget>[
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: <Widget>[
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: CountdownTimerController(endTime: DateTime.now().millisecondsSinceEpoch + (widget.appo.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)));
},
),
)
: 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: <Widget>[
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(),
],
),
),
),
],

@ -11,6 +11,7 @@ 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';
@ -53,6 +54,8 @@ class _ToDoState extends State<ToDo> {
List<ImagesInfo> imagesInfo = List();
ToDoCountProviderModel toDoProvider;
CountdownTimerController controller;
@override
void initState() {
widget.patientShareResponse = new PatientShareResponse();
@ -62,9 +65,11 @@ class _ToDoState extends State<ToDo> {
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);
}
@override
@ -114,11 +119,15 @@ class _ToDoState extends State<ToDo> {
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
@ -229,18 +238,26 @@ class _ToDoState extends State<ToDo> {
),
Container(
child: CountdownTimer(
controller: CountdownTimerController(endTime: DateTime.now().millisecondsSinceEpoch + (widget.appoList[index].remaniningHoursTocanPay * 1000) * 60,),
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();
},
),
),
@ -521,23 +538,11 @@ class _ToDoState extends State<ToDo> {
});
}
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(() {
@ -547,9 +552,10 @@ class _ToDoState extends State<ToDo> {
widget.appoList
.add(new AppoitmentAllHistoryResultList.fromJson(v));
});
} else {}
} else {
Navigator.of(context).popAndPushNamed(HOME);
}
});
getToDoCount();
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}

@ -218,7 +218,7 @@ class _PaymentMethodState extends State<PaymentMethod> {
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),

@ -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<SendFeedbackPage> {
),
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),

@ -17,7 +17,6 @@ class _StatusFeedbackPageState extends State<StatusFeedbackPage> {
@override
Widget build(BuildContext context) {
return BaseView<FeedbackViewModel>(
allowAny: true,
onModelReady: (model) => model.getCOC(),
builder: (_, model, widget) => AppScaffold(
baseViewModel: model,

@ -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<AttachInsuranceCardImageDialog> {
@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: <Widget>[
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,
)),
),
),
),
],
)
],
)
],
);
}
}

@ -26,14 +26,14 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
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<InsuranceViewModel>(
onModelReady: widget.appointmentNo != null
? (model) =>

@ -34,9 +34,9 @@ class _InsuranceCardState extends State<InsuranceCard> {
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<InsuranceViewModel>(
onModelReady: (model) => model.getInsurance(),
@ -44,7 +44,6 @@ class _InsuranceCardState extends State<InsuranceCard> {
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,

@ -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> 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<InsuranceViewModel>(
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: <Widget>[
Expanded(
flex: 3,
child: Container(
margin: EdgeInsets.only(
top: 2.0,
left: 10.0,
right: 20.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: <Widget>[
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);
},
),
);
}
}

@ -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<InsuranceCardService>();
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: <Widget>[
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: <Widget>[
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: <Widget>[
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: <Widget>[
Expanded(
flex: 3,
child: Container(
margin: EdgeInsets.only(
top: 2.0,
left: 10.0,
right: 20.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: <Widget>[
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: <Widget>[
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);
}
});
}
}

@ -1,8 +1,11 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/service/insurance_service.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_details.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
@ -12,6 +15,9 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart';
import 'insurance_card_update_details.dart';
import 'insurance_page.dart';
class InsuranceUpdate extends StatefulWidget {
@override
_InsuranceUpdateState createState() => _InsuranceUpdateState();
@ -20,12 +26,13 @@ class InsuranceUpdate extends StatefulWidget {
class _InsuranceUpdateState extends State<InsuranceUpdate>
with SingleTickerProviderStateMixin {
TabController _tabController;
InsuranceCardService _insuranceCardService = locator<InsuranceCardService>();
List<ImagesInfo> imagesInfo = List();
@override
void initState() {
super.initState();
_tabController = TabController(length: 2, vsync: this);
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/insurance-card/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/insurance-card/ar/0.png'));
}
void dispose() {
@ -33,14 +40,17 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
_tabController.dispose();
}
//TODO implement update card
Widget build(BuildContext context) {
return BaseView<InsuranceViewModel>(
onModelReady: (model) => model.getInsuranceUpdated(),
builder: (BuildContext context, InsuranceViewModel model, Widget child) =>
AppScaffold(
appBarTitle: TranslationBase.of(context).insurCards,
description: TranslationBase.of(context).infoInsurCards,
infoList: TranslationBase.of(context).infoPrescriptionsPoints,
imagesInfo: imagesInfo,
isShowAppBar: true,
isShowDecPage: true,
baseViewModel: model,
body: Scaffold(
extendBodyBehindAppBar: true,
@ -101,196 +111,7 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
physics: BouncingScrollPhysics(),
controller: _tabController,
children: <Widget>[
Container(
child: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.isNotEmpty
? ListView.builder(
itemCount: model.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList.length,
itemBuilder: (BuildContext context, int index) {
return 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: <Widget>[
Expanded(
flex: 3,
child: Container(
margin: EdgeInsets.only(
top: 2.0,
left: 10.0,
right: 20.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: <Widget>[
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,
)
],
),
),
),
if (false)
Expanded(
flex: 2,
child: Container(
margin:
EdgeInsets.only(top: 2.0),
child: Column(
children: <Widget>[
Container(
child: SecondaryButton(
label: TranslationBase
.of(context)
.fetchData,
small: true,
textColor:
Colors.white,
onTap: () {
getDetails(
model);
},
),
),
],
),
),
)
],
),
),
),
)
: Container();
})
: Container(
height: 80,
margin: EdgeInsets.all(10.0),
child: Column(
children: [
SizedBox(height: 65,),
Container(
color: Colors.white,
width: MediaQuery.of(context).size.width,
padding: EdgeInsets.all(10.0),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Expanded(
flex: 3,
child: Container(
margin: EdgeInsets.only(
top: 2.0,
left: 10.0,
right: 20.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: <Widget>[
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,
)
],
),
),
),
if (false)
Expanded(
flex: 2,
child: Container(
margin:
EdgeInsets.only(top: 2.0),
child: Column(
children: <Widget>[
Container(
child: SecondaryButton(
label: TranslationBase
.of(context)
.fetchData,
small: true,
textColor:
Colors.white,
onTap: () {
getDetails(
model);
},
),
),
],
),
),
)
],
),
),
],
),
),
),
InsurancePage(model:model),
Container(
child: ListView.builder(
itemCount: model.insuranceUpdate == null
@ -407,12 +228,5 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
);
}
getDetails(data) {
GifLoaderDialogUtils.showMyDialog(context);
_insuranceCardService.getInsuranceDetails(data).then((value) => {
GifLoaderDialogUtils.hideDialog(context),
Navigator.push(context,
FadePage(page: InsuranceCardDetails(data: value[0]['CheckList'])))
});
}
}

@ -47,7 +47,6 @@ class HomePage extends StatefulWidget {
class _HomePageState extends State<HomePage> {
ToDoCountProviderModel toDoProvider;
AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
@ -160,6 +159,7 @@ class _HomePageState extends State<HomePage> {
)
],
),
),
Container(width: double.infinity, height: 80)
],
@ -645,7 +645,8 @@ class _HomePageState extends State<HomePage> {
opacity: 0.5,
color: Colors.grey[700],
width: MediaQuery.of(context).size.width * 0.45,
onTap: () => Navigator.push(context, FadePage(page: AllHabibMedicalService())),
onTap: () => Navigator.push(context, FadePage(page: AllHabibMedicalService(
))),
),
DashboardItem(
onTap: () {
@ -674,7 +675,7 @@ class _HomePageState extends State<HomePage> {
child: Container(),
),
Texts(
TranslationBase.of(context).viewMore,
TranslationBase.of(context).viewAll,
color: Colors.white,
fontWeight: FontWeight.normal,
)
@ -707,7 +708,19 @@ class _HomePageState extends State<HomePage> {
}
class DashboardItem extends StatelessWidget {
const DashboardItem({this.hasBorder = false, this.imageName, @required this.child, this.onTap, Key key, this.width, this.height, this.color, this.opacity = 0.4, this.hasColorFilter = true})
const DashboardItem(
{this.hasBorder = false,
this.imageName,
@required this.child,
this.onTap,
Key key,
this.width,
this.height,
this.color,
this.opacity = 1.0,
this.icon,
this.hasColorFilter = true,
this.margin = 0})
: super(key: key);
final bool hasBorder;
final String imageName;
@ -717,8 +730,9 @@ class DashboardItem extends StatelessWidget {
final double height;
final Color color;
final double opacity;
final double margin;
final Widget icon;
final bool hasColorFilter;
@override
Widget build(BuildContext context) {
return InkWell(
@ -744,8 +758,9 @@ class DashboardItem extends StatelessWidget {
fit: BoxFit.cover,
colorFilter: hasColorFilter ? new ColorFilter.mode(Colors.black.withOpacity(0.2), BlendMode.dstIn) : null,
)
: null,
: icon,
),
margin: EdgeInsets.all(margin),
child: Center(
child: child,
),

@ -17,6 +17,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/uitl/CalendarUtils.dart';
import 'package:diplomaticquarterapp/uitl/HMGNetworkConnectivity.dart';
@ -36,7 +38,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import '../../locator.dart';
import '../../routes.dart';
import 'home_page.dart';
@ -57,6 +59,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
PageController pageController;
ProjectViewModel projectViewModel;
var notificationCount = '';
var themeNotifier;
///inject the user data
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
@ -64,9 +67,12 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
final FirebaseMessaging _firebaseMessaging = FirebaseMessaging();
final authService = new AuthProvider();
var event = RobotProvider();
var familyFileProvider = family.FamilyFilesProvider();
void _requestIOSPermissions() {
flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation<IOSFlutterLocalNotificationsPlugin>()?.requestPermissions(
flutterLocalNotificationsPlugin
.resolvePlatformSpecificImplementation<
IOSFlutterLocalNotificationsPlugin>()
?.requestPermissions(
alert: true,
badge: true,
sound: true,
@ -74,7 +80,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
}
bool isPageNavigated = false;
LocationUtils locationUtils;
_changeCurrentTab(int tab) {
setState(() {
currentTab = tab;
@ -101,7 +107,12 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
if (LandingPage.isOpenCallPage) {
if (!isPageNavigated) {
isPageNavigated = true;
Navigator.push(context, MaterialPageRoute(builder: (context) => IncomingCall(incomingCallData: LandingPage.incomingCallData))).then((value) {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => IncomingCall(
incomingCallData: LandingPage.incomingCallData)))
.then((value) {
isPageNavigated = false;
});
}
@ -127,7 +138,6 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
@override
void initState() {
super.initState();
WidgetsBinding.instance.addObserver(this);
//setState(() {
AppGlobal.context = context;
@ -164,7 +174,8 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
if (results[Permission.accessMediaLocation].isGranted) ;
if (results[Permission.calendar].isGranted) ;
});
requestPermissions();
// });
//
// //_firebase Background message handler
// _firebaseMessaging.configure(
@ -285,7 +296,12 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
showDialogs(String message) {
ConfirmDialog dialog = new ConfirmDialog(
context: context, confirmMessage: message, okText: TranslationBase.of(context).confirm, cancelText: TranslationBase.of(context).cancel_nocaps, okFunction: () => {}, cancelFunction: () => {});
context: context,
confirmMessage: message,
okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () => {},
cancelFunction: () => {});
dialog.showAlertDialog(context);
}
@ -321,7 +337,10 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
),
title: Text(
getText(currentTab).toUpperCase(),
style: TextStyle(fontWeight: FontWeight.bold, color: Colors.white, fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans'),
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.white,
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans'),
// bold: true,
// color: Colors.white,
),
@ -376,9 +395,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
SETTINGS,
);
else
Navigator.of(context).pushNamed(
WELCOME_LOGIN,
);
login();
}, //do something,
)
],
@ -398,7 +415,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
MedicalProfilePage(),
BookingOptions(),
MyFamily(isAppbarVisible: false),
ToDo(),
ToDo(isShowAppBar: false),
], // Please do not remove the BookingOptions from this array
),
bottomNavigationBar: BottomNavBar(
@ -451,6 +468,55 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
});
}
}
setTheme() async {
//
// defaultTheme =
// ThemeData(
// fontFamily:projectViewModel.isArabic ? 'Cairo' : 'WorkSans',
// primarySwatch: Colors.blue,
// visualDensity: VisualDensity.adaptivePlatformDensity,
// brightness: Brightness.light,
// pageTransitionsTheme: const PageTransitionsTheme(
// builders: {
// TargetPlatform.android: ZoomPageTransitionsBuilder(),
// TargetPlatform.iOS: CupertinoPageTransitionsBuilder(),
// },
// ),
// hintColor: Colors.grey[400],
// disabledColor: Colors.grey[300],
// errorColor: Color.fromRGBO(235, 80, 60, 1.0),
// scaffoldBackgroundColor: Color(0xffEEEEEE),
// textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5),
// textSelectionHandleColor: Colors.grey,
// canvasColor: Colors.white,
// backgroundColor: Colors.white,
// highlightColor: Colors.grey[100].withOpacity(0.4),
// splashColor: Colors.transparent,
// primaryColor: Color(0xff40ACC9),
// bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xffE0E0E0)),
// cursorColor: Colors.grey,
// cardColor: Colors.white,
// iconTheme: IconThemeData(),
// appBarTheme: AppBarTheme(
// color: Color(0xff40ACC9),
// brightness: Brightness.dark,
// elevation: 10.0,
// actionsIconTheme: IconThemeData(
// color: Color(0xff40ACC9),
// ),
// ),
// );
// themeNotifier.setTheme(defaultTheme);
}
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<dynamic> myBackgroundMessageHandler(Map<String, dynamic> message) async {
@ -482,26 +548,78 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
_changeCurrentTab(2);
}
}
registerGeofences() async {
await locator<GeofencingServices>().getAllGeoZones(GeoZonesRequestModel());
registerGeofences() async {
await locator<GeofencingServices>().getAllGeoZones(GeoZonesRequestModel());
void doIt() {
getUserInformation().then((value) {
if (value != null) projectViewModel.platformBridge().registerHmgGeofences();
});
}
void doIt() {
getUserInformation().then((value) {
if (value != null) projectViewModel.platformBridge().registerHmgGeofences();
});
}
if (await Permission.location.isGranted) {
doIt();
} else {
[Permission.location].request().then((value) async {
if (await Permission.location.isGranted) {
doIt();
}
});
}
if (await Permission.location.isGranted) {
doIt();
requestPermissions().then((results) {});
}
login() async {
var data = await sharedPref.getObject(IMEI_USER_DATA);
sharedPref.remove(REGISTER_DATA_FOR_LOGIIN);
if (data != null) {
Navigator.of(context).pushNamed(CONFIRM_LOGIN);
} else {
[Permission.location].request().then((value) async {
if (await Permission.location.isGranted) {
doIt();
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,
);
});
}
}
requestPermissions().then((results) {});
getNotificationCount(token) async {
if (await sharedPref.getObject(USER_PROFILE) != null) {
var data =
AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
if (data != null) {
authService
.registeredAuthenticatedUser(data, token, 0, 0)
.then((res) => {print(res)});
authService.getDashboard().then((value) => {
setState(() {
notificationCount = value['List_PatientDashboard'][0]
['UnreadPatientNotificationCount'] >
99
? '99+'
: value['List_PatientDashboard'][0]
['UnreadPatientNotificationCount']
.toString();
sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
})
});
familyFileProvider.getSharedRecordByStatus();
}
}
}
}

@ -103,127 +103,132 @@ class _ConfirmLogin extends State<ConfirmLogin> {
width: SizeConfig.realScreenWidth,
child: Column(
children: <Widget>[
Expanded(
flex: 3,
child: user != null && isMoreOption == false
? Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
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: <Widget>[
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: <Widget>[
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: <Widget>[
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: <Widget>[
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: <Widget>[
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: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
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: <Widget>[
onlySMSBox == false
? Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Expanded(child: getButton(3)),
Expanded(child: getButton(2))
],
)
: SizedBox(),
Row(
? Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
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: <Widget>[
onlySMSBox == false
? Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Expanded(child: getButton(3)),
Expanded(child: getButton(2))
],
)
: SizedBox(),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Expanded(child: getButton(1)),
Expanded(child: getButton(4))
],
),
]),
Expanded(
flex: 1,
child: Column(
@ -360,8 +365,11 @@ class _ConfirmLogin extends State<ConfirmLogin> {
context,
type,
this.mobileNumber,
(value) => {this.checkActivationCode(value: value)},
(value) {
this.checkActivationCode(value: value);
},
() => {
Navigator.pop(context),
print('Faild..'),
},
).displayDialog(context);
@ -537,6 +545,9 @@ class _ConfirmLogin extends State<ConfirmLogin> {
.catchError((err) {
print(err);
GifLoaderDialogUtils.hideDialog(context);
Future.delayed(Duration(seconds: 1), () {
AppToast.showErrorToast(message: err);
});
});
}
@ -570,10 +581,14 @@ class _ConfirmLogin extends State<ConfirmLogin> {
});
}
goToHome() {
goToHome() async {
await authenticatedUserObject.getUser(getUser: true);
authenticatedUserObject.isLogin = true;
appointmentRateViewModel.isLogin = true;
projectViewModel.isLogin = true;
projectViewModel.user = authenticatedUserObject.user;
Provider.of<ProjectViewModel>(context, listen: false)
.setUser(authenticatedUserObject.user);
getToDoCount();
appointmentRateViewModel
.getIsLastAppointmentRatedList()
@ -618,10 +633,11 @@ class _ConfirmLogin extends State<ConfirmLogin> {
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: <Widget>[
Image.asset(
@ -644,10 +660,11 @@ class _ConfirmLogin extends State<ConfirmLogin> {
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: <Widget>[
@ -656,12 +673,19 @@ class _ConfirmLogin extends State<ConfirmLogin> {
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,
)
],
),
@ -671,13 +695,14 @@ class _ConfirmLogin extends State<ConfirmLogin> {
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: <Widget>[
Image.asset(
@ -700,13 +725,14 @@ class _ConfirmLogin extends State<ConfirmLogin> {
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: <Widget>[
@ -735,13 +761,14 @@ class _ConfirmLogin extends State<ConfirmLogin> {
})
},
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: <Widget>[
Image.asset(
@ -749,9 +776,13 @@ class _ConfirmLogin extends State<ConfirmLogin> {
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,

@ -97,6 +97,7 @@ class _Login extends State<Login> {
textDirection: TextDirection.ltr,
child: Container(
child: TextFields(
keyboardType: TextInputType.number,
fontWeight: FontWeight.normal,
controller: nationalIDorFile,
onChanged: (value) => {validateForm()},
@ -123,7 +124,9 @@ class _Login extends State<Login> {
color: Colors.grey,
height: 2,
),
SizedBox(height: 10,),
SizedBox(
height: 10,
),
Row(
children: <Widget>[
Expanded(
@ -236,9 +239,9 @@ class _Login extends State<Login> {
request['PatientID'] = int.parse(nationalIDorFile.text);
}
// request.isRegister = false;
this.authService.checkActivationCode(request, code).then((result) async{
sharedPref.remove(FAMILY_FILE);
// Register GeoZones after login
this.authService.checkActivationCode(request, code).then((result) async {
sharedPref.remove(FAMILY_FILE);
// Register GeoZones after login
registerGeoZones();
result = CheckActivationCode.fromJson(result);

@ -72,112 +72,113 @@ class _Register extends State<Register> {
onNumberChange: (value) =>
{mobileNo = value, validateForm()},
onCountryChange: (value) => countryCode = value),
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(
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: <Widget>[
Expanded(
child: Row(
children: <Widget>[
Expanded(
child: Row(
children: <Widget>[
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: <Widget>[
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: <Widget>[
Radio(
value: 0,
groupValue: isHijri,
onChanged: (value) {
setState(() {
isHijri = value;
});
validateForm();
},
),
Text(TranslationBase.of(context).gregorianDate),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Container(
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
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: <Widget>[
Divider(
color: Colors.grey,
height: 2,
),
SizedBox(
height: 10,
),
Row(
children: <Widget>[
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: <Widget>[
Divider(
color: Colors.grey,
height: 2,
),
SizedBox(height: 10,),
Row(
children: <Widget>[
Expanded(
child: DefaultButton(
TranslationBase.of(context).registerNow,
() => {startRegistration()},
textColor: Colors.white,
color: isButtonDisabled == true
? Colors.grey
: Colors.grey[900]))
],
),
],
))
]),
)));
],
))
]),
)));
}
Future<Null> _selectDate(BuildContext context) async {
@ -215,7 +216,8 @@ class _Register extends State<Register> {
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,
@ -223,15 +225,13 @@ class _Register extends State<Register> {
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);
});
}
@ -256,7 +256,7 @@ class _Register extends State<Register> {
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'],
@ -298,7 +298,7 @@ class _Register extends State<Register> {
// DOB: this.dateOption === '1' ? this.dateOfBirth : moment(this.dateOfBirth).format('DD/MM/YYYY'),
// IsHijri: Number(this.dateOption)
// }
showLoader(true);
GifLoaderDialogUtils.showMyDialog(context);
var request = CheckUserStatusRequest();
request.patientIdentificationID = nationalIDorFile.text;
request.dOB = isHijri == 1
@ -307,7 +307,7 @@ class _Register extends State<Register> {
request.isHijri = isHijri;
request.patientOutSA = countryCode == '966' ? 0 : 1;
this.authService.checkUserStatus(request).then((result) => {
showLoader(false),
GifLoaderDialogUtils.hideDialog(context),
if (result is Map)
{
result = CheckUserStatusResponse.fromJson(result),

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/AllergiesViewModel.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -7,8 +8,10 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class AllergiesPage extends StatelessWidget {
List<ImagesInfo> imagesInfo = List();
@override
Widget build(BuildContext context) {
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<AllergiesViewModel>(
onModelReady: (model) => model.getAllergies(),
builder: (_, model, w) => AppScaffold(
@ -16,6 +19,7 @@ class AllergiesPage extends StatelessWidget {
appBarTitle: TranslationBase.of(context).allergies,
baseViewModel: model,
description: TranslationBase.of(context).infoAllergies,
imagesInfo: imagesInfo,
body: ListView.builder(
itemCount: model.allergies.length,
itemBuilder: (context, index) => Container(

@ -29,7 +29,6 @@ import 'new_text_Field.dart';
enum BeneficiaryType { MyAccount, MyFamilyFiles, OtherAccount, NON }
class AdvancePaymentPage extends StatefulWidget {
@override
_AdvancePaymentPageState createState() => _AdvancePaymentPageState();
@ -50,10 +49,17 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
AppSharedPreferences sharedPref = AppSharedPreferences();
AuthenticatedUser authUser;
List<ImagesInfo> imagesInfo = List();
@override
void initState() {
super.initState();
getAuthUser();
imagesInfo.add(ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileAppDq/images-info-home/advance-payment/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileAppDq/images-info-home/advance-payment/ar/0.png'));
}
@override
@ -62,7 +68,9 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
onModelReady: (model) => model.getHospitals(),
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
imagesInfo: imagesInfo,
appBarTitle: TranslationBase.of(context).advancePayment,
description: TranslationBase.of(context).infoAdvancePayment,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(
@ -102,13 +110,13 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
if (beneficiaryType == BeneficiaryType.MyFamilyFiles)
InkWell(
onTap: () {
GifLoaderDialogUtils.showMyDialog(context);
model.getFamilyFiles().then((value) {
GifLoaderDialogUtils.hideDialog(context);
confirmSelectFamilyDialog(model
.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList);
}).showProgressBar(
text: "Loading",
backgroundColor: Colors.blue.withOpacity(0.6));
});
},
child: Container(
padding: EdgeInsets.all(12),
@ -140,17 +148,16 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
if (beneficiaryType == BeneficiaryType.OtherAccount)
InkWell(
onTap: () {
if (_fileTextController.text.isNotEmpty)
if (_fileTextController.text.isNotEmpty) {
GifLoaderDialogUtils.showMyDialog(context);
model
.getPatientInfoByPatientID(
id: _fileTextController.text)
.then((value) {
GifLoaderDialogUtils.hideDialog(context);
confirmSelectPatientDialog(model.patientInfoList);
}).showProgressBar(
text: "Loading",
backgroundColor:
Colors.blue.withOpacity(0.6));
else
});
} else
AppToast.showErrorToast(
message: 'Please Enter The File Number');
},
@ -206,6 +213,7 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
SizedBox(
height: 12,
),
if(model.user!=null)
NewTextFields(
hintText: TranslationBase.of(context).depositorEmail,
initialValue: model.user.emailAddress,
@ -228,7 +236,7 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
),
),
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(
@ -238,13 +246,36 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
_fileTextController.text.isEmpty ||
_selectedHospital == null,
onTap: () {
var mobileNum;
var patientName;
if (beneficiaryType == BeneficiaryType.MyFamilyFiles) {
mobileNum = selectedPatientFamily.mobileNumber;
patientName = selectedPatientFamily.patientName;
}
if (beneficiaryType == BeneficiaryType.MyAccount) {
mobileNum = model.user.mobileNumber;
patientName = model.user.firstName;
}
if (beneficiaryType == BeneficiaryType.OtherAccount) {
mobileNum = _selectedPatientInfo.mobileNumber;
patientName = _selectedPatientInfo.fullName;
}
advanceModel.fileNumber = _fileTextController.text;
advanceModel.hospitalsModel = _selectedHospital;
advanceModel.note = _notesTextController.text;
advanceModel.email = email ?? model.user.emailAddress;
advanceModel.amount = amount;
model.getPatientInfoByPatientIDAndMobileNumber().then((value) {
advanceModel.mobileNumber = mobileNum;
advanceModel.patientName = patientName;
GifLoaderDialogUtils.showMyDialog(context);
model
.getPatientInfoByPatientIDAndMobileNumber(advanceModel)
.then((value) {
GifLoaderDialogUtils.hideDialog(context);
if (model.state != ViewState.Error &&
model.state != ViewState.ErrorLocal) {
Utils.hideKeyboard(context);
@ -268,9 +299,7 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
},
);
}
}).showProgressBar(
text: "Loading",
backgroundColor: Colors.blue.withOpacity(0.6));
});
},
),
)),
@ -331,22 +360,22 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
void confirmSelectFamilyDialog(
List<GetAllSharedRecordsByStatusList> getAllSharedRecordsByStatusList) {
if(getAllSharedRecordsByStatusList.isNotEmpty)
showDialog(
context: context,
child: SelectPatientFamilyDialog(
getAllSharedRecordsByStatusList: getAllSharedRecordsByStatusList,
selectedPatientFamily: selectedPatientFamily,
onValueSelected: (value) {
setState(() {
selectedPatientFamily = value;
_fileTextController.text =
selectedPatientFamily.patientID.toString();
advanceModel.depositorName = value.patientName;
});
},
),
);
if (getAllSharedRecordsByStatusList.isNotEmpty)
showDialog(
context: context,
child: SelectPatientFamilyDialog(
getAllSharedRecordsByStatusList: getAllSharedRecordsByStatusList,
selectedPatientFamily: selectedPatientFamily,
onValueSelected: (value) {
setState(() {
selectedPatientFamily = value;
_fileTextController.text =
selectedPatientFamily.responseID.toString();
advanceModel.depositorName = value.patientName;
});
},
),
);
}
String getBeneficiaryType() {

@ -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: () {

@ -175,7 +175,7 @@ class _ConfirmSMSDialogState extends State<ConfirmSMSDialog> {
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<ConfirmSMSDialog> {
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<ConfirmSMSDialog> {
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<ConfirmSMSDialog> {
child: TextFormField(
focusNode: focusD4,
controller: digit4,
maxLength: 1,
// maxLength: 1,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: SizeConfig.textMultiplier * 3,

@ -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<MyBalanceViewModel>(
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(

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/core/enum/filter_type.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/my_doctor_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart';
@ -15,8 +16,11 @@ import 'package:flutter/material.dart';
import 'doctor_profile_page.dart';
class DoctorHomePage extends StatelessWidget {
List<ImagesInfo> imagesInfo = List();
@override
Widget build(BuildContext context) {
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<MyDoctorViewModel>(
onModelReady: (model) => model.getMyDoctor(),
builder: (context, MyDoctorViewModel model, widget) => AppScaffold(
@ -25,6 +29,7 @@ class DoctorHomePage extends StatelessWidget {
appBarTitle: TranslationBase.of(context).myDoctor,
description: TranslationBase.of(context).infoMyDoctor,
infoList: TranslationBase.of(context).infoMyDoctorPoints,
imagesInfo: imagesInfo,
body: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: FractionallySizedBox(

@ -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<LabsViewModel>(
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(),

@ -7,6 +7,9 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
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/reports/monthly_reports.dart';
import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/smart_watch_instructions.dart';
@ -15,6 +18,7 @@ import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_h
import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.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';
@ -224,6 +228,8 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(context,
FadePage(page: VitalSignDetailsScreen()));
Navigator.push(
context,
FadePage(
@ -232,6 +238,11 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
);
},
child: MedicalProfileItem(
title: TranslationBase.of(context)
.vitalSigns,
imagePath: 'vital_sign_icon.png',
subTitle: TranslationBase.of(context)
.vitalSignsSubtitle,
title: TranslationBase.of(context).myDoctor,
imagePath: 'doctor_icon.png',
subTitle: TranslationBase.of(context).myDoctorSubtitle,

@ -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<PatientSickLeavePage> {
List<ImagesInfo> 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<PatientSickLeaveViewMode>(
onModelReady: (model) => model.getSickLeave(),
builder: (_, model, w) => AppScaffold(
@ -39,22 +45,15 @@ class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
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);
},
),
),

@ -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: <Widget>[

@ -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,)
],
),
),

@ -1,5 +1,6 @@
import 'dart:ui';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_history_page.dart';
@ -18,11 +19,14 @@ class HomePrescriptionsPage extends StatefulWidget {
class _HomePrescriptionsPageState extends State<HomePrescriptionsPage>
with SingleTickerProviderStateMixin {
TabController _tabController;
List<ImagesInfo> imagesInfo = List();
@override
void initState() {
super.initState();
_tabController = TabController(length: 2, vsync: this);
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/my-prescriptions/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/my-prescriptions/ar/0.png'));
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/my-prescriptions/en/1.png',imageAr: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/my-prescriptions/ar/1.png'));
}
@override
@ -40,6 +44,7 @@ class _HomePrescriptionsPageState extends State<HomePrescriptionsPage>
appBarTitle: TranslationBase.of(context).prescriptions,
description: TranslationBase.of(context).infoPrescriptions,
infoList: TranslationBase.of(context).infoPrescriptionsPoints,
imagesInfo: imagesInfo,
body: Scaffold(
extendBodyBehindAppBar: true,
appBar: PreferredSize(

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/core/enum/filter_type.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_items_page.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -9,6 +10,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class PrescriptionsPage extends StatelessWidget {
final PrescriptionsViewModel prescriptionsViewModel;
@ -18,6 +20,7 @@ class PrescriptionsPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
baseViewModel: prescriptionsViewModel,
body: FractionallySizedBox(
@ -88,9 +91,9 @@ class PrescriptionsPage extends StatelessWidget {
profileUrl: prescriptions.doctorImageURL,
rat: prescriptions.actualDoctorRate.toDouble(),
subName: prescriptions.name,
isInOutPatient: prescriptions.isInOutPatient,
date: DateUtil.getMonthDayYearDateFormatted(
prescriptions.dischargeDate),
isInOutPatient: prescriptions.isInOutPatient,
isLiveCareAppointment: prescriptions.isLiveCareAppointment,
date:projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr( DateUtil.convertStringToDate(prescriptions.appointmentDate) ):DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(prescriptions.appointmentDate)),
),
);
}).toList(),

@ -54,8 +54,8 @@ class RadiologyDetailsPage extends StatelessWidget {
bottomSheet: Container(
width: double.infinity,
height: finalRadiology.dIAPACSURL != ""
? MediaQuery.of(context).size.height * 0.2
: MediaQuery.of(context).size.height * 0.15,
? MediaQuery.of(context).size.height * 0.25
: MediaQuery.of(context).size.height * 0.14,
color: Colors.grey[100],
child: Column(
mainAxisSize: MainAxisSize.min,

@ -19,8 +19,8 @@ class RadiologyHomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-radiology/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-radiology/ar/0.png'));
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-radiology/en/1.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-radiology/ar/1.png'));
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/my-radiology/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/my-radiology/ar/0.png'));
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/my-radiology/en/1.png',imageAr: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/my-radiology/ar/1.png'));
return BaseView<RadiologyViewModel>(
onModelReady: (model) => model.getPatientRadOrders(),
builder: (_, model, widget) => AppScaffold(
@ -94,6 +94,7 @@ class RadiologyHomePage extends StatelessWidget {
),
child: DoctorCard(
isInOutPatient: radiology.isInOutPatient,
isLiveCareAppointment: radiology.isLiveCareAppointment,
name: radiology.doctorName,
profileUrl: radiology.doctorImageURL,
billNo: '${radiology.invoiceNo}',

@ -39,24 +39,25 @@ class _HomeReportPageState extends State<HomeReportPage>
Widget build(BuildContext context) {
imagesInfo.add(ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/imges-info/medical-reorts/en/0.png',
'https://hmgwebservices.com/Images/MobileAppDq/imges-info/medical-reorts/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/imges-info/medical-reorts/ar/0.png'));
'https://hmgwebservices.com/Images/MobileAppDq/imges-info/medical-reorts/ar/0.png'));
imagesInfo.add(ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/imges-info/medical-reorts/en/1.png',
'https://hmgwebservices.com/Images/MobileAppDq/imges-info/medical-reorts/en/1.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/imges-info/medical-reorts/ar/1.png'));
'https://hmgwebservices.com/Images/MobileAppDq/imges-info/medical-reorts/ar/1.png'));
imagesInfo.add(ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/imges-info/medical-reorts/en/2.png',
'https://hmgwebservices.com/Images/MobileAppDq/imges-info/medical-reorts/en/2.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/imges-info/medical-reorts/ar/2.png'));
'https://hmgwebservices.com/Images/MobileAppDq/imges-info/medical-reorts/ar/2.png'));
return BaseView<ReportsViewModel>(
onModelReady: (model) => model.getReports(), //model.getPrescriptions(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).newMedReport,
title: TranslationBase.of(context).medReport,
description: TranslationBase.of(context).infoMonthReport,
baseViewModel: model,
imagesInfo: imagesInfo,
@ -105,13 +106,13 @@ class _HomeReportPageState extends State<HomeReportPage>
Container(
width: MediaQuery.of(context).size.width * 0.15,
child: Center(
child: Texts(TranslationBase.of(context).requested,fontSize: 12,),
child: Texts(TranslationBase.of(context).requested,fontSize: 11,),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.15,
child: Center(
child: Texts(TranslationBase.of(context).ready,fontSize: 12,),
child: Texts(TranslationBase.of(context).ready,fontSize: 11,),
),
),
Container(
@ -125,7 +126,7 @@ class _HomeReportPageState extends State<HomeReportPage>
width: MediaQuery.of(context).size.width * 0.15,
child: Center(
child:
Texts(TranslationBase.of(context).cancelled,fontSize: 12,),
Texts(TranslationBase.of(context).cancelled,fontSize: 11,),
),
),
],
@ -138,6 +139,7 @@ class _HomeReportPageState extends State<HomeReportPage>
),
body: Column(
children: <Widget>[
if(model.user!=null)
Expanded(
child: TabBarView(
physics: BouncingScrollPhysics(),

@ -35,11 +35,11 @@ class LineChartCurved extends StatelessWidget {
title,
style: TextStyle(
color: Colors.black,
fontSize: 32,
fontWeight: FontWeight.bold,
fontSize: 15,
letterSpacing: 2),
textAlign: TextAlign.center,
),
SizedBox(height: 10,),
Expanded(
child: Padding(
padding: const EdgeInsets.only(right: 18.0, left: 16.0),

@ -0,0 +1,257 @@
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:fl_chart/fl_chart.dart';
import 'package:flutter/material.dart';
class LineChartCurvedBloodPressure extends StatelessWidget {
final String title;
final List<TimeSeriesSales2> timeSeries1;
final List<TimeSeriesSales2> timeSeries2;
final int indexes;
LineChartCurvedBloodPressure(
{this.title, this.timeSeries1, this.indexes, this.timeSeries2});
List<int> xAxixs = List();
List<double> yAxixs = List();
@override
Widget build(BuildContext context) {
getXaxix();
return AspectRatio(
aspectRatio: 1.1,
child: Container(
decoration: const BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(18)),
// color: Colors.white,
),
child: Stack(
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
const SizedBox(
height: 15,
),
Text(
title,
style: TextStyle(
color: Colors.black, fontSize: 15, letterSpacing: 2),
textAlign: TextAlign.center,
),
SizedBox(
height: 10,
),
Expanded(
child: Padding(
padding:
const EdgeInsets.only(right: 18.0, left: 16.0, top: 15),
child: LineChart(
sampleData1(context),
swapAnimationDuration: const Duration(milliseconds: 250),
),
),
),
SizedBox(
height: 10,
),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Row(
children: [
Container(
width: 20,
height: 20,
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Theme.of(context).primaryColor),
),
SizedBox(width: 5,),
Texts(TranslationBase.of(context).systolicLng)
],
),
SizedBox(width: 15,),
Row(
children: [
Container(
width: 20,
height: 20,
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Colors.grey),
),
SizedBox(width: 5,),
Texts(TranslationBase.of(context).diastolicLng)
],
),
],
)
],
),
],
),
),
);
}
getXaxix() {
for (int index = 0; index < timeSeries1.length; index++) {
int mIndex = indexes * index;
if (mIndex < timeSeries1.length) {
xAxixs.add(mIndex);
}
}
}
LineChartData sampleData1(context) {
return LineChartData(
lineTouchData: LineTouchData(
touchTooltipData: LineTouchTooltipData(
tooltipBgColor: Colors.white,
),
touchCallback: (LineTouchResponse touchResponse) {},
handleBuiltInTouches: true,
),
gridData: FlGridData(
show: true, drawVerticalLine: true, drawHorizontalLine: true),
titlesData: FlTitlesData(
bottomTitles: SideTitles(
showTitles: true,
getTextStyles: (value) => const TextStyle(
color: Colors.black,
fontSize: 10,
),
rotateAngle: -65,
//rotateAngle:-65,
margin: 22,
getTitles: (value) {
if (timeSeries1.length < 15) {
if (timeSeries1.length > value.toInt()) {
return '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}';
} else
return '';
} else {
if (value.toInt() == 0)
return '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}';
if (value.toInt() == timeSeries1.length - 1)
return '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}';
if (xAxixs.contains(value.toInt())) {
return '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}';
}
}
return '';
},
),
leftTitles: SideTitles(
showTitles: true,
getTextStyles: (value) => const TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 10,
),
getTitles: (value) {
return '${value.toInt()}';
},
margin: 12,
),
),
borderData: FlBorderData(
show: true,
border: const Border(
bottom: BorderSide(
color: Colors.black,
width: 0.5,
),
left: BorderSide(
color: Colors.black,
),
right: BorderSide(
color: Colors.black,
),
top: BorderSide(
color: Colors.transparent,
),
),
),
minX: 0,
maxX: (timeSeries1.length - 1).toDouble(),
maxY: getMaxY() + 0.3,
minY: getMinY(),
lineBarsData: getData(context),
);
}
double getMaxY() {
double max = 0;
timeSeries1.forEach((element) {
double resultValueDouble = element.sales;
if (resultValueDouble > max) max = resultValueDouble;
});
timeSeries2.forEach((element) {
double resultValueDouble = element.sales;
if (resultValueDouble > max) max = resultValueDouble;
});
return max.roundToDouble();
}
double getMinY() {
double min = timeSeries1[0].sales;
timeSeries1.forEach((element) {
double resultValueDouble = element.sales;
if (resultValueDouble < min) min = resultValueDouble;
});
timeSeries2.forEach((element) {
double resultValueDouble = element.sales;
if (resultValueDouble < min) min = resultValueDouble;
});
int value = min.toInt();
return value.toDouble();
}
List<LineChartBarData> getData(context) {
List<FlSpot> spots = List();
for (int index = 0; index < timeSeries1.length; index++) {
spots.add(FlSpot(index.toDouble(), timeSeries1[index].sales));
}
List<FlSpot> spots2 = List();
for (int index = 0; index < timeSeries2.length; index++) {
spots2.add(FlSpot(index.toDouble(), timeSeries2[index].sales));
}
final LineChartBarData lineChartBarData1 = LineChartBarData(
spots: spots,
isCurved: true,
colors: [Theme.of(context).primaryColor],
barWidth: 5,
isStrokeCapRound: true,
dotData: FlDotData(
show: false,
),
belowBarData: BarAreaData(
show: false,
),
);
final LineChartBarData lineChartBarData2 = LineChartBarData(
spots: spots2,
isCurved: true,
colors: [Colors.grey],
barWidth: 5,
isStrokeCapRound: true,
dotData: FlDotData(
show: false,
),
belowBarData: BarAreaData(
show: false,
),
);
return [lineChartBarData1, lineChartBarData2];
}
}

@ -0,0 +1,146 @@
import 'package:diplomaticquarterapp/core/model/vital_sign/vital_sign_res_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
class VitalSignBloodPressureWidget extends StatefulWidget {
final List<VitalSignResModel> vitalList;
final String title1;
final String title2;
final String title3;
final String viewKey1;
final String viewKey2;
VitalSignBloodPressureWidget(
{Key key, this.vitalList, this.title1, this.title2, this.viewKey1, this.title3, this.viewKey2});
@override
_VitalSignDetailsWidgetState createState() => _VitalSignDetailsWidgetState();
}
class _VitalSignDetailsWidgetState extends State<VitalSignBloodPressureWidget> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return Container(
decoration: BoxDecoration(
color: Colors.transparent,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0), topRight: Radius.circular(10.0)),
border: Border.all(color: Colors.grey, width: 1),
),
margin: EdgeInsets.all(20),
child: Container(
color: Colors.transparent,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 2.0, color: Colors.grey[300]),
),
children: fullData(projectViewModel),
),
],
),
),
);
}
List<TableRow> fullData(ProjectViewModel projectViewModel) {
List<TableRow> tableRow = [];
tableRow.add(TableRow(children: [
Container(
child: Container(
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only(
topLeft:projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0),
topRight: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0)
),
),
child: Center(
child: Texts(
TranslationBase.of(context).date,
color: Colors.white,
),
),
height: 60,
),
),
Container(
child: Container(
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
),
child: Center(
child: Texts(widget.title2, color: Colors.white),
),
height: 60),
),
Container(
child: Container(
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only(
topRight: projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0),
topLeft: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0)
),
),
child: Center(
child: Texts(widget.title3, color: Colors.white),
),
height: 60),
),
]));
widget.vitalList.forEach((vital) {
var data = vital.toJson()[widget.viewKey1];
if (data != 0)
tableRow.add(TableRow(children: [
Container(
child: Container(
padding: EdgeInsets.all(10),
color: Colors.white,
child: Center(
child: Texts(
'${projectViewModel.isArabic ? DateUtil.getWeekDayArabic(vital.vitalSignDate.weekday) : DateUtil.getWeekDay(vital.vitalSignDate.weekday)}, ${vital.vitalSignDate.day} ${projectViewModel.isArabic ? DateUtil.getMonthArabic(vital.vitalSignDate.month) : DateUtil.getMonth(vital.vitalSignDate.month)}, ${vital.vitalSignDate.year} ',
textAlign: TextAlign.center,
),
),
),
),
Container(
child: Container(
padding: EdgeInsets.all(10),
color: Colors.white,
child: Center(
child: Texts(
'${vital.toJson()[widget.viewKey1]}',
textAlign: TextAlign.center,
),
),
),
),
Container(
child: Container(
padding: EdgeInsets.all(10),
color: Colors.white,
child: Center(
child: Texts(
'${vital.toJson()[widget.viewKey2]}',
textAlign: TextAlign.center,
),
),
),
),
]));
});
return tableRow;
}
}

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/core/enum/patient_lookup.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/vital_sign_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_item.dart';
@ -16,19 +17,26 @@ class VitalSignDetailsScreen extends StatelessWidget {
int appointmentNo;
int projectID;
VitalSignDetailsScreen({this.appointmentNo, this.projectID});
bool isNotOneAppointment;
VitalSignDetailsScreen({this.appointmentNo, this.projectID,this.isNotOneAppointment=true});
List<ImagesInfo> imagesInfo = List();
@override
Widget build(BuildContext context) {
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/my-vital-signs/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/my-vital-signs/ar/0.png'));
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/my-vital-signs/en/1.png',imageAr: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/my-vital-signs/ar/1.png'));
return BaseView<VitalSignViewModel>(
onModelReady: appointmentNo != null && projectID != null
? (model) => model.getPatientRadOrders(
? (model) => model.getPatientVitalSign(
appointmentNo: appointmentNo, projectID: projectID)
: (model) => model.getPatientRadOrders(),
: (model) => model.getPatientVitalSign(),
builder: (_, mode, widget) => AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).vitalSigns,
baseViewModel: mode,
description: TranslationBase.of(context).infoSigns,
imagesInfo: imagesInfo,
body: mode.vitalSignResModelList.length > 0
? Container(
child: ListView(
@ -36,7 +44,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
Row(
children: <Widget>[
InkWell(
onTap: () => Navigator.push(
onTap: () =>isNotOneAppointment? Navigator.push(
context,
FadePage(
page: VitalSignItemDetailsScreen(
@ -45,22 +53,18 @@ class VitalSignDetailsScreen extends StatelessWidget {
vitalList: mode.vitalSignResModelList,
),
),
),
):null,
child: Container(
child: VitalSignItem(
des: TranslationBase.of(context).height,
icon: DQIcons.height,
lastVal: mode
.vitalSignResModelList[
mode.vitalSignResModelList.length - 1]
.heightCm
.toString(),
lastVal: mode.heightCm,
unit: TranslationBase.of(context).cm,
),
),
),
InkWell(
onTap: () => Navigator.push(
onTap: () => isNotOneAppointment ? Navigator.push(
context,
FadePage(
page: VitalSignItemDetailsScreen(
@ -69,16 +73,12 @@ class VitalSignDetailsScreen extends StatelessWidget {
vitalList: mode.vitalSignResModelList,
),
),
),
):null,
child: VitalSignItem(
des: TranslationBase.of(context).weight,
icon: DQIcons.weight_scale,
unit: TranslationBase.of(context).kg,
lastVal: mode
.vitalSignResModelList[
mode.vitalSignResModelList.length - 1]
.weightKg
.toString(),
lastVal: mode.weightKg,
),
),
],
@ -86,7 +86,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
Row(
children: <Widget>[
InkWell(
onTap: () => Navigator.push(
onTap: () => isNotOneAppointment ? Navigator.push(
context,
FadePage(
page: VitalSignItemDetailsScreen(
@ -96,18 +96,16 @@ class VitalSignDetailsScreen extends StatelessWidget {
vitalList: mode.vitalSignResModelList,
),
),
),
): null,
child: VitalSignItem(
des: TranslationBase.of(context).body,
icon: DQIcons.bmi,
lastVal: mode
.vitalSignResModelList[ mode.vitalSignResModelList.length - 1].pulseBeatPerMinute
.toString(),
lastVal: mode.bodyMax,
unit: TranslationBase.of(context).mass,
),
),
InkWell(
onTap: () => Navigator.push(
onTap: () => isNotOneAppointment ? Navigator.push(
context,
FadePage(
page: VitalSignItemDetailsScreen(
@ -117,14 +115,12 @@ class VitalSignDetailsScreen extends StatelessWidget {
vitalList: mode.vitalSignResModelList,
),
),
),
):null,
child: Container(
child: VitalSignItem(
des: TranslationBase.of(context).temperature,
icon: DQIcons.thermometer,
lastVal: mode
.vitalSignResModelList[ mode.vitalSignResModelList.length - 1].temperatureCelcius
.toString(),
lastVal: mode.temperatureCelcius,
unit: TranslationBase.of(context).tempC,
),
),
@ -134,7 +130,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
Row(
children: <Widget>[
InkWell(
onTap: () => Navigator.push(
onTap: () => isNotOneAppointment ? Navigator.push(
context,
FadePage(
page: VitalSignItemDetailsScreen(
@ -143,20 +139,16 @@ class VitalSignDetailsScreen extends StatelessWidget {
vitalList: mode.vitalSignResModelList,
),
),
),
):null,
child: VitalSignItem(
des: TranslationBase.of(context).heart,
icon: DQIcons.heart,
lastVal: mode
.vitalSignResModelList[
mode.vitalSignResModelList.length - 1]
.pulseBeatPerMinute
.toString(),
lastVal: mode.hartRat,
unit: TranslationBase.of(context).bpm,
),
),
InkWell(
onTap: () => Navigator.push(
onTap: () => isNotOneAppointment ? Navigator.push(
context,
FadePage(
page: VitalSignItemDetailsScreen(
@ -166,15 +158,11 @@ class VitalSignDetailsScreen extends StatelessWidget {
vitalList: mode.vitalSignResModelList,
),
),
),
):null,
child: VitalSignItem(
des: TranslationBase.of(context).respirationRate,
icon: DQIcons.outline,
lastVal: mode
.vitalSignResModelList[
mode.vitalSignResModelList.length - 1]
.respirationBeatPerMinute
.toString(),
lastVal: mode.respirationBeatPerMinute,
unit: TranslationBase.of(context).respirationSigns,
),
),
@ -184,24 +172,20 @@ class VitalSignDetailsScreen extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
InkWell(
onTap: () => Navigator.push(
onTap: () => isNotOneAppointment ? Navigator.push(
context,
FadePage(
page: VitalSignItemDetailsScreen(
pageKey: VitalSignDetails.BloodPressure,
pageTitle: TranslationBase.of(context).pulse,
pageTitle: TranslationBase.of(context).bloodPressure,
vitalList: mode.vitalSignResModelList,
),
),
),
):null,
child: VitalSignItem(
des: TranslationBase.of(context).pulse,
des: TranslationBase.of(context).bloodPressure,
icon: DQIcons.blood_pressure,
lastVal: mode
.vitalSignResModelList[
mode.vitalSignResModelList.length - 1]
.bloodPressure
.toString(),
lastVal: mode.bloodPressure,
unit: TranslationBase.of(context).sysDias,
),
),

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/enum/patient_lookup.dart';
import 'package:diplomaticquarterapp/core/model/vital_sign/vital_sign_res_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sing_chart_and_detials.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sing_chart_blood_pressure.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
@ -22,53 +23,14 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
case VitalSignDetails.BodyMeasurements:
VSchart = [
{
'name': 'Height',
'nameAr': 'الطول',
'name': 'BMI',
'nameAr': 'مؤشر الكتلة',
'title1': 'Date',
'title2': 'Cm',
'title2Ar': 'سم',
'viewKey': 'HeightCm',
},
{
'name': 'Weight Kg',
'nameAr': 'الوزن كجم',
'title1': 'Date',
'title2': 'Kg',
'title2Ar': 'كجم',
'viewKey': 'WeightKg',
},
{
'name': 'Body Mass Index',
'nameAr': 'مؤشر كتلة الجسم',
'title1': 'Date',
'title2': 'BodyMass',
'title2Ar': 'كتلة الجسم',
'title2': 'BMI',
'title2Ar': 'الكتلة',
'viewKey': 'BodyMassIndex',
},
{
'name': 'Head Circum Cm',
'nameAr': 'محيط رأس سم',
'title1': 'Date',
'title2': 'Cm',
'title2Ar': 'سم',
'viewKey': 'HeadCircumCm',
},
{
'name': 'Ideal Body Weight (Lbs)',
'nameAr': 'وزن الجسم المثالي (رطل)',
'title1': 'Date',
'title2': 'Ideal Weight',
'title2Ar': 'الوزن المثالي',
'viewKey': 'IdealBodyWeightLbs',
},
{
'name': 'Lean Body WeightLbs (Lbs)',
'nameAr': 'رطل وزن الجسم النحيل (رطل)',
'title1': 'Date',
'title2': 'Lean Weight',
'title2Ar': 'وزن خفيف',
'viewKey': 'LeanBodyWeightLbs',
}
];
break;
@ -115,21 +77,16 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
case VitalSignDetails.BloodPressure:
VSchart = [
{
'name': 'Blood Pressure Higher',
'nameAr': 'ضغط الدم الإنقباض',
'name': 'Blood Pressure Systolic Diastolic',
'nameAr': 'ضغط الدم الإنقباض الإنبساط',
'title1': 'Date',
'title2': 'Minute',
'title2': 'systolic',
'title3': 'Diastolic',
'title2Ar': 'الإنقباض',
'viewKey': 'BloodPressureHigher',
'title3Ar': 'الإنبساط',
'viewKey': 'BloodPressure',
},
{
'name': 'Blood Pressure Lower',
'nameAr': 'ضغط الدم الإنبساط',
'title1': 'Date',
'title2': 'Minute',
'title2Ar': 'الإنبساط',
'viewKey': 'BloodPressureLower',
}
];
break;
@ -149,7 +106,7 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
case VitalSignDetails.heart:
VSchart = [
{
'name': 'FIO2',
'name': 'Heart rate',
'nameAr': 'معدل النبض بالدقيقة',
'title1': 'Date',
'title2': 'bpm',
@ -209,6 +166,20 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
var vitalListTemp = vitalList.where(
(element) => element.toJson()[chartInfo['viewKey']] != null,
);
if(vitalListTemp.length != 0 && chartInfo['viewKey']=='BloodPressure'){
return VitalSingChartBloodPressure(
vitalList: vitalList,
name:projectViewModel.isArabic? chartInfo['nameAr']:chartInfo['name'],
title1: chartInfo['title1'],
title2:projectViewModel.isArabic?chartInfo['title2Ar']: chartInfo['title2'],
title3:projectViewModel.isArabic?chartInfo['title3Ar']: chartInfo['title3'],
viewKey1: 'BloodPressureHigher',
viewKey2: 'BloodPressureLower',
);
}
return vitalListTemp.length != 0
? VitalSingChartAndDetials(
vitalList: vitalList,

@ -46,7 +46,7 @@ class VitalSingChartAndDetials extends StatelessWidget {
generateData() {
if (vitalList.length > 0) {
vitalList.forEach(
vitalList.reversed.toList().forEach(
(element) {
if( element.toJson()[viewKey]?.toInt()!=0)
timeSeriesData.add(

@ -0,0 +1,85 @@
import 'package:diplomaticquarterapp/core/model/vital_sign/vital_sign_res_model.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_blood_pressurewideget.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_wideget.dart';
import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:flutter/material.dart';
import 'package:charts_flutter/flutter.dart' as charts;
import 'LineChartCurved.dart';
import 'LineChartCurvedBloodPressure.dart';
class VitalSingChartBloodPressure extends StatelessWidget {
VitalSingChartBloodPressure({
Key key,
@required this.vitalList,
@required this.name,
@required this.viewKey1,
@required this.viewKey2,
@required this.title1,
@required this.title2,
@required this.title3,
}) : super(key: key);
final List<VitalSignResModel> vitalList;
final String name;
final String viewKey1;
final String viewKey2;
final String title1;
final String title2;
final String title3;
List<TimeSeriesSales2> timeSeriesData1 = [];
List<TimeSeriesSales2> timeSeriesData2 = [];
@override
Widget build(BuildContext context) {
generateData();
return Column(
children: <Widget>[
AppExpandableNotifier(
isExpand: true,
headerWidget: LineChartCurvedBloodPressure(
title: name,
timeSeries1: timeSeriesData1,
timeSeries2: timeSeriesData2,
indexes: timeSeriesData1.length ~/ 5.5,
),
bodyWidget: VitalSignBloodPressureWidget(
vitalList: vitalList,
title1: title1,
title2: title2,
title3: title3,
viewKey1: viewKey1,
viewKey2: viewKey2,
),
),
],
);
}
generateData() {
if (vitalList.length > 0) {
vitalList.reversed.toList().forEach(
(element) {
if (element.toJson()[viewKey1]?.toInt() != 0)
timeSeriesData1.add(
TimeSeriesSales2(
new DateTime(element.vitalSignDate.year,
element.vitalSignDate.month, element.vitalSignDate.day),
element.toJson()[viewKey1].toDouble(),
),
);
if (element.toJson()[viewKey2]?.toInt() != 0)
timeSeriesData2.add(
TimeSeriesSales2(
new DateTime(element.vitalSignDate.year,
element.vitalSignDate.month, element.vitalSignDate.day),
element.toJson()[viewKey2].toDouble(),
),
);
},
);
}
}
}

@ -1,7 +1,9 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/pages/medical/balance/advance_payment_page.dart';
import 'package:diplomaticquarterapp/pages/medical/balance/my_balance_page.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -12,9 +14,13 @@ import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
class PaymentService extends StatelessWidget {
ToDoCountProviderModel model;
ProjectViewModel projectViewModel;
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
projectViewModel = Provider.of(context);
model = Provider.of<ToDoCountProviderModel>(context);
return AppScaffold(
isShowAppBar: true,
isShowDecPage: false,
@ -70,8 +76,7 @@ class PaymentService extends StatelessWidget {
),
Expanded(
child: InkWell(
onTap: () =>
Navigator.push(context, FadePage(page: ToDo(isShowAppBar: true))),
onTap: () => navigateToToDoPage(context),
child: Container(
margin: EdgeInsets.all(5.0),
padding: EdgeInsets.all(9),
@ -166,4 +171,17 @@ class PaymentService extends StatelessWidget {
),
);
}
navigateToToDoPage(BuildContext context) {
if (projectViewModel.isLogin) {
if (model.count != 0) {
Navigator.push(context, FadePage(page: ToDo(isShowAppBar: true)));
} else {
AppToast.showErrorToast(
message: TranslationBase.of(context).upcomingEmpty);
}
} else {
Navigator.push(context, FadePage(page: ToDo(isShowAppBar: true)));
}
}
}

@ -190,7 +190,7 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
child: SecondaryButton(
onTap: () async {
final form = formKey.currentState;
if (form.validate()) {
if (form.validate() && rating>0 ) {
form.save();
Navigator.push(
context,
@ -206,7 +206,7 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
}
},
label: TranslationBase.of(context).next,
disabled: model.state == ViewState.BusyLocal,
disabled: model.state == ViewState.BusyLocal|| rating==0,
loading: model.state == ViewState.BusyLocal,
textColor: Theme.of(context).backgroundColor),
),

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
@ -10,6 +11,7 @@ import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:provider/provider.dart';
class ProfileSettings extends StatefulWidget {
@ -29,7 +31,9 @@ class _ProfileSettings extends State<ProfileSettings>
@override
void initState() {
Future.delayed(new Duration(seconds: 0), () {
getSettings(context);
ProjectViewModel projectProvider;
projectProvider = Provider.of(context);
if (projectProvider.isLogin == true) getSettings(context);
});
super.initState();
}
@ -38,182 +42,188 @@ class _ProfileSettings extends State<ProfileSettings>
return BaseView<DashboardViewModel>(
onModelReady: (model) => {},
builder: (_, model, wi) => Container(
child:
ListView(scrollDirection: Axis.vertical, children: <Widget>[
Container(
padding: EdgeInsets.all(15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
AppText(
TranslationBase.of(context).fileNo,
color: Colors.black,
child: model.user != null
? ListView(scrollDirection: Axis.vertical, children: <Widget>[
Container(
padding: EdgeInsets.all(15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
AppText(
TranslationBase.of(context).fileNo,
color: Colors.black,
),
AppText(
model.user.patientID.toString(),
color: Colors.black,
),
],
),
),
AppText(
model.user.patientID.toString(),
color: Colors.black,
SizedBox(
height: 1,
width: MediaQuery.of(context).size.width,
child: Container(
color: Colors.grey[300],
),
),
],
),
),
SizedBox(
height: 1,
width: MediaQuery.of(context).size.width,
child: Container(
color: Colors.grey[300],
),
),
Padding(
child: AppText(TranslationBase.of(context).languageSetting,
fontWeight: FontWeight.bold),
padding: EdgeInsets.all(10),
),
Container(
color: Colors.white,
padding:
EdgeInsets.only(top: 0, left: 10, right: 10, bottom: 0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
AppText(TranslationBase.of(context).english),
new Radio(
value: 2,
groupValue: language,
onChanged: (value) {
setState(() {
language = value;
});
},
)
],
)),
Container(
color: Colors.white,
padding:
EdgeInsets.only(top: 0, left: 10, right: 10, bottom: 0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
AppText(TranslationBase.of(context).arabic),
new Radio(
value: 1,
groupValue: language,
onChanged: (value) {
setState(() {
language = value;
});
},
)
],
)),
Padding(
child: AppText(TranslationBase.of(context).alert),
padding: EdgeInsets.all(10),
),
Container(
color: Colors.white,
padding:
EdgeInsets.only(top: 0, left: 10, right: 10, bottom: 0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
AppText(TranslationBase.of(context).emailAlert),
Switch(
value: emailAlert,
onChanged: (value) {
setState(() {
emailAlert = value;
});
},
activeTrackColor: Colors.lightGreenAccent,
activeColor: Colors.green,
)
],
)),
Container(
color: Colors.white,
padding:
EdgeInsets.only(top: 0, left: 10, right: 10, bottom: 0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
AppText(TranslationBase.of(context).smsAlert),
Switch(
value: smsAlert,
onChanged: (value) {
setState(() {
smsAlert = value;
});
},
activeTrackColor: Colors.lightGreenAccent,
activeColor: Colors.green,
)
],
)),
Padding(
child: AppText(TranslationBase.of(context).contactInfo),
padding: EdgeInsets.all(10),
),
Container(
color: Colors.white,
padding:
EdgeInsets.only(top: 0, left: 10, right: 10, bottom: 0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(TranslationBase.of(context).email),
TextField(
controller: emailController,
decoration: InputDecoration(
suffixIcon: Icon(Icons.edit),
))
],
)),
Container(
color: Colors.white,
padding:
EdgeInsets.only(top: 0, left: 10, right: 10, bottom: 0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(TranslationBase.of(context).emergencyName),
TextField(
controller: emergencyContactName,
decoration: InputDecoration(
suffixIcon: Icon(Icons.edit),
))
],
)),
Container(
color: Colors.white,
padding:
EdgeInsets.only(top: 0, left: 10, right: 10, bottom: 0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(TranslationBase.of(context).emergencyContact),
TextField(
controller: emergencyContact,
decoration: InputDecoration(
suffixIcon: Icon(Icons.edit),
),
)
],
)),
Container(
padding: EdgeInsets.all(10),
child: Row(
children: <Widget>[
Expanded(
child: DefaultButton(
TranslationBase.of(context).submit,
() {
saveSettings();
},
)),
],
))
])));
Padding(
child: AppText(
TranslationBase.of(context).languageSetting,
fontWeight: FontWeight.bold),
padding: EdgeInsets.all(10),
),
Container(
color: Colors.white,
padding: EdgeInsets.only(
top: 0, left: 10, right: 10, bottom: 0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
AppText(TranslationBase.of(context).english),
new Radio(
value: 2,
groupValue: language,
onChanged: (value) {
setState(() {
language = value;
});
},
)
],
)),
Container(
color: Colors.white,
padding: EdgeInsets.only(
top: 0, left: 10, right: 10, bottom: 0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
AppText(TranslationBase.of(context).arabic),
new Radio(
value: 1,
groupValue: language,
onChanged: (value) {
setState(() {
language = value;
});
},
)
],
)),
Padding(
child: AppText(TranslationBase.of(context).alert),
padding: EdgeInsets.all(10),
),
Container(
color: Colors.white,
padding: EdgeInsets.only(
top: 0, left: 10, right: 10, bottom: 0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
AppText(TranslationBase.of(context).emailAlert),
Switch(
value: emailAlert,
onChanged: (value) {
setState(() {
emailAlert = value;
});
},
activeTrackColor: Colors.lightGreenAccent,
activeColor: Colors.green,
)
],
)),
Container(
color: Colors.white,
padding: EdgeInsets.only(
top: 0, left: 10, right: 10, bottom: 0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
AppText(TranslationBase.of(context).smsAlert),
Switch(
value: smsAlert,
onChanged: (value) {
setState(() {
smsAlert = value;
});
},
activeTrackColor: Colors.lightGreenAccent,
activeColor: Colors.green,
)
],
)),
Padding(
child: AppText(TranslationBase.of(context).contactInfo),
padding: EdgeInsets.all(10),
),
Container(
color: Colors.white,
padding: EdgeInsets.only(
top: 0, left: 10, right: 10, bottom: 0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(TranslationBase.of(context).email),
TextField(
controller: emailController,
decoration: InputDecoration(
suffixIcon: Icon(Icons.edit),
))
],
)),
Container(
color: Colors.white,
padding: EdgeInsets.only(
top: 0, left: 10, right: 10, bottom: 0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(TranslationBase.of(context).emergencyName),
TextField(
controller: emergencyContactName,
decoration: InputDecoration(
suffixIcon: Icon(Icons.edit),
))
],
)),
Container(
color: Colors.white,
padding: EdgeInsets.only(
top: 0, left: 10, right: 10, bottom: 0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).emergencyContact),
TextField(
controller: emergencyContact,
decoration: InputDecoration(
suffixIcon: Icon(Icons.edit),
),
)
],
)),
Container(
padding: EdgeInsets.all(10),
child: Row(
children: <Widget>[
Expanded(
child: DefaultButton(
TranslationBase.of(context).save,
() {
saveSettings();
},
)),
],
))
])
: Center(
child:
AppText(TranslationBase.of(context).loginToUseService),
)));
}
getSettings(context) {

@ -21,6 +21,10 @@ class _Settings extends State<Settings> with TickerProviderStateMixin {
_tabController =
new TabController(length: 2, vsync: this, initialIndex: widget.type);
if(widget.type==1){
_tabController.animateTo(1);
}
super.initState();
}
@ -30,6 +34,14 @@ class _Settings extends State<Settings> with TickerProviderStateMixin {
return Scaffold(
appBar: AppBar(
bottom: TabBar(
// isScrollable: true,
indicatorWeight: 5.0,
//indicatorSize: TabBarIndicatorSize.label,
// indicatorSize: TabBarIndicatorSize.tab,
indicatorColor: Theme.of(context).primaryColor,
// labelColor: Theme.of(context).primaryColor,
tabs: [
Tab(text: TranslationBase.of(context).general),
Tab(

@ -258,7 +258,7 @@ class AuthProvider with ChangeNotifier {
sharedPref.setString(BLOOD_TYPE, localRes['PatientBloodType']);
return Future.value(localRes);
} catch (error) {
throw error;
throw localRes;
//return Future.value(error);
}
}

@ -1,14 +1,18 @@
import 'dart:async';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'config/shared_pref_kay.dart';
import 'config/size_config.dart';
import 'core/service/AuthenticatedUserObject.dart';
import 'core/viewModels/project_view_model.dart';
import 'locator.dart';
import 'models/Authentication/authenticated_user.dart';
import 'widgets/transitions/slide_up_page.dart';
AppSharedPreferences sharedPref = new AppSharedPreferences();
AuthenticatedUserObject authenticatedUserObject =
@ -25,14 +29,11 @@ class _SplashScreenState extends State<SplashScreen> {
void initState() {
super.initState();
Timer(
Duration(seconds: 1, milliseconds: 500),
Duration(seconds: 1, milliseconds: 800),
() {
Provider.of<ProjectViewModel>(context, listen: false).loadSharedPrefLanguage().then((value) {
Navigator.of(context).pushReplacement(
MaterialPageRoute(
builder: (BuildContext context) => LandingPage(),
),
);
Navigator.of(context).pushReplacement(FadePage(page: LandingPage()));
});
},
);
@ -46,12 +47,7 @@ class _SplashScreenState extends State<SplashScreen> {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
body: Center(
child: Padding(
padding: const EdgeInsets.all(12.0),
child: Image.asset('assets/images/DQ/DQ_logo.png'),
),
),
body: Image.asset('assets/images/powerd-by.jpg',fit: BoxFit.fitWidth,width: MediaQuery.of(context).size.width,),
);
}
}

@ -15,12 +15,13 @@ class LocationUtils {
void getCurrentLocation() async {
print("current location");
isLocationServiceEnabled().then((value) {
Geolocator.isLocationServiceEnabled().then((value) {
if (value) {
checkPermission().then((permission) {
Geolocator.checkPermission().then((permission) {
if (permission == LocationPermission.always ||
permission == LocationPermission.whileInUse) {
getLastKnownPosition().then((value) => setLocation(value));
Geolocator.getLastKnownPosition()
.then((value) => setLocation(value));
}
if (permission == LocationPermission.denied ||
@ -48,18 +49,21 @@ class LocationUtils {
okFunction: () => {
ConfirmDialog.closeAlertDialog(context),
if (isPermissionError)
openAppSettings()
Geolocator.openAppSettings()
else
openLocationSettings()
Geolocator.openLocationSettings()
},
cancelFunction: () => {});
return dialog.showAlertDialog(context);
}
void setLocation(Position position) {
print(position);
this.sharedPref.setDouble(USER_LAT, position.latitude);
this.sharedPref.setDouble(USER_LONG, position.longitude);
this
.sharedPref
.setDouble(USER_LAT, position != null ? position.latitude : 0.0);
this
.sharedPref
.setDouble(USER_LONG, position != null ? position.longitude : 0.0);
}
void setZeroLocation() {

@ -775,6 +775,7 @@ class TranslationBase {
String get range => localizedValues['range'][locale.languageCode];
String get outpatient => localizedValues['out-patient'][locale.languageCode];
String get inPatient => localizedValues['in-patient'][locale.languageCode];
String get liveCare => localizedValues['liveCare'][locale.languageCode];
String get report => localizedValues['report'][locale.languageCode];
String get openRad => localizedValues['open-rad'][locale.languageCode];
String get sendCopyRad => localizedValues['send-copy'][locale.languageCode];
@ -944,6 +945,21 @@ class TranslationBase {
String get requestReport => localizedValues['requestReport'][locale.languageCode];
String get confirmMsgReport => localizedValues['confirm-msg-report'][locale.languageCode];
String get successSendReport => localizedValues['successSendReport'][locale.languageCode];
String get pulseTitle => localizedValues['pulseTitle'][locale.languageCode];
String get systolicLng => localizedValues['systolic-lng'][locale.languageCode];
String get diastolicLng => localizedValues['diastolic-lng'][locale.languageCode];
String get policyHolder => localizedValues['policy-holder'][locale.languageCode];
String get policyNo => localizedValues['policy-no'][locale.languageCode];
String get expiryDateTitle => localizedValues['expiry-date'][locale.languageCode];
String get classTitle => localizedValues['class'][locale.languageCode];
String get approval => localizedValues['approval'][locale.languageCode];
String get agree => localizedValues['agree'][locale.languageCode];
String get disagree => localizedValues['disagree'][locale.languageCode];
String get requestSent => localizedValues['request-sent'][locale.languageCode];
String get attachInsuraceImage => localizedValues['attach-insurace-image'][locale.languageCode];
String get infoInsurCards => localizedValues['info-insur-cards'][locale.languageCode];
String get scanNow => localizedValues['scan-now'][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -1,9 +1,14 @@
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../../d_q_icons_icons.dart';
import 'bottom_navigation_item.dart';
@ -20,12 +25,30 @@ class BottomNavBar extends StatefulWidget {
class _BottomNavBarState extends State<BottomNavBar> {
int _index = 0;
ToDoCountProviderModel model;
AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
_changeIndex(int index) {
widget.changeIndex(index);
if (index != 4)
widget.changeIndex(index);
else {
if (authenticatedUserObject.isLogin) {
if (model.count != 0) {
widget.changeIndex(index);
} else {
AppToast.showErrorToast(
message: TranslationBase.of(context).upcomingEmpty);
}
} else {
widget.changeIndex(index);
}
}
}
@override
Widget build(BuildContext context) {
model = Provider.of<ToDoCountProviderModel>(context);
return BottomAppBar(
elevation: 4,
shape: CircularNotchedRectangle(),
@ -103,6 +126,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
}
Future navigateToToDoList(context) async {
Navigator.push(context, MaterialPageRoute(builder: (context) => ToDo(isShowAppBar: false)));
Navigator.push(context,
MaterialPageRoute(builder: (context) => ToDo(isShowAppBar: false)));
}
}

@ -8,7 +8,7 @@ import 'package:flutter/material.dart';
import 'package:image_picker/image_picker.dart';
class ImageOptions {
static showImageOptions(BuildContext context, Function(String) image) {
static showImageOptions(BuildContext context, Function(String,File) image,) {
showModalBottomSheet(
backgroundColor: Colors.transparent,
context: context,
@ -28,7 +28,7 @@ class ImageOptions {
final bytes = File(fileName).readAsBytesSync();
String base64Encode = base64.encode(bytes);
if (base64Encode != null) {
image(base64Encode);
image(base64Encode,_image);
}
},
),
@ -42,7 +42,7 @@ class ImageOptions {
final bytes = File(fileName).readAsBytesSync();
String base64Encode = base64.encode(bytes);
if (base64Encode != null) {
image(base64Encode);
image(base64Encode,_image);
}
},
),

@ -236,8 +236,8 @@ class _SecondaryButtonState extends State<SecondaryButton>
widget.label,
style: TextStyle(
color: widget.textColor,
fontSize: widget.small ? 12.0 : 17.0,
fontWeight: FontWeight.w800,
fontSize: widget.small ? 12.0 : 15.0,
// fontWeight: FontWeight.w800,
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans'),
),
)

@ -31,7 +31,7 @@ class LabResultChartAndDetails extends StatelessWidget {
child: LineChartCurved(title: name,labResult:labResult,),
),
bodyWidget: LabResultDetailsWidget(
labResult: labResult,
labResult: labResult.reversed.toList(),
),
isExpand: true,
),

@ -19,6 +19,7 @@ class DoctorCard extends StatelessWidget {
final Function onTap;
final Function onEmailTap;
final bool isInOutPatient;
final bool isLiveCareAppointment;
DoctorCard(
{this.name,
@ -29,7 +30,8 @@ class DoctorCard extends StatelessWidget {
this.billNo,
this.onTap,
this.onEmailTap,
this.isInOutPatient});
this.isInOutPatient,
this.isLiveCareAppointment = false});
@override
Widget build(BuildContext context) {
@ -53,12 +55,19 @@ class DoctorCard extends StatelessWidget {
Row(
children: <Widget>[
Container(
width:projectViewModel.isArabic? 27:20,
height: date == null ? projectViewModel.isArabic? 185 :100 : 180,
width: projectViewModel.isArabic ? 27 : 20,
height: date == null
? projectViewModel.isArabic
? 185
: 100
: 180,
decoration: BoxDecoration(
color: !isInOutPatient
? Colors.red[900]
: Theme.of(context).primaryColor,
//Colors.red[900] Color(0xff404545)
color: isLiveCareAppointment
? Color(0xff404545)
: !isInOutPatient
? Colors.red[900]
: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic
? Radius.circular(0)
@ -66,21 +75,29 @@ class DoctorCard extends StatelessWidget {
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),
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(
!isInOutPatient
isLiveCareAppointment
? TranslationBase.of(context)
.inPatient
.liveCare
.toUpperCase()
: TranslationBase.of(context)
.outpatient
.toUpperCase(),
: !isInOutPatient
? TranslationBase.of(context)
.inPatient
.toUpperCase()
: TranslationBase.of(context)
.outpatient
.toUpperCase(),
style: TextStyle(color: Colors.white),
),
)),
@ -96,7 +113,7 @@ class DoctorCard extends StatelessWidget {
Expanded(
flex: 1,
child: LargeAvatar(
name:name,
name: name,
url: profileUrl,
),
),
@ -108,23 +125,22 @@ class DoctorCard extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(
TranslationBase.of(context).dr+" "+ name,
TranslationBase.of(context).dr +
" " +
name,
bold: true,
),
Texts(
subName,
),
if (billNo != null)
Row(
children: <Widget>[
Texts(
'${TranslationBase.of(context).billNo}: ',
),
Texts(
billNo,
)
],
),

@ -1,8 +1,10 @@
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/insert_user_activity_request_model.dart';
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
import 'package:diplomaticquarterapp/pages/settings/settings.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.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';
@ -41,6 +43,7 @@ class _ConfirmSendEmailDialogState extends State<ConfirmSendEmailDialog> {
Center(
child: Texts(
TranslationBase.of(context).sendConfEmail,
fontSize: 14,
color: Colors.grey,
),
),
@ -88,10 +91,16 @@ class _ConfirmSendEmailDialogState extends State<ConfirmSendEmailDialog> {
height: 15.0,
),
InkWell(
onTap: () {
Navigator.of(context).pushNamed(
SETTINGS,
onTap: ()
{
Navigator.pop(context);
Navigator.push(
context,
FadePage(
page: Settings(type: 1,),
),
);
},
child: Container(
width: double.maxFinite,

@ -47,8 +47,6 @@ class _AppDrawerState extends State<AppDrawer> {
AuthenticatedUser mainUser;
AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
VitalSignService _vitalSignService = locator<VitalSignService>();
AppointmentRateViewModel appointmentRateViewModel =
locator<AppointmentRateViewModel>();
@ -73,73 +71,76 @@ class _AppDrawerState extends State<AppDrawer> {
children: <Widget>[
Container(
height: SizeConfig.screenHeight * .30,
padding: EdgeInsets.all(15),
child: InkWell(
child: Column(
children: <Widget>[
Container(
child: Image.asset('assets/images/DQ/DQ_logo.png'),
margin: EdgeInsets.all(SizeConfig.imageSizeMultiplier * 4),
),
(user != null && projectProvider.isLogin)
? Padding(
padding: EdgeInsets.all(10),
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
children: <Widget>[
Row(
children: <Widget>[
Padding(
padding: EdgeInsets.only(
right: 0),
child: Icon(
Icons.account_circle,
color: Color(0xFF40ACC9),
child: Column(
children: <Widget>[
Container(
child:
Image.asset('assets/images/DQ/DQ_logo.png'),
margin: EdgeInsets.all(
SizeConfig.imageSizeMultiplier * 4),
),
(user != null && projectProvider.isLogin)
? Padding(
padding: EdgeInsets.all(10),
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
children: <Widget>[
Row(
children: <Widget>[
Padding(
padding:
EdgeInsets.only(right: 0),
child: Icon(
Icons.account_circle,
color: Color(0xFF40ACC9),
size: 28,
)),
Padding(
padding:
EdgeInsets.only(right: 5),
child:AppText(
user.firstName +
' ' +
user.lastName,
color: Color(0xFF40ACC9),
))
],
),
Row(children: <Widget>[
Padding(
padding: EdgeInsets.only(
left: 30, right: 10),
child: Column(
children: <Widget>[
AppText(
TranslationBase.of(
context)
.fileno +
": " +
user.patientID
.toString(),
color:
Color(0xFF40ACC9),
fontSize: SizeConfig
.textMultiplier *
1.5,
),
AppText(
booldType != null
? 'Blood Group: ' +
booldType
: '',
fontSize: SizeConfig
.textMultiplier *
1.5,
),
],
child: AppText(
user.firstName +
' ' +
user.lastName,
color: Color(0xFF40ACC9),
))
]),
],
),
Row(children: <Widget>[
Padding(
padding: EdgeInsets.only(
left: 30, right: 10),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
AppText(
TranslationBase.of(
context)
.fileno +
": " +
user.patientID
.toString(),
color: Color(0xFF40ACC9),
fontSize: SizeConfig
.textMultiplier *
1.5,
),
AppText(
booldType != null
? 'Blood Group: ' +
booldType
: '',
fontSize: SizeConfig
.textMultiplier *
1.5,
),
],
))
]),
Divider()
]))
: SizedBox(),
@ -150,40 +151,29 @@ class _AppDrawerState extends State<AppDrawer> {
Column(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
InkWell(
child: DrawerItem(
TranslationBase.of(context).arabicChange,
Icons.translate),
onTap: () {
// Navigator.of(context).pushNamed(
// WELCOME_LOGIN,
// );
if (projectProvider.isArabic) {
projectProvider.changeLanguage('en');
} else {
projectProvider.changeLanguage('ar');
}
},
),
(user != null && projectProvider.isLogin)
? Column(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
InkWell(
child: DrawerItem(
TranslationBase.of(context).family,
Icons.group,
textColor: Color(0xFF40ACC9),
iconColor: Color(0xFF40ACC9),
bottomLine: false,
sideArrow: true,
),
onTap: () {
Navigator.of(context).pushNamed(
MY_FAMILIY,
);
},
),
user.isFamily == null ||
user.isFamily == false
? InkWell(
child: DrawerItem(
TranslationBase.of(context).family,
Icons.group,
textColor: Color(0xFF40ACC9),
iconColor: Color(0xFF40ACC9),
bottomLine: false,
sideArrow: true,
),
onTap: () {
Navigator.of(context).pop();
Navigator.of(context).pushNamed(
MY_FAMILIY,
);
},
)
: SizedBox(),
FutureBuilder(
future: getFamilyFiles(), // async work
builder: (BuildContext context,
@ -194,7 +184,7 @@ class _AppDrawerState extends State<AppDrawer> {
case ConnectionState.waiting:
return Padding(
padding: EdgeInsets.all(10),
child: Text('Loading....'));
child: Text(''));
default:
if (snapshot.hasError)
return Padding(
@ -230,9 +220,15 @@ class _AppDrawerState extends State<AppDrawer> {
children: <
Widget>[
Expanded(
child: Icon(
Icons
.person),
child:
Icon(
Icons
.account_circle,
color: Color(
0xFF40ACC9),
size:
24,
),
),
Expanded(
flex: 7,
@ -270,23 +266,25 @@ class _AppDrawerState extends State<AppDrawer> {
result,
context);
},
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <
Widget>[
Expanded(
child:
Icon(Icons.person, color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black),
),
Expanded(
flex: 7,
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
AppText(result.patientName, color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black),
AppText(TranslationBase.of(context).fileno + ": " + result.iD.toString(), color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black),
])),
],
)))
child: Padding(
padding: EdgeInsets.only(right: 5),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Expanded(
child: Icon(Icons.account_circle, color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black),
),
Expanded(
flex: 7,
child: Padding(
padding: EdgeInsets.only(left: 5, right: 5),
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
AppText(result.patientName, color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black),
AppText(TranslationBase.of(context).fileno + ": " + result.responseID.toString(), color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black),
]))),
],
))))
: SizedBox();
}).toList())
],
@ -297,8 +295,54 @@ class _AppDrawerState extends State<AppDrawer> {
InkWell(
child: DrawerItem(
TranslationBase.of(context)
.notification,
Icons.notifications),
.arabicChange,
Icons.translate),
onTap: () {
if (projectProvider.isArabic) {
projectProvider.changeLanguage('en');
} else {
projectProvider.changeLanguage('ar');
}
},
),
InkWell(
child: Stack(
children: [
DrawerItem(
TranslationBase.of(context)
.notification,
Icons.notifications,
count: notificationCount != null
? new Container(
padding: EdgeInsets.all(4),
margin: EdgeInsets.all(2),
decoration: new BoxDecoration(
color: Colors.red,
borderRadius:
BorderRadius.circular(
20),
),
constraints: BoxConstraints(
minWidth: 20,
minHeight: 20,
),
child: new Text(
notificationCount,
style: new TextStyle(
color: Colors.white,
fontSize: projectProvider
.isArabic
? 8
: 9,
),
textAlign: TextAlign.center,
),
// ),
)
: SizedBox(),
),
],
),
onTap: () {
//NotificationsPage
Navigator.of(context).pop();
@ -343,14 +387,59 @@ class _AppDrawerState extends State<AppDrawer> {
)
],
)
: InkWell(
child: DrawerItem(
TranslationBase.of(context).loginregister,
Icons.lock_open),
onTap: () {
login();
},
),
: Column(
children: [
InkWell(
child: DrawerItem(
TranslationBase.of(context)
.loginregister,
Icons.lock_open),
onTap: () {
login();
},
),
SizedBox(
height: 120,
),
InkWell(
child: DrawerItem(
TranslationBase.of(context)
.arabicChange,
Icons.translate),
onTap: () {
if (projectProvider.isArabic) {
projectProvider.changeLanguage('en');
} else {
projectProvider.changeLanguage('ar');
}
},
),
InkWell(
child: DrawerItem(
TranslationBase.of(context).appsetting,
Icons.settings_input_composite),
onTap: () {
Navigator.of(context).pushNamed(
SETTINGS,
);
},
),
InkWell(
child: DrawerItem(
TranslationBase.of(context).rateApp,
Icons.star),
onTap: () {
if (Platform.isIOS) {
launch(
"https://apps.apple.com/sa/app/dr-suliaman-alhabib/id733503978");
} else {
launch(
"https://play.google.com/store/apps/details?id=com.ejada.hmg&hl=en");
}
},
)
],
)
],
)
],
@ -369,9 +458,7 @@ class _AppDrawerState extends State<AppDrawer> {
children: [
Column(
children: <Widget>[
Text(TranslationBase
.of(context)
.poweredBy),
Text(TranslationBase.of(context).poweredBy),
Image.asset(
'assets/images/cs_logo_container.png',
width: SizeConfig.imageSizeMultiplier * 30,
@ -410,9 +497,11 @@ class _AppDrawerState extends State<AppDrawer> {
var data = AuthenticatedUser.fromJson(
await this.sharedPref.getObject(USER_PROFILE));
var data2 = AuthenticatedUser.fromJson(await this.sharedPref.getObject(MAIN_USER));
var data2 = AuthenticatedUser.fromJson(
await this.sharedPref.getObject(MAIN_USER));
booldType = await sharedPref.getString(BLOOD_TYPE);
notificationCount = await sharedPref.getString(NOTIFICATION_COUNT);
setState(() {
notificationCount = notificationCount;
this.user = data;
@ -431,7 +520,6 @@ class _AppDrawerState extends State<AppDrawer> {
this.user = null;
toDoProvider.setState(0, false);
Navigator.of(context).pushNamed(HOME);
projectProvider.platformBridge().unRegisterHmgGeofences();
}
login() async {
@ -460,11 +548,14 @@ class _AppDrawerState extends State<AppDrawer> {
switchUser(user, context) {
GifLoaderDialogUtils.showMyDialog(context);
this.familyFileProvider.silentLoggin(user is AuthenticatedUser ? null : user, mainUser: user is AuthenticatedUser).then((value) async {
await authenticatedUserObject.getUser();
this
.familyFileProvider
.silentLoggin(user is AuthenticatedUser ? null : user,
mainUser: user is AuthenticatedUser)
.then((value) {
_vitalSignService.heightCm = "";
_vitalSignService.weightKg = "";
GifLoaderDialogUtils.hideDialog(context);
loginAfter(value, context);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
@ -479,23 +570,29 @@ class _AppDrawerState extends State<AppDrawer> {
var familyFile = await sharedPref.getObject(FAMILY_FILE);
var currentLang = await sharedPref.getString(APP_LANGUAGE);
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);
// sharedPref.setString(BLOOD_TYPE, result['PatientBloodType']);
this.sharedPref.setString(BLOOD_TYPE, bloodType);
this.sharedPref.setObject(MAIN_USER, mainUser);
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).pop();
await authenticatedUserObject.getUser(getUser: true);
Provider.of<ProjectViewModel>(context, listen: false).user =
authenticatedUserObject.user;
Provider.of<ProjectViewModel>(context, listen: false)
.setUser(authenticatedUserObject.user);
appointmentRateViewModel
.getIsLastAppointmentRatedList()
.then((value) => {
//getToDoCount(),
Utils.hideProgressDialog(),
//Utils.hideProgressDialog(),
if (appointmentRateViewModel.isHaveAppointmentNotRate)
{
Navigator.pushAndRemoveUntil(
@ -517,7 +614,7 @@ class _AppDrawerState extends State<AppDrawer> {
})
.catchError((err) {
print(err);
Utils.hideProgressDialog();
//Utils.hideProgressDialog();
// GifLoaderDialogUtils.hideDialog(context);
});
}

@ -53,40 +53,42 @@ class _MobileNo extends State<MobileNo> {
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Container(
margin: EdgeInsets.only(bottom: 10.0),
height: 60.0,
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(
color: Colors.grey[400],
width: 1.0,
Expanded(
child: Container(
margin: EdgeInsets.only(bottom: 10.0),
height: 60.0,
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(
color: Colors.grey[400],
width: 1.0,
),
borderRadius: BorderRadius.circular(10),
),
borderRadius: BorderRadius.circular(10),
),
width: MediaQuery.of(context).size.width * 0.89,
child: Padding(
padding: EdgeInsets.all(10),
child: DropdownButtonHideUnderline(
child: DropdownButton(
isExpanded: true,
value: _selectedType,
iconSize: 40,
elevation: 16,
onChanged: (value) => {
widget.onCountryChange(value),
setState(() {
countryCode = value;
_selectedType = value;
})
},
items: widget.countries
.map<DropdownMenuItem<String>>((Countries value) {
return DropdownMenuItem<String>(
value: value.code,
child: Text(projectProvider.isArabic == true ? value.name_ar : value.name),
);
}).toList())))),
width: MediaQuery.of(context).size.width * 0.89,
child: Padding(
padding: EdgeInsets.all(10),
child: DropdownButtonHideUnderline(
child: DropdownButton(
isExpanded: true,
value: _selectedType,
iconSize: 40,
elevation: 16,
onChanged: (value) => {
widget.onCountryChange(value),
setState(() {
countryCode = value;
_selectedType = value;
})
},
items: widget.countries
.map<DropdownMenuItem<String>>((Countries value) {
return DropdownMenuItem<String>(
value: value.code,
child: Text(projectProvider.isArabic == true ? value.name_ar : value.name),
);
}).toList())))),
),
],
),
Container(

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save