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

# Conflicts:
#	ios/Flutter/.last_build_id
#	lib/config/config.dart
#	lib/core/service/medical/labs_service.dart
#	lib/pages/insurance/insurance_update_screen.dart
#	lib/pages/landing/home_page.dart
#	lib/pages/medical/medical_profile_page.dart
diplomatic-quarter-haroon
haroon amjad 4 years ago
commit afbd73363e

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

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
<g id="Group_1261" data-name="Group 1261" transform="translate(-148.52 -172.52)">
<path id="Path_1724" data-name="Path 1724" d="M9,0a9,9,0,0,1,9,9,9.18,9.18,0,0,1-1.863,5.483A8.844,8.844,0,0,1,9,18,9,9,0,0,1,9,0Z" transform="translate(148.52 172.52)" fill="#e6b71b"/>
<path id="hourglass_2_" data-name="hourglass (2)" d="M10.865,10.178H10.4V8.663a2.662,2.662,0,0,0-.88-1.977l-.783-.7a.578.578,0,0,1,0-.86l.783-.7a2.665,2.665,0,0,0,.88-1.978V.925h.463a.463.463,0,0,0,0-.925h-7.4a.463.463,0,0,0,0,.925h.463V2.439a2.662,2.662,0,0,0,.88,1.977l.783.7a.578.578,0,0,1,0,.86l-.783.7a2.665,2.665,0,0,0-.88,1.978v1.514H3.463a.463.463,0,1,0,0,.925h7.4a.463.463,0,0,0,0-.925ZM5.313,8.711a1.264,1.264,0,0,1,.373-.9L6.918,6.578a.347.347,0,0,1,.491,0L8.642,7.811a1.264,1.264,0,0,1,.373.9v1.467h-3.7Z" transform="translate(150.356 175.968)" fill="#fff"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 947 B

@ -0,0 +1,8 @@
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
<g id="Group_1261" data-name="Group 1261" transform="translate(-148.52 -172.52)">
<path id="Path_1724" data-name="Path 1724" d="M9,0a9,9,0,0,1,9,9,9.18,9.18,0,0,1-1.863,5.483A8.844,8.844,0,0,1,9,18,9,9,0,0,1,9,0Z" transform="translate(148.52 172.52)" fill="#5ab145"/>
<g id="check_4_" data-name="check (4)" transform="translate(151.64 177.596)">
<path id="Path_1722" data-name="Path 1722" d="M10.35,68.552l-5.79,5.79L1.411,71.193,0,72.6l4.56,4.56,7.2-7.2Z" transform="translate(0 -68.552)" fill="#fff"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 627 B

@ -45,7 +45,8 @@ const SEND_LAB_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendLabReportEmai
///
const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders';
const GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT = 'Services/Patients.svc/REST/GetPatientLabResultsByAppointmentNo';
const GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT =
'Services/Patients.svc/REST/GetPatientLabResultsByAppointmentNo';
const GET_PATIENT_ORDERS_DETAILS =
'Services/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead';
@ -269,6 +270,10 @@ const GET_PAtIENTS_INSURANCE_UPDATED =
"Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory";
const INSURANCE_DETAILS = "Services/Patients.svc/REST/Get_InsuranceCheckList";
const GET_PATIENT_INSURANCE_DETAILS =
"Services/Patients.svc/REST/PatientER_GetPatientInsuranceDetails";
const UPLOAD_INSURANCE_CARD =
'Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate';
const GET_VACCINES = "Services/Patients.svc/REST/GetDoneVaccinesByPatientID";
const GET_VACCINES_EMAIL = "Services/Notifications.svc/REST/SendVaccinesEmail";

@ -305,7 +305,7 @@ const Map localizedValues = {
"recieved-requests": {"en": "Recieved Requests", "ar": "الطلبات المستلمة"},
"manage-files": {"en": "Manage Family Files", "ar": "إدارة ملفات العائلة"},
'oxygenation': {'en': 'Oxygenation', 'ar': 'الأوكسجين'},
'bodyMeasurements': {'en': 'body Mass', 'ar': 'قياسات الجسم'},
'bodyMeasurements': {'en': 'body Mass Index', 'ar': 'مؤشر الكتلة'},
'temperature': {'en': 'Temperature', 'ar': 'درجة الحرارة'},
'pulse': {'en': 'Pulse', 'ar': 'النبض'},
'respiration': {'en': 'Respiration', 'ar': 'التنفس'},
@ -1207,4 +1207,88 @@ const Map localizedValues = {
"en": "The request has been submitted successfully",
"ar": "تم تنفيذ طلبك بنجاح"
},
"pulseTitle": {
"en": "Heart rate",
"ar": "معدل النبض بالدقيقة"
},
"systolic-lng": {
"en": "Systolic",
"ar": "الإنقباض"
},
"diastolic-lng": {
"en": "Diastolic",
"ar": "الإنبساط"
},
"policy-holder": {
"en": "Policy Holder",
"ar": "حامل بطاقة التأمين"
},
"policy-no": {
"en": "Policy Number",
"ar": "رقم سياسات"
},
"agree": {
"en": "I agree, this is the correct information",
"ar": "موافق، هذه المعلومات صحيحة"
},
"disagree": {
"en": "No, this is not the correct information",
"ar": "غير موافق، هذه المعلومات غير الصحيحة"
},
"expiry-date": {
"en": "Expiry Date",
"ar": "تاريخ انتهاء الصلاحية"
},
"class": {
"en": "Class",
"ar": "فئة"
},
"approval": {
"en": "Approval",
"ar": "موافقة"
},
"no-data": {
"en": "No data found",
"ar": "لاتوجد بيانات"
},
"insurance-details": {
"en": "Insurance Details",
"ar": "تفاصيل التأمين"
},
"nearest-hospital": {
"en": "Nearest Hospital",
"ar": "أقرب مستشفى"
},
"request-sent": {
"en": "Request sent successfully",
"ar": "تم إرسال الطلب بنجاح"
},
"message-sent": {
"en": "Message sent successfully",
"ar": "تم إرسال الرسالة بنجاح"
},
"sent-on": {
"en": "Sent on",
"ar": "أرسلت في"
},
"attach-insurace-image": {
"en": "Attach insurance card image",
"ar": "إرفاق صورة بطاقة التأمين"
},
"upload-without-image": {
"en": "You can still submit, if you don't have Insurance Image",
"ar": "لا يزال بإمكانك الإرسال ، إذا لم يكن لديك صورة تأمين"
},
"info-insur-cards": {
"en": "This service allows you to view all the insurance cards that recorded during your visits to Al Habib Medical Group in addition to:",
"ar": "خدمة بطاقات التامين: هذه الخدمة تمكنك من الاطلاع على جميع بطاقات التامين والتي تم تسجيلها اثناء زياراتك لمجموعة الحبيب الطبية بالاضافة الى:"
},
"scan-now": {
"en": "If you have a card / Document Scan now",
"ar": "إذا كانت لديك بطاقة / مستند ارفقها الان"
},
"liveCare": {
"en": "Live Care",
"ar": "لايف كير"
},
};

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

@ -132,7 +132,13 @@ class BaseAppClient {
} else if (parsed['MessageStatus'] == 1 ||
parsed['SMSLoginRequired'] == true) {
onSuccess(parsed, statusCode);
} else if (!parsed['IsAuthenticated']) {
}
else if(parsed['MessageStatus'] == 2 && parsed['IsAuthenticated']){
onFailure(
parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
statusCode);
}
else if (!parsed['IsAuthenticated']) {
await logout();
//helpers.showErrorToast('Your session expired Please login agian');
@ -151,7 +157,7 @@ class BaseAppClient {
onFailure('Please Check The Internet Connection', -1);
}
} catch (e) {
//print(e);
print(e);
//
if (e is String) {
onFailure(e.toString(), -1);
@ -166,7 +172,7 @@ class BaseAppClient {
await authenticatedUserObject.getUser();
Provider.of<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,15 +110,15 @@ class LabsService extends BaseService {
_requestSendLabReportEmail.invoiceNo = patientLabOrder.invoiceNo;
_requestSendLabReportEmail.doctorName = patientLabOrder.doctorName;
_requestSendLabReportEmail.clinicName = patientLabOrder.clinicDescription;
_requestSendLabReportEmail.patientName = user.firstName + user.lastName;
_requestSendLabReportEmail.patientName = user.firstName +" "+ user.lastName;
_requestSendLabReportEmail.patientIditificationNum =
user.patientIdentificationNo;
_requestSendLabReportEmail.dateofBirth = user.dateofBirth;
_requestSendLabReportEmail.to = user.emailAddress;
_requestSendLabReportEmail.orderDate =
'${patientLabOrder.orderDate.year}-${patientLabOrder.orderDate.month}-${patientLabOrder.orderDate.day}';
_requestSendLabReportEmail.orderDate = '${patientLabOrder.orderDate.year}-${patientLabOrder.orderDate.month}-${patientLabOrder.orderDate.day}';
_requestSendLabReportEmail.patientMobileNumber = user.mobileNumber;
_requestSendLabReportEmail.projectName = patientLabOrder.projectName;
_requestSendLabReportEmail.setupID = user.setupID;
await baseAppClient.post(SEND_LAB_REPORT_EMAIL,
onSuccess: (dynamic response, int statusCode) {

@ -25,6 +25,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;

@ -21,6 +21,7 @@ class WeatherService extends BaseService {
await baseAppClient.post(WEATHER_INDICATOR,
onSuccess: (dynamic response, int statusCode) {
weatherIndicatorData = [];
response['GetCityInfo_List'].forEach((data) {
weatherIndicatorData.add(GetCityInfoList.fromJson(data));
});

@ -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,7 +1,9 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import '../../locator.dart';
class DashboardViewModel extends BaseViewModel {
@ -10,7 +12,7 @@ class DashboardViewModel extends BaseViewModel {
String get weightKg => _vitalSignService.weightKg;
String get heightCm => _vitalSignService.heightCm;
String bloadType = "";
String booldType = "-";
// ToDoCountProviderModel toDoProvider =
// Provider.of<ToDoCountProviderModel>(AppGlobal.context);
@ -21,10 +23,11 @@ class DashboardViewModel extends BaseViewModel {
await _vitalSignService.getPatientRadOrders();
if (_vitalSignService.hasError) {
error = _vitalSignService.error;
setState(ViewState.Error);
} else
setState(ViewState.ErrorLocal);
} else {
booldType = await sharedPref.getString(BLOOD_TYPE) ?? "-";
setState(ViewState.Idle);
// getToDoCount();
}
}
}

@ -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);
@ -154,7 +150,7 @@ class MyBalanceViewModel extends BaseViewModel {
Future getFamilyFiles() async {
setState(ViewState.Busy);
await _myBalanceService.getSharedRecordByStatus();
await _myBalanceService.getFamilyFiles();
if (_myBalanceService.hasError) {
error = _myBalanceService.error;
setState(ViewState.ErrorLocal);

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

@ -24,7 +24,7 @@ class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
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;

@ -61,71 +61,72 @@ class AuthenticatedUser {
dynamic tempAddress;
dynamic zipCode;
dynamic isFamily;
dynamic cRSVerificationStatus;
// dynamic patientPayType;
// dynamic patientType;
// dynamic status;
AuthenticatedUser({
this.setupID,
this.patientType,
this.patientID,
this.firstName,
this.middleName,
this.lastName,
this.firstNameN,
this.middleNameN,
this.lastNameN,
this.relationshipID,
this.gender,
this.dateofBirth,
this.dateofBirthN,
this.nationalityID,
this.phoneResi,
this.phoneOffice,
this.mobileNumber,
this.faxNumber,
this.emailAddress,
this.bloodGroup,
this.rHFactor,
this.isEmailAlertRequired,
this.isSMSAlertRequired,
this.preferredLanguage,
this.isPrivilegedMember,
this.memberID,
this.expiryDate,
this.isHmgEmployee,
this.employeeID,
this.emergencyContactName,
this.emergencyContactNo,
this.patientPayType,
this.dHCCPatientRefID,
this.isPatientDummy,
this.status,
this.isStatusCleared,
this.patientIdentificationType,
this.patientIdentificationNo,
this.projectID,
this.infoSourceID,
this.address,
this.age,
this.ageDesc,
this.areaID,
this.createdBy,
this.genderDescription,
this.iR,
this.iSOCityID,
this.iSOCountryID,
this.listPrivilege,
this.marital,
this.outSA,
this.pOBox,
this.receiveHealthSummaryReport,
this.sourceType,
this.strDateofBirth,
this.tempAddress,
this.zipCode,
this.isFamily
});
AuthenticatedUser(
{this.setupID,
this.patientType,
this.patientID,
this.firstName,
this.middleName,
this.lastName,
this.firstNameN,
this.middleNameN,
this.lastNameN,
this.relationshipID,
this.gender,
this.dateofBirth,
this.dateofBirthN,
this.nationalityID,
this.phoneResi,
this.phoneOffice,
this.mobileNumber,
this.faxNumber,
this.emailAddress,
this.bloodGroup,
this.rHFactor,
this.isEmailAlertRequired,
this.isSMSAlertRequired,
this.preferredLanguage,
this.isPrivilegedMember,
this.memberID,
this.expiryDate,
this.isHmgEmployee,
this.employeeID,
this.emergencyContactName,
this.emergencyContactNo,
this.patientPayType,
this.dHCCPatientRefID,
this.isPatientDummy,
this.status,
this.isStatusCleared,
this.patientIdentificationType,
this.patientIdentificationNo,
this.projectID,
this.infoSourceID,
this.address,
this.age,
this.ageDesc,
this.areaID,
this.createdBy,
this.genderDescription,
this.iR,
this.iSOCityID,
this.iSOCountryID,
this.listPrivilege,
this.marital,
this.outSA,
this.pOBox,
this.receiveHealthSummaryReport,
this.sourceType,
this.strDateofBirth,
this.tempAddress,
this.zipCode,
this.isFamily,
this.cRSVerificationStatus});
AuthenticatedUser.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID'];
@ -193,6 +194,7 @@ class AuthenticatedUser {
tempAddress = json['TempAddress'];
zipCode = json['ZipCode'];
isFamily = json['IsFamily'];
cRSVerificationStatus = json['CRSVerificationStatus'];
}
Map<String, dynamic> toJson() {
@ -259,6 +261,7 @@ class AuthenticatedUser {
data['TempAddress'] = this.tempAddress;
data['ZipCode'] = this.zipCode;
data['IsFamily'] = this.isFamily;
data['CRSVerificationStatus'] = this.cRSVerificationStatus;
return data;
}
}

@ -329,67 +329,67 @@ class List {
dynamic strDateofBirth;
dynamic tempAddress;
dynamic zipCode;
List({
this.setupID,
this.patientType,
this.patientID,
this.firstName,
this.middleName,
this.lastName,
this.firstNameN,
this.middleNameN,
this.lastNameN,
this.relationshipID,
this.gender,
this.dateofBirth,
this.dateofBirthN,
this.nationalityID,
this.phoneResi,
this.phoneOffice,
this.mobileNumber,
this.faxNumber,
this.emailAddress,
this.bloodGroup,
this.rHFactor,
this.isEmailAlertRequired,
this.isSMSAlertRequired,
this.preferredLanguage,
this.isPrivilegedMember,
this.memberID,
this.expiryDate,
this.isHmgEmployee,
this.employeeID,
this.emergencyContactName,
this.emergencyContactNo,
this.patientPayType,
this.dHCCPatientRefID,
this.isPatientDummy,
this.status,
this.isStatusCleared,
this.patientIdentificationType,
this.patientIdentificationNo,
this.projectID,
this.infoSourceID,
this.address,
this.age,
this.ageDesc,
this.areaID,
this.createdBy,
this.genderDescription,
this.iR,
this.iSOCityID,
this.iSOCountryID,
this.listPrivilege,
this.marital,
this.outSA,
this.pOBox,
this.receiveHealthSummaryReport,
this.sourceType,
this.strDateofBirth,
this.tempAddress,
this.zipCode,
});
dynamic cRSVerificationStatus;
List(
{this.setupID,
this.patientType,
this.patientID,
this.firstName,
this.middleName,
this.lastName,
this.firstNameN,
this.middleNameN,
this.lastNameN,
this.relationshipID,
this.gender,
this.dateofBirth,
this.dateofBirthN,
this.nationalityID,
this.phoneResi,
this.phoneOffice,
this.mobileNumber,
this.faxNumber,
this.emailAddress,
this.bloodGroup,
this.rHFactor,
this.isEmailAlertRequired,
this.isSMSAlertRequired,
this.preferredLanguage,
this.isPrivilegedMember,
this.memberID,
this.expiryDate,
this.isHmgEmployee,
this.employeeID,
this.emergencyContactName,
this.emergencyContactNo,
this.patientPayType,
this.dHCCPatientRefID,
this.isPatientDummy,
this.status,
this.isStatusCleared,
this.patientIdentificationType,
this.patientIdentificationNo,
this.projectID,
this.infoSourceID,
this.address,
this.age,
this.ageDesc,
this.areaID,
this.createdBy,
this.genderDescription,
this.iR,
this.iSOCityID,
this.iSOCountryID,
this.listPrivilege,
this.marital,
this.outSA,
this.pOBox,
this.receiveHealthSummaryReport,
this.sourceType,
this.strDateofBirth,
this.tempAddress,
this.zipCode,
this.cRSVerificationStatus});
List.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID'];
@ -452,6 +452,7 @@ class List {
strDateofBirth = json['StrDateofBirth'];
tempAddress = json['TempAddress'];
zipCode = json['ZipCode'];
cRSVerificationStatus = json['CRSVerificationStatus'];
}
Map<String, dynamic> toJson() {
@ -516,7 +517,7 @@ class List {
data['StrDateofBirth'] = this.strDateofBirth;
data['TempAddress'] = this.tempAddress;
data['ZipCode'] = this.zipCode;
data['CRSVerificationStatus'] = this.cRSVerificationStatus;
return data;
}
}

@ -88,7 +88,7 @@ class Patientobject {
String sourceType;
String preferredLanguage;
String marital;
String eHealthIDField;
Patientobject(
{this.tempValue,
this.patientIdentificationType,
@ -96,11 +96,11 @@ class Patientobject {
this.mobileNumber,
this.patientOutSA,
this.firstName,
this.middleName,
this.lastName,
this.firstNameN,
this.middleNameN,
this.lastNameN,
this.middleName,
this.lastName,
this.firstNameN,
this.middleNameN,
this.lastNameN,
this.strDateofBirth,
this.dateofBirth,
this.gender,
@ -109,7 +109,8 @@ class Patientobject {
this.emailAddress,
this.sourceType,
this.preferredLanguage,
this.marital});
this.marital,
this.eHealthIDField});
Patientobject.fromJson(Map<String, dynamic> json) {
tempValue = json['TempValue'];
@ -133,6 +134,7 @@ class Patientobject {
preferredLanguage = json['PreferredLanguage'];
marital = json['Marital'];
eHealthIDField = json['eHealthIDField'];
}
Map<String, dynamic> toJson() {
@ -158,6 +160,7 @@ class Patientobject {
data['PreferredLanguage'] = this.preferredLanguage;
data['Marital'] = this.marital;
data['eHealthIDField'] = this.eHealthIDField;
return data;
}
}

@ -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,10 +1,11 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByClinic.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByDoctor.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/arrow_back.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'components/SearchByClinic.dart';
class Search extends StatefulWidget {
final int type;
final List clnicIds;
@ -29,34 +30,40 @@ class _SearchState extends State<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(

@ -33,6 +33,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
List<HospitalsModel> projectsList = [];
bool isMobileAppDentalAllow = false;
bool isLoaded = false;
bool isProjectLoaded = false;
@override
void initState() {
@ -55,6 +56,11 @@ class _SearchByClinicState extends State<SearchByClinic> {
onChanged: (bool value) {
setState(() {
nearestAppo = value;
print(nearestAppo);
if (nearestAppo)
getProjectsList();
else
isProjectLoaded = false;
});
},
),
@ -120,7 +126,8 @@ class _SearchByClinicState extends State<SearchByClinic> {
},
),
)),
isDentalSelectedAndSupported() == true || nearestAppo
isDentalSelectedAndSupported() == true ||
(nearestAppo && isProjectLoaded)
? Container(
height: 60.0,
decoration: BoxDecoration(
@ -177,25 +184,31 @@ class _SearchByClinicState extends State<SearchByClinic> {
});
});
getProjectsList();
GifLoaderDialogUtils.hideDialog(context);
} else {}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
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) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
@ -237,10 +250,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 =
@ -271,8 +280,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 {
@ -301,6 +308,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
List<DoctorList> docList,
List<PatientDoctorAppointmentList>
patientDoctorAppointmentListHospital) async {
isProjectLoaded = false;
Navigator.push(
context,
MaterialPageRoute(

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

@ -43,9 +43,9 @@ class _AmbulanceReqState extends State<AmbulanceReq>
Widget build(BuildContext context) {
imagesInfo.add(ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/Ambulance/en/0.png',
'https://hmgwebservices.com/Images/MobileAppDq/Ambulance/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/Ambulance/ar/0.png'));
'https://hmgwebservices.com/Images/MobileAppDq/Ambulance/ar/0.png'));
return BaseView<AmRequestViewModel>(
onModelReady: (model) => model.getAmRequestOrders(),

@ -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,14 +24,15 @@ 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,);
controller = CountdownTimerController(
endTime: endTime,
);
}
@override
@ -54,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: controller,
widgetBuilder: (_, CurrentRemainingTime time) {
return Text(
'${time.days}:${time.hours}:${time.min}:${time.sec} ' +
TranslationBase.of(context)
.upcomingTimeLeft,
style: TextStyle(
fontSize: 12.0,
color: Color(0xff40ACC9)));
},
),
)
: Container(),
],
Container(
margin: EdgeInsets.only(top: 3.0),
child: Text(widget.appo.clinicName,
style: TextStyle(
fontSize: 12.0,
color: Colors.grey[600],
letterSpacing: 1.0)),
),
Container(
margin: EdgeInsets.only(top: 3.0),
child: Text(widget.appo.projectName,
style: TextStyle(
fontSize: 12.0,
color: Colors.grey[600],
letterSpacing: 1.0)),
),
Container(
margin: EdgeInsets.only(top: 3.0, bottom: 3.0),
child: Text(
DateUtil.getWeekDayMonthDayYearDateFormatted(
DateUtil.convertStringToDate(
widget.appo.appointmentDate),
projectViewModel.isArabic ? "ar" : "en")
.trim(),
style: TextStyle(
fontSize: 12.0,
color: Colors.grey[600],
letterSpacing: 1.0)),
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisSize: MainAxisSize.max,
children: <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,8 +11,8 @@ import 'package:diplomaticquarterapp/pages/BookAppointment/QRCode.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/AppointmentDetails.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/widgets/paymentDialog.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
@ -64,11 +64,11 @@ class _ToDoState extends State<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,);
controller = CountdownTimerController(endTime: endTime);
}
@override
@ -118,11 +118,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
@ -233,18 +237,26 @@ class _ToDoState extends State<ToDo> {
),
Container(
child: CountdownTimer(
controller: controller,
controller: new CountdownTimerController(
endTime: DateTime.now()
.millisecondsSinceEpoch +
(widget.appoList[index]
.remaniningHoursTocanPay *
1000) *
60),
widgetBuilder:
(_, CurrentRemainingTime time) {
return Text(
'${time.days}:${time.hours}:${time.min}:${time.sec} ' +
TranslationBase.of(
context)
.upcomingTimeLeft,
style: TextStyle(
fontSize: 12.0,
color:
Color(0xff40ACC9)));
return time != null
? Text(
'${time.days}:${time.hours}:${time.min}:${time.sec} ' +
TranslationBase.of(
context)
.upcomingTimeLeft,
style: TextStyle(
fontSize: 12.0,
color: Color(
0xff40ACC9)))
: Container();
},
),
),
@ -525,23 +537,11 @@ class _ToDoState extends State<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(() {
@ -551,9 +551,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);
}
});
}
}

@ -102,7 +102,7 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
controller: _tabController,
children: <Widget>[
Container(
child: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList != null && model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.isNotEmpty
child: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.isNotEmpty
? ListView.builder(
itemCount: model.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList.length,

@ -26,6 +26,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import '../../widgets/data_display/medical/LabResult/LineChartCurved.dart';
@ -43,7 +44,6 @@ class HomePage extends StatefulWidget {
class _HomePageState extends State<HomePage> {
ToDoCountProviderModel toDoProvider;
AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
@ -54,7 +54,6 @@ class _HomePageState extends State<HomePage> {
return BaseView<DashboardViewModel>(
onModelReady: (model) => model.getPatientRadOrders(),
builder: (_, model, wi) => AppScaffold(
isShowDecPage: false,
body: Container(
width: double.infinity,
@ -82,15 +81,19 @@ class _HomePageState extends State<HomePage> {
left: 5,
right: 5,
child: Container(
width: MediaQuery.of(context).size.width * 0.8,
width:
MediaQuery.of(context).size.width * 0.8,
child: Container(),
),
)
],
),
),
Container(width: double.infinity, height:projectViewModel.isArabic ? MediaQuery.of(context).size.width * 0.3 :110),
Container(
width: double.infinity,
height: projectViewModel.isArabic
? MediaQuery.of(context).size.width * 0.3
: 110),
],
),
Positioned(
@ -105,7 +108,7 @@ class _HomePageState extends State<HomePage> {
Orientation.landscape
? 0.02
: 0.03),
child: (!model.isLogin )
child: (!model.isLogin)
? Container(
width: double.infinity,
height: 160,
@ -174,7 +177,6 @@ class _HomePageState extends State<HomePage> {
color: Theme.of(context)
.primaryColor,
fontSize: 14,
),
),
),
@ -208,7 +210,8 @@ class _HomePageState extends State<HomePage> {
children: <Widget>[
Row(
children: <Widget>[
if (model.user != null && model.isLogin)
if (projectViewModel.user != null &&
model.isLogin)
Expanded(
child: Column(
crossAxisAlignment:
@ -217,16 +220,34 @@ class _HomePageState extends State<HomePage> {
SizedBox(
height: 8,
),
Texts(
model.user.firstName +
" " +
model.user.lastName,
color: Colors.grey[100],
bold: true,
fontSize: 15,
Row(
children: [
Texts(
projectViewModel.user
.firstName +
" " +
projectViewModel
.user.lastName,
color: Colors.grey[100],
bold: true,
fontSize: 15,
),
projectViewModel.user
.cRSVerificationStatus ==
2
? SvgPicture.asset(
'assets/images/svg/verification_check.svg')
: projectViewModel
.user
.cRSVerificationStatus ==
3
? SvgPicture.asset(
'assets/images/svg/pending.svg')
: SizedBox()
],
),
Texts(
'${model.user.patientID}',
'${projectViewModel.user.patientID}',
color: Colors.white,
fontSize: 14,
),
@ -234,7 +255,7 @@ class _HomePageState extends State<HomePage> {
height: 5,
),
Texts(
'${DateUtil.getMonthDayYearDateFormatted(model.user.dateofBirthDataTime)} ,${model.user.genderDescription} ${model.user.ageDesc}',
'${DateUtil.getMonthDayYearDateFormatted(projectViewModel.user.dateofBirthDataTime)} ,${projectViewModel.user.genderDescription} ${projectViewModel.user.ageDesc}',
color: Colors.grey[100],
fontWeight:
FontWeight.normal,
@ -266,7 +287,8 @@ class _HomePageState extends State<HomePage> {
),
child: Center(
child: Texts(
TranslationBase.of(context).myMedicalFile,
TranslationBase.of(context)
.myMedicalFile,
color: Theme.of(context)
.primaryColor,
fontSize: 12,
@ -301,7 +323,9 @@ class _HomePageState extends State<HomePage> {
bold: true,
),
Texts(
TranslationBase.of(context).height,
TranslationBase.of(
context)
.height,
color: Colors.white,
fontSize: 10,
),
@ -333,7 +357,9 @@ class _HomePageState extends State<HomePage> {
bold: true,
),
Texts(
TranslationBase.of(context).weight,
TranslationBase.of(
context)
.weight,
color: Colors.white,
fontSize: 10,
)
@ -347,8 +373,10 @@ class _HomePageState extends State<HomePage> {
),
Expanded(
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[
Image.asset(
'assets/images/blood-drop.png',
@ -358,11 +386,16 @@ class _HomePageState extends State<HomePage> {
Column(
children: [
Texts(
'${model.bloadType}',
'${model.booldType}',
color: Colors.white,
fontSize: 14,
fontWeight:
FontWeight.bold,
),
Texts(
TranslationBase.of(context).bloodType,
TranslationBase.of(
context)
.bloodType,
color: Colors.white,
fontSize: 10,
)
@ -401,28 +434,35 @@ class _HomePageState extends State<HomePage> {
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
SizedBox(height: 15,),
SizedBox(
height: 15,
),
Container(
width: 60,
decoration: BoxDecoration(
color: Colors.white,
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(12)
),
child: Center(child: Image.asset('assets/images/vital_sign_icon.png',
borderRadius:
BorderRadius.circular(12)),
child: Center(
child: Image.asset(
'assets/images/medical/vital_sign_icon.png',
width: 80,
height: 50,
fit: BoxFit.contain,)),
fit: BoxFit.contain,
)),
),
SizedBox(
height: 20,
),
SizedBox(height: 20,),
Texts(
TranslationBase.of(context)
.vitalSigns,
TranslationBase.of(context).vitalSigns,
textAlign: TextAlign.center,
color: Colors.white,
bold: true,
fontSize: projectViewModel.isArabic? SizeConfig.textMultiplier * 1.5 :SizeConfig.textMultiplier * 1.7,
fontSize: projectViewModel.isArabic
? SizeConfig.textMultiplier * 1.5
: SizeConfig.textMultiplier * 1.7,
)
],
),
@ -450,26 +490,35 @@ class _HomePageState extends State<HomePage> {
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
SizedBox(height: 15,),
SizedBox(
height: 15,
),
Container(
width: 50,
decoration: BoxDecoration(
color: Colors.white,
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(12)
),
child: Center(child: Image.asset('assets/images/search_medicine_icon.png',
borderRadius:
BorderRadius.circular(12)),
child: Center(
child: Image.asset(
'assets/images/search_medicine_icon.png',
width: 50,
height: 50,
fit: BoxFit.contain,)),
fit: BoxFit.contain,
)),
),
SizedBox(
height: 20,
),
SizedBox(height: 20,),
Texts(
TranslationBase.of(context).searchMedicine,
textAlign: TextAlign.center,
color: Colors.white,
bold: true,
fontSize: projectViewModel.isArabic? SizeConfig.textMultiplier * 1.5 :SizeConfig.textMultiplier * 1.7,
fontSize: projectViewModel.isArabic
? SizeConfig.textMultiplier * 1.5
: SizeConfig.textMultiplier * 1.7,
)
],
),
@ -481,8 +530,9 @@ class _HomePageState extends State<HomePage> {
),
),
Expanded(
child: DashboardItem(opacity: 1.0,
onTap: (){
child: DashboardItem(
opacity: 1.0,
onTap: () {
Navigator.push(
context,
FadePage(
@ -495,25 +545,35 @@ class _HomePageState extends State<HomePage> {
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
SizedBox(height: 15,),
SizedBox(
height: 15,
),
Container(
decoration: BoxDecoration(
color: Colors.white,
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(12)
),
child: Center(child: Image.asset('assets/images/online_payment_icon.png',
borderRadius:
BorderRadius.circular(12)),
child: Center(
child: Image.asset(
'assets/images/online_payment_icon.png',
width: 80,
height: 50,
fit: BoxFit.contain,)),
fit: BoxFit.contain,
)),
),
SizedBox(
height: 15,
),
SizedBox(height: 15,),
Texts(
TranslationBase.of(context).onlinePaymentService,
TranslationBase.of(context)
.onlinePaymentService,
textAlign: TextAlign.center,
color: Colors.white,
bold: true,
fontSize: projectViewModel.isArabic? SizeConfig.textMultiplier * 1.5 :SizeConfig.textMultiplier * 1.7,
fontSize: projectViewModel.isArabic
? SizeConfig.textMultiplier * 1.5
: SizeConfig.textMultiplier * 1.7,
)
],
),
@ -527,7 +587,9 @@ class _HomePageState extends State<HomePage> {
],
),
),
SizedBox(height: 8,),
SizedBox(
height: 8,
),
// Padding(
// padding: const EdgeInsets.all(8.0),
// child: LineChartSample1(),
@ -554,18 +616,19 @@ class _HomePageState extends State<HomePage> {
);
},
child: MedicalProfileItem(
title: TranslationBase.of(context)
.myAppointments,
title:
TranslationBase.of(context).myAppointments,
imagePath: 'my_appointment_icon.png',
subTitle: TranslationBase.of(context).myAppointmentsList,
subTitle: TranslationBase.of(context)
.myAppointmentsList,
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () => Navigator.push(context,
FadePage(page: LabsHomePage())),
onTap: () => Navigator.push(
context, FadePage(page: LabsHomePage())),
child: MedicalProfileItem(
title: TranslationBase.of(context).lab,
imagePath: 'lab_result_icon.png',
@ -577,11 +640,10 @@ class _HomePageState extends State<HomePage> {
Expanded(
flex: 1,
child: InkWell(
onTap: () => Navigator.push(context,
FadePage(page: RadiologyHomePage())),
onTap: () => Navigator.push(
context, FadePage(page: RadiologyHomePage())),
child: MedicalProfileItem(
title: TranslationBase.of(context)
.radiology,
title: TranslationBase.of(context).radiology,
imagePath: 'radiology_icon.png',
subTitle: TranslationBase.of(context)
.radiologySubtitle,
@ -604,8 +666,7 @@ class _HomePageState extends State<HomePage> {
);
},
child: MedicalProfileItem(
title: TranslationBase.of(context)
.medicines,
title: TranslationBase.of(context).medicines,
imagePath: 'prescription_icon.png',
subTitle: TranslationBase.of(context)
.medicinesSubtitle,
@ -624,8 +685,7 @@ class _HomePageState extends State<HomePage> {
);
},
child: MedicalProfileItem(
title: TranslationBase.of(context)
.myDoctor,
title: TranslationBase.of(context).myDoctor,
imagePath: 'doctor_icon.png',
subTitle: TranslationBase.of(context)
.myDoctorSubtitle,
@ -636,12 +696,11 @@ class _HomePageState extends State<HomePage> {
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(context,
FadePage(page: InsuranceCard()));
Navigator.push(
context, FadePage(page: InsuranceCard()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context)
.insurance,
title: TranslationBase.of(context).insurance,
imagePath: 'insurance_card_icon.png',
subTitle: TranslationBase.of(context)
.insuranceSubtitle,
@ -650,7 +709,6 @@ class _HomePageState extends State<HomePage> {
),
],
),
],
),
),
@ -663,7 +721,7 @@ class _HomePageState extends State<HomePage> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
DashboardItem(
opacity:1.0,
opacity: 1.0,
child: Container(
width: double.infinity,
padding: EdgeInsets.all(10),
@ -676,7 +734,8 @@ class _HomePageState extends State<HomePage> {
bold: true,
),
Texts(
TranslationBase.of(context).viewAllHabibMedicalService,
TranslationBase.of(context)
.viewAllHabibMedicalService,
color: Colors.white,
fontWeight: FontWeight.normal,
fontSize: 10,
@ -694,13 +753,17 @@ class _HomePageState extends State<HomePage> {
),
height: 112,
imageName: 'ask_doctor_bg.png',
//color: Colors.grey[700],
//color: Colors.grey[700],
width: MediaQuery.of(context).size.width * 0.45,
onTap: () => Navigator.push(
context, FadePage(page: AllHabibMedicalService(goToMyProfile: widget.goToMyProfile,))),
context,
FadePage(
page: AllHabibMedicalService(
goToMyProfile: widget.goToMyProfile,
))),
),
DashboardItem(
opacity:1.0,
opacity: 1.0,
onTap: () {
Navigator.push(
context, FadePage(page: ContactUsPage()));
@ -720,7 +783,7 @@ class _HomePageState extends State<HomePage> {
TranslationBase.of(context).viewAllWaysReachUs,
color: Colors.white,
fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 1.0 ,
fontSize: SizeConfig.textMultiplier * 1.0,
),
Expanded(
child: Container(),

@ -14,6 +14,8 @@ import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/pages/livecare/incoming_call.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart'
as family;
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/theme/theme_notifier.dart';
import 'package:diplomaticquarterapp/theme/theme_value.dart';
@ -60,7 +62,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
final FirebaseMessaging _firebaseMessaging = FirebaseMessaging();
final authService = new AuthProvider();
var event = RobotProvider();
var familyFileProvider = family.FamilyFilesProvider();
void _requestIOSPermissions() {
flutterLocalNotificationsPlugin
.resolvePlatformSpecificImplementation<
@ -152,7 +154,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
_firebaseMessaging.getToken().then((String token) async {
sharedPref.setString(PUSH_TOKEN, token);
if (token != null && await sharedPref.getObject(USER_PROFILE) == null) {
if (token != null && projectViewModel.isLogin == false) {
DEVICE_TOKEN = token;
checkUserStatus(token);
} else if (projectViewModel.isLogin) {
@ -516,14 +518,15 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
// );
// themeNotifier.setTheme(defaultTheme);
}
void checkUserStatus(token) async {
//GifLoaderDialogUtils.showMyDialog(context);
authService
.selectDeviceImei(token)
.then((SelectDeviceIMEIRES value) => setUserValues(value))
.catchError((err) {
//GifLoaderDialogUtils.hideDialog(context);
});
void checkUserStatus(token, {isLoader = true}) async {
if (isLoader)
//GifLoaderDialogUtils.showMyDialog(context);
authService
.selectDeviceImei(token)
.then((SelectDeviceIMEIRES value) => setUserValues(value))
.catchError((err) {
//GifLoaderDialogUtils.hideDialog(context);
});
}
static Future<dynamic> myBackgroundMessageHandler(
@ -560,9 +563,25 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
if (data != null) {
Navigator.of(context).pushNamed(CONFIRM_LOGIN);
} else {
Navigator.of(context).pushNamed(
WELCOME_LOGIN,
);
GifLoaderDialogUtils.showMyDialog(context);
authService
.selectDeviceImei(DEVICE_TOKEN)
.then((SelectDeviceIMEIRES value) {
GifLoaderDialogUtils.hideDialog(context);
if (value != null) {
setUserValues(value);
Navigator.of(context).pushNamed(CONFIRM_LOGIN);
} else {
Navigator.of(context).pushNamed(
WELCOME_LOGIN,
);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
Navigator.of(context).pushNamed(
WELCOME_LOGIN,
);
});
}
}
@ -587,6 +606,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
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(
@ -540,6 +545,9 @@ class _ConfirmLogin extends State<ConfirmLogin> {
.catchError((err) {
print(err);
GifLoaderDialogUtils.hideDialog(context);
Future.delayed(Duration(seconds: 1), () {
AppToast.showErrorToast(message: err);
});
});
}
@ -573,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()
@ -621,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(
@ -647,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>[
@ -659,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,
)
],
),
@ -674,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(
@ -703,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>[
@ -738,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(
@ -752,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,

@ -99,6 +99,7 @@ class _Login extends State<Login> {
textDirection: TextDirection.ltr,
child: Container(
child: TextFields(
keyboardType: TextInputType.number,
fontWeight: FontWeight.normal,
controller: nationalIDorFile,
onChanged: (value) => {validateForm()},
@ -240,50 +241,49 @@ class _Login extends State<Login> {
request['PatientID'] = int.parse(nationalIDorFile.text);
}
// request.isRegister = false;
this.authService.checkActivationCode(request, code).then((result) async{
sharedPref.remove(FAMILY_FILE);
result = CheckActivationCode.fromJson(result);
result.list.isFamily = false;
// this.sharedPref.setString(BLOOD_TYPE, result['PatientBloodType']),
this.sharedPref.setObject(USER_PROFILE, result.list);
this.sharedPref.setObject(MAIN_USER, result.list);
this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID);
this.sharedPref.setString(TOKEN, result.authenticationTokenID);
await authenticatedUserObject.getUser(getUser: true);
authenticatedUserObject.isLogin = true;
appointmentRateViewModel.isLogin = true;
projectViewModel.isLogin = true;
projectViewModel.user = authenticatedUserObject.user;
appointmentRateViewModel
.getIsLastAppointmentRatedList()
.then((value) => {
getToDoCount(),
GifLoaderDialogUtils.hideDialog(context),
if (appointmentRateViewModel.isHaveAppointmentNotRate)
{
Navigator.pushAndRemoveUntil(
context,
FadePage(
page: RateAppointmentDoctor(),
),
(r) => false)
}
else
{
Navigator.pushAndRemoveUntil(
context,
FadePage(
page: LandingPage(),
),
(r) => false)
}
})
.catchError((err) {
print(err);
GifLoaderDialogUtils.hideDialog(context);
});
});
this.authService.checkActivationCode(request, code).then((result) async {
sharedPref.remove(FAMILY_FILE);
result = CheckActivationCode.fromJson(result);
result.list.isFamily = false;
// this.sharedPref.setString(BLOOD_TYPE, result['PatientBloodType']),
this.sharedPref.setObject(USER_PROFILE, result.list);
this.sharedPref.setObject(MAIN_USER, result.list);
this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID);
this.sharedPref.setString(TOKEN, result.authenticationTokenID);
await authenticatedUserObject.getUser(getUser: true);
authenticatedUserObject.isLogin = true;
appointmentRateViewModel.isLogin = true;
projectViewModel.isLogin = true;
projectViewModel.user = authenticatedUserObject.user;
appointmentRateViewModel
.getIsLastAppointmentRatedList()
.then((value) => {
getToDoCount(),
GifLoaderDialogUtils.hideDialog(context),
if (appointmentRateViewModel.isHaveAppointmentNotRate)
{
Navigator.pushAndRemoveUntil(
context,
FadePage(
page: RateAppointmentDoctor(),
),
(r) => false)
}
else
{
Navigator.pushAndRemoveUntil(
context,
FadePage(
page: LandingPage(),
),
(r) => false)
}
})
.catchError((err) {
print(err);
GifLoaderDialogUtils.hideDialog(context);
});
});
}
getToDoCount() {

@ -52,9 +52,9 @@ class _RegisterInfo extends State<RegisterInfo> {
String location = '1';
AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
locator<AuthenticatedUserObject>();
AppointmentRateViewModel appointmentRateViewModel =
locator<AppointmentRateViewModel>();
locator<AppointmentRateViewModel>();
ProjectViewModel projectViewModel;
@override
@ -291,36 +291,35 @@ class _RegisterInfo extends State<RegisterInfo> {
dynamic request = getTempUserRequest();
GifLoaderDialogUtils.showMyDialog(context);
this.authService.registerUser(request).then((result) => {
GifLoaderDialogUtils.hideDialog(context),
GifLoaderDialogUtils.hideDialog(context),
// userData = result.list;
//AuthenticatedUser.fromJson(result['List'][0]),
if(result is String){
new ConfirmDialog(
context: context,
confirmMessage: result,
okText: TranslationBase.of(context).ok,
cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () => {
ConfirmDialog.closeAlertDialog(context)
},
cancelFunction: () => {ConfirmDialog.closeAlertDialog(context)})
.showAlertDialog(context)
}else
{
sharedPref.remove(FAMILY_FILE),
result['List'][0]['IsFamily'] = false,
sharedPref.setObject(USER_PROFILE, result['List'][0]),
this.sharedPref.setObject(MAIN_USER, result['List'][0]),
sharedPref.setObject(LOGIN_TOKEN_ID, result["LogInTokenID"]),
sharedPref.setString(TOKEN, result["AuthenticationTokenID"]),
authenticatedUserObject.isLogin = true,
appointmentRateViewModel.isLogin = true,
projectViewModel.isLogin = true,
Navigator.of(context).pushNamed(HOME),
AppToast.showSuccessToast(message: result["ErrorEndUserMessage"])
}
if (result is String)
{
new ConfirmDialog(
context: context,
confirmMessage: result,
okText: TranslationBase.of(context).ok,
cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () => {ConfirmDialog.closeAlertDialog(context)},
cancelFunction: () => {
ConfirmDialog.closeAlertDialog(context)
}).showAlertDialog(context)
}
else
{
sharedPref.remove(FAMILY_FILE),
result['List'][0]['IsFamily'] = false,
sharedPref.setObject(USER_PROFILE, result['List'][0]),
this.sharedPref.setObject(MAIN_USER, result['List'][0]),
sharedPref.setObject(LOGIN_TOKEN_ID, result["LogInTokenID"]),
sharedPref.setString(TOKEN, result["AuthenticationTokenID"]),
authenticatedUserObject.isLogin = true,
appointmentRateViewModel.isLogin = true,
projectViewModel.isLogin = true,
Navigator.of(context).pushNamed(HOME),
AppToast.showSuccessToast(message: result["ErrorEndUserMessage"])
}
});
// .catchError((err) {
// GifLoaderDialogUtils.hideDialog(context);
@ -366,12 +365,16 @@ class _RegisterInfo extends State<RegisterInfo> {
"PatientIdentificationNo": registerInfo.idNumber,
"MobileNumber": registerd_data.patientMobileNumber,
"PatientOutSA": registerd_data.zipCode == '966' ? 0 : 1,
"FirstNameN":registerInfo.firstNameAr =='-' ?"": registerInfo.firstNameAr,
"FirstName": registerInfo.firstNameEn =='-' ?"":registerInfo.firstNameEn,
"MiddleNameN":registerInfo.secondNameAr,
"MiddleName":registerInfo.secondNameEn,
"LastNameN": registerInfo.lastNameAr =='-'? "" : registerInfo.lastNameAr,
"LastName": registerInfo.lastNameEn =='-' ? "": registerInfo.lastNameEn,
"FirstNameN":
registerInfo.firstNameAr == '-' ? "" : registerInfo.firstNameAr,
"FirstName":
registerInfo.firstNameEn == '-' ? "" : registerInfo.firstNameEn,
"MiddleNameN": registerInfo.secondNameAr,
"MiddleName": registerInfo.secondNameEn,
"LastNameN":
registerInfo.lastNameAr == '-' ? "" : registerInfo.lastNameAr,
"LastName":
registerInfo.lastNameEn == '-' ? "" : registerInfo.lastNameEn,
"StrDateofBirth": registerInfo.dateOfBirth,
"DateofBirth": DateUtil.convertISODateToJsonDate(
registerInfo.dateOfBirth.replaceAll('/', '-')),
@ -386,6 +389,7 @@ class _RegisterInfo extends State<RegisterInfo> {
: registerInfo.maritalStatusCode == 'M'
? '1'
: '2',
"eHealthIDField": registerInfo.healthId
},
"PatientIdentificationID": registerInfo.idNumber,
"PatientMobileNumber": registerd_data.patientMobileNumber,

@ -50,135 +50,136 @@ class _Register extends State<Register> {
isShowAppBar: true,
isShowDecPage: false,
body: SingleChildScrollView(
child: Container(
padding:
EdgeInsets.only(top: 10, left: 20, right: 20, bottom: 30),
height: SizeConfig.realScreenHeight * .9,
width: SizeConfig.realScreenWidth,
child: Column(children: <Widget>[
Expanded(
flex: 1,
child: AppText(
TranslationBase.of(context).enterNationalId,
fontSize: SizeConfig.textMultiplier * 3,
textAlign: TextAlign.left,
)),
Expanded(
flex: 4,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
MobileNo(
onNumberChange: (value) =>
{mobileNo = value, validateForm()},
onCountryChange: (value) => countryCode = value),
Directionality(
textDirection:TextDirection.ltr,child:Container(
child: TextFields(
controller: nationalIDorFile,
onChanged: (value) => validateForm(),
prefixIcon:
Icon(Icons.chrome_reader_mode, color: Color(0xFF40ACC9)),
padding: EdgeInsets.only(
top: 20, bottom: 20, left: 10, right: 10),
hintText: TranslationBase.of(context).nationalID,
))),
Row(
child: Container(
padding: EdgeInsets.only(top: 10, left: 20, right: 20, bottom: 30),
height: SizeConfig.realScreenHeight * .9,
width: SizeConfig.realScreenWidth,
child: Column(children: <Widget>[
Expanded(
flex: 1,
child: AppText(
TranslationBase.of(context).enterNationalId,
fontSize: SizeConfig.textMultiplier * 3,
textAlign: TextAlign.left,
)),
Expanded(
flex: 4,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
MobileNo(
onNumberChange: (value) =>
{mobileNo = value, validateForm()},
onCountryChange: (value) => countryCode = value),
Directionality(
textDirection: TextDirection.ltr,
child: Container(
child: TextFields(
controller: nationalIDorFile,
onChanged: (value) => validateForm(),
keyboardType: TextInputType.number,
prefixIcon: Icon(Icons.chrome_reader_mode,
color: Color(0xFF40ACC9)),
padding: EdgeInsets.only(
top: 20, bottom: 20, left: 10, right: 10),
hintText: TranslationBase.of(context).nationalID,
))),
Row(
children: <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 {
@ -216,7 +217,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,
@ -224,15 +226,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);
});
}
@ -257,7 +257,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'],
@ -308,7 +308,7 @@ class _Register extends State<Register> {
request.isHijri = isHijri;
request.patientOutSA = countryCode == '966' ? 0 : 1;
this.authService.checkUserStatus(request).then((result) => {
GifLoaderDialogUtils.hideDialog(context),
GifLoaderDialogUtils.hideDialog(context),
if (result is Map)
{
result = CheckUserStatusResponse.fromJson(result),

@ -11,7 +11,7 @@ class AllergiesPage extends StatelessWidget {
List<ImagesInfo> imagesInfo = List();
@override
Widget build(BuildContext context) {
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/alllergies/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/alllergies/ar/0.png'));
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/alllergies/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/alllergies/ar/0.png'));
return BaseView<AllergiesViewModel>(
onModelReady: (model) => model.getAllergies(),
builder: (_, model, w) => AppScaffold(

@ -58,9 +58,9 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
getAuthUser();
imagesInfo.add(ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/images-info-home/advance-payment/en/0.png',
'https://hmgwebservices.com/Images/MobileAppDq/images-info-home/advance-payment/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/images-info-home/advance-payment/ar/0.png'));
'https://hmgwebservices.com/Images/MobileAppDq/images-info-home/advance-payment/ar/0.png'));
}
@override
@ -214,6 +214,7 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
SizedBox(
height: 12,
),
if(model.user!=null)
NewTextFields(
hintText: TranslationBase.of(context).depositorEmail,
initialValue: model.user.emailAddress,
@ -236,7 +237,7 @@ class _AdvancePaymentPageState extends State<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(

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

@ -19,8 +19,8 @@ class DoctorHomePage extends StatelessWidget {
List<ImagesInfo> imagesInfo = List();
@override
Widget build(BuildContext context) {
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-doctor/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-doctor/ar/0.png'));
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-doctor/en/1.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-doctor/ar/1.png'));
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/my-doctor/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/my-doctor/ar/0.png'));
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/my-doctor/en/1.png',imageAr: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/my-doctor/ar/1.png'));
return BaseView<MyDoctorViewModel>(
onModelReady: (model) => model.getMyDoctor(),
builder: (context, MyDoctorViewModel model, widget) => AppScaffold(
@ -48,7 +48,7 @@ class DoctorHomePage extends StatelessWidget {
leading: Radio(
value: FilterType.Clinic,
groupValue: model.filterType,
activeColor: Colors.red[800],
activeColor:Theme.of(context).primaryColor,
onChanged: (FilterType value) {
model.setFilterType(value);
},
@ -65,7 +65,7 @@ class DoctorHomePage extends StatelessWidget {
leading: Radio(
value: FilterType.Hospital,
groupValue: model.filterType,
activeColor: Colors.red[800],
activeColor: Theme.of(context).primaryColor,
onChanged: (FilterType value) =>
model.setFilterType(value),
),

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

@ -6,10 +6,12 @@ import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_card_screen.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/reports/report_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
@ -220,16 +222,16 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
Navigator.push(
context,
FadePage(
page: DoctorHomePage(),
page: HomePrescriptionsPage(),
),
);
},
child: MedicalProfileItem(
title: TranslationBase.of(context)
.myDoctor,
imagePath: 'doctor_icon.png',
.medicines,
imagePath: 'prescription_icon.png',
subTitle: TranslationBase.of(context)
.myDoctorSubtitle,
.medicinesSubtitle,
),
),
),
@ -237,19 +239,15 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: HomePrescriptionsPage(),
),
);
Navigator.push(context,
FadePage(page: VitalSignDetailsScreen()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context)
.medicines,
imagePath: 'prescription_icon.png',
.vitalSigns,
imagePath: 'vital_sign_icon.png',
subTitle: TranslationBase.of(context)
.medicinesSubtitle,
.vitalSignsSubtitle,
),
),
),
@ -258,14 +256,14 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
child: InkWell(
onTap: () {
Navigator.push(context,
FadePage(page: InsuranceCard()));
FadePage(page: HomeReportPage()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context)
.insurance,
imagePath: 'insurance_card_icon.png',
title:
TranslationBase.of(context).medical,
imagePath: 'medical_reports_icon.png',
subTitle: TranslationBase.of(context)
.insuranceSubtitle,
.medicalSubtitle,
),
),
),
@ -273,6 +271,26 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
),
Row(
children: <Widget>[
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: DoctorHomePage(),
),
);
},
child: MedicalProfileItem(
title: TranslationBase.of(context)
.myDoctor,
imagePath: 'doctor_icon.png',
subTitle: TranslationBase.of(context)
.myDoctorSubtitle,
),
),
),
Expanded(
flex: 1,
child: InkWell(
@ -304,25 +322,7 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: InsuranceApproval()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context)
.insurance,
imagePath:
'insurance_approvals_icon.png',
subTitle: TranslationBase.of(context)
.insuranceApprovalSubtitle,
),
),
),
],
),
Row(children: <Widget>[
@ -331,22 +331,50 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
child: InkWell(
onTap: () {
Navigator.push(context,
FadePage(page: HomeReportPage()));
FadePage(page: InsuranceCard()));
},
child: MedicalProfileItem(
title:
TranslationBase.of(context).medical,
imagePath: 'medical_reports_icon.png',
title: TranslationBase.of(context)
.insurance,
imagePath: 'insurance_card_icon.png',
subTitle: TranslationBase.of(context)
.medicalSubtitle,
.insuranceSubtitle,
),
),
),
Expanded(
child: Container(),
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(context,
FadePage(page: InsuranceUpdate()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context)
.updateInsurance,
imagePath: 'insurance_card_icon.png',
subTitle: TranslationBase.of(context)
.updateInsuranceSubtitle,
),
),
),
Expanded(
child: Container(),
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: InsuranceApproval()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context)
.insuranceApproval,
imagePath:
'insurance_approvals_icon.png',
subTitle: '',//TranslationBase.of(context).insuranceApprovalSubtitle,
),
),
),
]),
SizedBox(
@ -355,7 +383,8 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
)
],
),
)
),
SizedBox(height: 20,),
],
),
if (model.user != null && model.isLogin)

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

@ -25,8 +25,8 @@ class _HomePrescriptionsPageState extends State<HomePrescriptionsPage>
void initState() {
super.initState();
_tabController = TabController(length: 2, vsync: this);
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-prescriptions/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-prescriptions/ar/0.png'));
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-prescriptions/en/1.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-prescriptions/ar/1.png'));
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

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

@ -17,19 +17,20 @@ 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/MobileApp/imges-info/my-vital-signs/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-vital-signs/ar/0.png'));
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-vital-signs/en/1.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-vital-signs/ar/1.png'));
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,
@ -43,7 +44,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
Row(
children: <Widget>[
InkWell(
onTap: () => Navigator.push(
onTap: () =>isNotOneAppointment? Navigator.push(
context,
FadePage(
page: VitalSignItemDetailsScreen(
@ -52,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(
@ -76,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,
),
),
],
@ -93,7 +86,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
Row(
children: <Widget>[
InkWell(
onTap: () => Navigator.push(
onTap: () => isNotOneAppointment ? Navigator.push(
context,
FadePage(
page: VitalSignItemDetailsScreen(
@ -103,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(
@ -124,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,
),
),
@ -141,7 +130,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
Row(
children: <Widget>[
InkWell(
onTap: () => Navigator.push(
onTap: () => isNotOneAppointment ? Navigator.push(
context,
FadePage(
page: VitalSignItemDetailsScreen(
@ -150,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(
@ -173,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,
),
),
@ -191,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),
),

@ -211,7 +211,7 @@ class _ProfileSettings extends State<ProfileSettings>
children: <Widget>[
Expanded(
child: DefaultButton(
TranslationBase.of(context).submit,
TranslationBase.of(context).save,
() {
saveSettings();
},

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

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

@ -20,7 +20,8 @@ class LocationUtils {
Geolocator.checkPermission().then((permission) {
if (permission == LocationPermission.always ||
permission == LocationPermission.whileInUse) {
Geolocator.getLastKnownPosition().then((value) => setLocation(value));
Geolocator.getLastKnownPosition()
.then((value) => setLocation(value));
}
if (permission == LocationPermission.denied ||
@ -57,9 +58,12 @@ class LocationUtils {
}
void setLocation(Position position) {
print(position);
this.sharedPref.setDouble(USER_LAT, position.latitude ?? 0.0);
this.sharedPref.setDouble(USER_LONG, position.longitude ?? 0.0);
this
.sharedPref
.setDouble(USER_LAT, position != null ? position.latitude : 0.0);
this
.sharedPref
.setDouble(USER_LONG, position != null ? position.longitude : 0.0);
}
void setZeroLocation() {

@ -883,6 +883,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];
@ -1052,6 +1053,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';
@ -21,12 +26,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,
)
],
),

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

Loading…
Cancel
Save