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

merge-update-with-lab-changes
Sultan Khan 5 years ago
commit 1eb6516ea6

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

@ -363,7 +363,7 @@ const Map localizedValues = {
"EmergencyService": {"en": "Emergency Service", 'ar': 'الفحص الطبي الشامل'}, "EmergencyService": {"en": "Emergency Service", 'ar': 'الفحص الطبي الشامل'},
"OnlinePaymentService": { "OnlinePaymentService": {
"en": "Online Payment Service", "en": "Online Payment Service",
'ar': 'خدمة الدفع عبر الإلكتدوني' 'ar': 'خدمة الدفع الإلكتدوني'
}, },
"OffersAndPackages": { "OffersAndPackages": {
"en": "Online transfer request", "en": "Online transfer request",
@ -868,4 +868,14 @@ const Map localizedValues = {
"location-permission": {"en": "Location", "ar": "تحديد المواقع"}, "location-permission": {"en": "Location", "ar": "تحديد المواقع"},
"accessibility": {"en": "Accessibility Mode", "ar": "وضع امكانية الوصول"}, "accessibility": {"en": "Accessibility Mode", "ar": "وضع امكانية الوصول"},
"orderStatus": {"en": "Order Status", "ar": "حالة الطلب"},
"CancelOrder": {"en": "Cancel Order", "ar": "الغاء الطلب"},
"FindUs": {"en": "Find Us", "ar": "اين تجدنا"},
"Feedback": {"en": "Feedback", "ar": "رأيك يهمنا"},
"LiveChat": {"en": "Live Chat", "ar": "محادثة مباشرة"},
"Service": {"en": "Service", "ar": "خدمة"},
"HMGServiceLabel": {"en": "HMG Service", 'ar': 'خدمات الحبيب'},
"HealthWeatherIndicators": {"en": "Health Weather Indicators", 'ar': ' مؤشرات الطقس الصحية '},
"HealthTipsBasedOnCurrentWeather": {"en": "Health Tips Based On Current Weather", 'ar': ' نصائح صحية على أساس الطقس الحالي '},
"MoreDetails": {"en": "More details", "ar": " المزيد من التفاصيل "},
}; };

@ -14,6 +14,7 @@ class RequestPrescriptionReportEnh {
int patientType; int patientType;
int appointmentNo; int appointmentNo;
String setupID; String setupID;
int dischargeNo;
int episodeID; int episodeID;
int clinicID; int clinicID;
int projectID; int projectID;
@ -36,7 +37,7 @@ class RequestPrescriptionReportEnh {
this.setupID, this.setupID,
this.episodeID, this.episodeID,
this.clinicID, this.clinicID,
this.projectID}); this.projectID,this.dischargeNo});
RequestPrescriptionReportEnh.fromJson(Map<String, dynamic> json) { RequestPrescriptionReportEnh.fromJson(Map<String, dynamic> json) {
versionID = json['VersionID']; versionID = json['VersionID'];
@ -79,6 +80,7 @@ class RequestPrescriptionReportEnh {
data['EpisodeID'] = this.episodeID; data['EpisodeID'] = this.episodeID;
data['ClinicID'] = this.clinicID; data['ClinicID'] = this.clinicID;
data['ProjectID'] = this.projectID; data['ProjectID'] = this.projectID;
data['DischargeNo'] = this.dischargeNo;
return data; return data;
} }
} }

@ -1,5 +1,4 @@
import 'dart:io'; import 'dart:io';
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/feedback/COC_items.dart'; import 'package:diplomaticquarterapp/core/model/feedback/COC_items.dart';
@ -45,8 +44,7 @@ class FeedbackService extends BaseService {
if (appointHistory != null) { if (appointHistory != null) {
body['AppoinmentNo'] = appointHistory.appointmentNo; body['AppoinmentNo'] = appointHistory.appointmentNo;
body['AppointmentDate'] = body['AppointmentDate'] = DateUtil.convertDateToString(appointHistory.appointmentDate);
DateUtil.convertDateToString(appointHistory.appointmentDate);
body['ClinicID'] = appointHistory.clinicID; body['ClinicID'] = appointHistory.clinicID;
body['ClinicName'] = appointHistory.clinicName; body['ClinicName'] = appointHistory.clinicName;
body['DoctorID'] = appointHistory.doctorID; body['DoctorID'] = appointHistory.doctorID;

@ -3,10 +3,6 @@ import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/BloodPr
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/MonthBloodPressureResultAverage.dart'; import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/MonthBloodPressureResultAverage.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/WeekBloodPressureResultAverage.dart'; import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/WeekBloodPressureResultAverage.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/YearBloodPressureResultAverage.dart'; import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/YearBloodPressureResultAverage.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/MonthDiabtectResultAverage.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/WeekDiabtectResultAverage.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/YearDiabtecResultAverage.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart';
class BloodPressureService extends BaseService { class BloodPressureService extends BaseService {

@ -1,12 +1,4 @@
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/BloodPressureResult.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/MonthBloodPressureResultAverage.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/WeekBloodPressureResultAverage.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/YearBloodPressureResultAverage.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/MonthDiabtectResultAverage.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/WeekDiabtectResultAverage.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/YearDiabtecResultAverage.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/weight/MonthWeightMeasurementResultAverage.dart'; import 'package:diplomaticquarterapp/core/model/my_trakers/weight/MonthWeightMeasurementResultAverage.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/weight/WeekWeightMeasurementResultAverage.dart'; import 'package:diplomaticquarterapp/core/model/my_trakers/weight/WeekWeightMeasurementResultAverage.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/weight/WeightMeasurementResult.dart'; import 'package:diplomaticquarterapp/core/model/my_trakers/weight/WeightMeasurementResult.dart';

@ -40,7 +40,7 @@ class LabsService extends BaseService {
hasError = false; hasError = false;
_requestPatientLabSpecialResult.projectID = projectID; _requestPatientLabSpecialResult.projectID = projectID;
_requestPatientLabSpecialResult.clinicID = clinicID; _requestPatientLabSpecialResult.clinicID = clinicID;
_requestPatientLabSpecialResult.invoiceNo = invoiceNo; //'1800296522';//; _requestPatientLabSpecialResult.invoiceNo = invoiceNo;
_requestPatientLabSpecialResult.orderNo = orderNo; _requestPatientLabSpecialResult.orderNo = orderNo;
await baseAppClient.post(GET_Patient_LAB_SPECIAL_RESULT, await baseAppClient.post(GET_Patient_LAB_SPECIAL_RESULT,

@ -22,12 +22,6 @@ class MyDoctorService extends BaseService {
channel: 3, channel: 3,
deviceTypeID: 2, deviceTypeID: 2,
doctorID: 2477, doctorID: 2477,
iPAdress: '10.20.10.20',
languageID: 2,
patientOutSA: 0,
sessionID: 'CvsUFeJkyLDnFQqw',
versionID: 5.5,
generalid: 'Cs2020@2016\$2958',
isDentalAllowedBackend: false); isDentalAllowedBackend: false);
Future getPatientDoctorAppointmentList({int top = 0, int beforeDays = 0,int exludType=4}) async { Future getPatientDoctorAppointmentList({int top = 0, int beforeDays = 0,int exludType=4}) async {
@ -52,18 +46,6 @@ class MyDoctorService extends BaseService {
RequestDoctorProfile _requestDoctorProfile = RequestDoctorProfile( RequestDoctorProfile _requestDoctorProfile = RequestDoctorProfile(
license: true, license: true,
isRegistered: true, isRegistered: true,
projectID: 12,
clinicID: 501,
patientID: 1231755,
versionID: 5.5,
channel: 3,
languageID: 2,
iPAdress: '10.20.10.20',
generalid: 'Cs2020@2016\$2958',
patientOutSA: 0,
sessionID: 'nstatCtNEmuwxeuVAOUmw',
isDentalAllowedBackend: false,
deviceTypeID: 2,
); );
Future getDoctorProfileAndRating( Future getDoctorProfileAndRating(
@ -87,7 +69,7 @@ class MyDoctorService extends BaseService {
}, body: _requestDoctorProfile.toJson()); }, body: _requestDoctorProfile.toJson());
///GET DOCTOR RATING ///GET DOCTOR RATING
//_requestDoctorRating.doctorID = doctorId; _requestDoctorRating.doctorID = doctorId;
await baseAppClient.post(GET_DOCTOR_RATING, await baseAppClient.post(GET_DOCTOR_RATING,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
doctorRating = DoctorRating.fromJson(response['AvgDoctorRatingList'][0]); doctorRating = DoctorRating.fromJson(response['AvgDoctorRatingList'][0]);

@ -11,40 +11,17 @@ import 'package:diplomaticquarterapp/core/model/prescriptions/request_prescripti
import 'package:diplomaticquarterapp/core/model/prescriptions/request_prescriptions_orders.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/request_prescriptions_orders.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/request_send_prescription_email.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/request_send_prescription_email.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:flutter/cupertino.dart';
class PrescriptionsService extends BaseService { class PrescriptionsService extends BaseService {
List<Prescriptions> prescriptionsList = List(); List<Prescriptions> prescriptionsList = List();
RequestPrescriptions _requestPrescriptions = RequestPrescriptions(
versionID: 5.5,
channel: 3,
languageID: 2,
iPAdress: '10.20.10.20',
generalid: 'Cs2020@2016\$2958',
patientOutSA: 0,
sessionID: 'KIbLoqkytuKJEWECHQ',
isDentalAllowedBackend: false,
deviceTypeID: 2,
patientID: 1231755,
tokenID: '@dm!n',
patientTypeID: 1,
patientType: 1);
List<PrescriptionsOrder> prescriptionsOrderList = List(); List<PrescriptionsOrder> prescriptionsOrderList = List();
RequestPrescriptionsOrders _requestPrescriptionsOrders =
RequestPrescriptionsOrders(
patientID: 1231755,
patientOutSA: 0,
versionID: 5.5,
channel: 3,
languageID: 1,
iPAdress: '10.20.10.20',
generalid: 'Cs2020@2016\$2958',
sessionID: 'KIbLoqkytuKJEWECHQ',
isDentalAllowedBackend: false,
deviceTypeID: 2);
Future getPrescriptions() async { Future getPrescriptions() async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(PRESCRIPTIONS, await baseAppClient.post(PRESCRIPTIONS,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
prescriptionsList.clear(); prescriptionsList.clear();
@ -54,10 +31,12 @@ class PrescriptionsService extends BaseService {
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: _requestPrescriptions.toJson()); }, body: body);
} }
Future getPrescriptionsOrders() async { Future getPrescriptionsOrders() async {
Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(GET_PRESCRIPTIONS_ALL_ORDERS, await baseAppClient.post(GET_PRESCRIPTIONS_ALL_ORDERS,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
prescriptionsOrderList.clear(); prescriptionsOrderList.clear();
@ -69,33 +48,16 @@ class PrescriptionsService extends BaseService {
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: _requestPrescriptionsOrders.toJson()); }, body: body);
} }
RequestPrescriptionReport _requestPrescriptionReport = RequestPrescriptionReport _requestPrescriptionReport =
RequestPrescriptionReport( RequestPrescriptionReport(
appointmentNo: 0, appointmentNo: 0, isDentalAllowedBackend: false);
channel: 3,
clinicID: 4,
deviceTypeID: 2,
dischargeNo: 2018003246,
episodeID: 0,
iPAdress: '10.20.10.20',
languageID: 1,
patientID: 1231755,
patientOutSA: 0,
patientType: 1,
patientTypeID: 1,
projectID: 12,
sessionID: 'wgKuHpsPsEuLnlJhAYCQ',
tokenID: '@dm!n',
setupID: "91877",
versionID: 5.5,
generalid: 'Cs2020@2016\$2958',
isDentalAllowedBackend: false);
List<PrescriptionReport> prescriptionReportList = List(); List<PrescriptionReport> prescriptionReportList = List();
Future getPrescriptionReport({int dischargeNo,int projectId,int clinicID,String setupID}) async { Future getPrescriptionReport(
{int dischargeNo, int projectId, int clinicID, String setupID}) async {
hasError = false; hasError = false;
_requestPrescriptionReport.dischargeNo = dischargeNo; _requestPrescriptionReport.dischargeNo = dischargeNo;
_requestPrescriptionReport.projectID = projectId; _requestPrescriptionReport.projectID = projectId;
@ -116,24 +78,7 @@ class PrescriptionsService extends BaseService {
RequestSendPrescriptionEmail _requestSendPrescriptionEmail = RequestSendPrescriptionEmail _requestSendPrescriptionEmail =
RequestSendPrescriptionEmail( RequestSendPrescriptionEmail(
versionID: 5.5, isDentalAllowedBackend: false,);
languageID: 2,
channel: 3,
iPAdress: '10.20.10.20',
generalid: 'Cs2020@2016\$2958',
patientOutSA: 0,
sessionID: 'twIUmHfOHqFdDfVcyw',
isDentalAllowedBackend: false,
deviceTypeID: 2,
tokenID: '@dm!n',
patientTypeID: 1,
patientType: 1,
to: 'aljammalzmohammad@outlook.com',
dateofBirth: '/Date(536743800000+0300)/',
patientIditificationNum: '2344670985',
patientMobileNumber: '537503378',
patientName: 'TAMER FANASHEH',
setupID: '91877');
Future sendPrescriptionEmail(String appointmentDate, int patientID, Future sendPrescriptionEmail(String appointmentDate, int patientID,
String clinicName, String doctorName, int projectID) async { String clinicName, String doctorName, int projectID) async {
@ -143,31 +88,25 @@ class PrescriptionsService extends BaseService {
_requestSendPrescriptionEmail.clinicName = clinicName; _requestSendPrescriptionEmail.clinicName = clinicName;
_requestSendPrescriptionEmail.doctorName = doctorName; _requestSendPrescriptionEmail.doctorName = doctorName;
_requestSendPrescriptionEmail.projectID = projectID; _requestSendPrescriptionEmail.projectID = projectID;
_requestSendPrescriptionEmail.to = user.emailAddress;
_requestSendPrescriptionEmail.dateofBirth = user.dateofBirth;
_requestSendPrescriptionEmail.patientIditificationNum = user.patientIdentificationNo;
_requestSendPrescriptionEmail.patientMobileNumber = user.mobileNumber;
_requestSendPrescriptionEmail.patientName = user.firstName +" "+ user.lastName;
_requestSendPrescriptionEmail.setupID = user.setupID;
hasError = false; hasError = false;
await baseAppClient.post(SEND_PRESCRIPTION_EMAIL, await baseAppClient.post(SEND_PRESCRIPTION_EMAIL, onSuccess: (response, statusCode) {},
onSuccess: (response,statusCode){ onFailure: (String error, int statusCode) {
},
onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: _requestSendPrescriptionEmail.toJson()); }, body: _requestSendPrescriptionEmail.toJson());
} }
RequestGetListPharmacyForPrescriptions RequestGetListPharmacyForPrescriptions requestGetListPharmacyForPrescriptions = RequestGetListPharmacyForPrescriptions(
requestGetListPharmacyForPrescriptions =
RequestGetListPharmacyForPrescriptions(
latitude: 0, latitude: 0,
longitude: 0, longitude: 0,
versionID: 5.5,
channel: 3,
languageID: 2,
iPAdress: '10.20.10.20',
generalid: 'Cs2020@2016\$2958',
patientOutSA: 0,
sessionID: 'HGNerTUSXhpaHXBg',
isDentalAllowedBackend: false, isDentalAllowedBackend: false,
deviceTypeID: 2,
); );
List<PharmacyPrescriptions> pharmacyPrescriptionsList = List(); List<PharmacyPrescriptions> pharmacyPrescriptionsList = List();
@ -187,44 +126,85 @@ class PrescriptionsService extends BaseService {
}, body: requestGetListPharmacyForPrescriptions.toJson()); }, body: requestGetListPharmacyForPrescriptions.toJson());
} }
RequestPrescriptionReportEnh _requestPrescriptionReportEnh =
RequestPrescriptionReportEnh(isDentalAllowedBackend: false,);
RequestPrescriptionReportEnh _requestPrescriptionReportEnh = RequestPrescriptionReportEnh( List<PrescriptionReportEnh> prescriptionReportEnhList = List();
versionID: 5.5,
channel: 3,
languageID: 2,
iPAdress: '10.20.10.20',
generalid: 'Cs2020@2016\$2958',
patientOutSA: 0,
sessionID: 'bQQdesEKpyYKTFMVNeg',
isDentalAllowedBackend: false,
deviceTypeID: 2,
patientID: 1231755,
tokenID: '@dm!n',
patientTypeID: 1,
patientType: 1,
setupID: '91877',
appointmentNo: 5926390,
episodeID: 140251928,
clinicID: 25,
projectID: 12
); Future getPrescriptionReportEnh({PrescriptionsOrder prescriptionsOrder}) async {
///This logic copy from the old app from class [order-history.component.ts] in line 45
bool isInPatient = false;
prescriptionsList.forEach((element) {
if (prescriptionsOrder.appointmentNo == "0") {
if (element.dischargeNo == int.parse(prescriptionsOrder.dischargeID)) {
_requestPrescriptionReportEnh.appointmentNo = element.appointmentNo;
_requestPrescriptionReportEnh.clinicID = element.clinicID;
_requestPrescriptionReportEnh.projectID = element.projectID;
_requestPrescriptionReportEnh.episodeID = element.episodeID;
_requestPrescriptionReportEnh.setupID = element.setupID;
_requestPrescriptionReportEnh.dischargeNo = element.dischargeNo;
isInPatient = element.isInOutPatient;
}
} else {
if (int.parse(prescriptionsOrder.appointmentNo) == element.appointmentNo) {
_requestPrescriptionReportEnh.appointmentNo = element.appointmentNo;
_requestPrescriptionReportEnh.clinicID = element.clinicID;
_requestPrescriptionReportEnh.projectID = element.projectID;
_requestPrescriptionReportEnh.episodeID = element.episodeID;
_requestPrescriptionReportEnh.setupID = element.setupID;
_requestPrescriptionReportEnh.dischargeNo = element.dischargeNo;
isInPatient = element.isInOutPatient;///call inpGetPrescriptionReport
}
}
});
List<PrescriptionReportEnh> prescriptionReportEnhList = List();
Future getPrescriptionReportEnh({PrescriptionsOrder prescriptionsOrder})async{
hasError = false; hasError = false;
// _requestPrescriptionReportEnh.appointmentNo = int.parse(prescriptionsOrder.appointmentNo);
// _requestPrescriptionReportEnh.patientID = prescriptionsOrder.projectID;
await baseAppClient.post(GET_PRESCRIPTION_REPORT_ENH, await baseAppClient.post(isInPatient? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
prescriptionReportEnhList.clear(); prescriptionReportEnhList.clear();
response['ListPRM'].forEach((prescriptions) {
prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(prescriptions)); if(isInPatient){
}); response['ListPRM'].forEach((prescriptions) {
prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(prescriptions));
});
}else{
response['INP_GetPrescriptionReport_List'].forEach((prescriptions) {
PrescriptionReportEnh reportEnh = PrescriptionReportEnh.fromJson(prescriptions);
reportEnh.itemDescription = prescriptions['ItemDescriptionN'];
prescriptionReportEnhList.add(reportEnh);
});
}
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _requestPrescriptionReportEnh.toJson());
}
Future updatePressOrder({@required int presOrderID}) async {
hasError = false;
Map<String, dynamic> body = Map();
body['PresOrderID'] = presOrderID;
body['EditedBy'] = user.patientID;
body['RejectionReason'] = '';
body['PresOrderStatus'] = 4;
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(UPDATE_PRESS_ORDER,
onSuccess: (dynamic response, int statusCode) {
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: _requestPrescriptionReportEnh.toJson()); }, body: body);
} }
} }

@ -12,19 +12,8 @@ class ReportsMonthlyService extends BaseService {
isReport: true, isReport: true,
encounterType: 1, encounterType: 1,
requestType: 1, requestType: 1,
versionID: 5.5,
channel: 3,
languageID: 2,
iPAdress: "10.20.10.20",
generalid: 'Cs2020@2016\$2958',
patientOutSA: 0,
sessionID: 'KIbLoqkytuKJEWECHQ',
isDentalAllowedBackend: false, isDentalAllowedBackend: false,
deviceTypeID: 2, );
patientID: 1231755,
tokenID: '@dm!n',
patientTypeID: 1,
patientType: 1);
Future getReports() async { Future getReports() async {
hasError = false; hasError = false;

@ -12,19 +12,8 @@ class ReportsService extends BaseService {
isReport: true, isReport: true,
encounterType: 1, encounterType: 1,
requestType: 1, requestType: 1,
versionID: 5.5,
channel: 3,
languageID: 2,
iPAdress: "10.20.10.20",
generalid: 'Cs2020@2016\$2958',
patientOutSA: 0, patientOutSA: 0,
sessionID: 'KIbLoqkytuKJEWECHQ', );
isDentalAllowedBackend: false,
deviceTypeID: 2,
patientID: 1231755,
tokenID: '@dm!n',
patientTypeID: 1,
patientType: 1);
Future getReports() async { Future getReports() async {
hasError = false; hasError = false;

@ -12,10 +12,8 @@ class MedicalViewModel extends BaseViewModel {
_medicalService.appoitmentAllHistoryResultList; _medicalService.appoitmentAllHistoryResultList;
getAppointmentHistory() async { getAppointmentHistory() async {
var asd ="";
if (authenticatedUserObject.isLogin) { if (authenticatedUserObject.isLogin) {
setState(ViewState.Busy); setState(ViewState.Busy);
// if (_medicalService.appoitmentAllHistoryResultList.length == 0)
await _medicalService.getAppointmentHistory(); await _medicalService.getAppointmentHistory();
if (_medicalService.hasError) { if (_medicalService.hasError) {
error = _medicalService.error; error = _medicalService.error;

@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_repor
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_enh.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_enh.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:flutter/cupertino.dart';
import '../../../core/enum/filter_type.dart'; import '../../../core/enum/filter_type.dart';
import '../../../core/enum/viewstate.dart'; import '../../../core/enum/viewstate.dart';
@ -157,4 +158,16 @@ class PrescriptionsViewModel extends BaseViewModel {
} }
} }
Future updatePressOrder({@required int presOrderID}) async {
setState(ViewState.Busy);
await _prescriptionsService.updatePressOrder(presOrderID: presOrderID);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.Error);
} else {
await getPrescriptions();
}
}
} }

@ -23,6 +23,7 @@ import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/services)contaniner.dart'; import 'package:diplomaticquarterapp/widgets/data_display/services)contaniner.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -33,7 +34,7 @@ class AllHabibMedicalService extends StatefulWidget {
//TODO //TODO
final Function goToMyProfile; final Function goToMyProfile;
AllHabibMedicalService({Key key, this.goToMyProfile}); AllHabibMedicalService({Key key, this.goToMyProfile});
@override @override
_AllHabibMedicalServiceState createState() => _AllHabibMedicalServiceState(); _AllHabibMedicalServiceState createState() => _AllHabibMedicalServiceState();
@ -66,38 +67,51 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
shrinkWrap: true, shrinkWrap: true,
children: [ children: [
Container( Container(
margin: EdgeInsets.all(8),
width: double.infinity, width: double.infinity,
height: 190, height: 150,
decoration: BoxDecoration( decoration: BoxDecoration(
image: DecorationImage( image: DecorationImage(
image: ExactAssetImage('assets/images/timeline_bg.png'), image: ExactAssetImage('assets/images/Weather_img.png'),
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
), borderRadius: BorderRadius.circular(8.0)),
child: Padding( child: Padding(
padding: EdgeInsets.symmetric(horizontal: 10.0), padding: EdgeInsets.symmetric(horizontal: 10.0),
child: Column( child: Row(
mainAxisAlignment: MainAxisAlignment.center, children: [
crossAxisAlignment: CrossAxisAlignment.start, Column(
children: [ mainAxisAlignment: MainAxisAlignment.center,
Text( crossAxisAlignment: CrossAxisAlignment.start,
'Health Weather Indicators', children: [
style: TextStyle( Texts(
TranslationBase.of(context)
.healthWeatherIndicators,
color: Colors.white, color: Colors.white,
fontSize: 22.0,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
), Texts(
SizedBox( TranslationBase.of(context).healthTipsBasedOnCurrentWeather,
height: 35.0,
),
Text(
'Health Tips Based On Current Weather',
style: TextStyle(
color: Colors.white, color: Colors.white,
fontSize: 14,
), ),
],
),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Image.asset('assets/images/Weather_ico.png',width: 80,height: 80,),
Texts(
TranslationBase.of(context).moreDetails,
color: Colors.white,
decoration: TextDecoration.underline,
),
],
), ),
]), )
],
),
), ),
), ),
ServicesContainer( ServicesContainer(
@ -109,16 +123,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
'assets/images/new-design/my_file_bottom_bar.png', 'assets/images/new-design/my_file_bottom_bar.png',
title: TranslationBase.of(context).myMedicalFile, title: TranslationBase.of(context).myMedicalFile,
), ),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: LiveCareHome(),
),
),
imageLocation: 'assets/images/new-design/liveCare_ar_bg.png',
title: TranslationBase.of(context).livecare,
),
ServicesContainer( ServicesContainer(
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, context,
@ -143,15 +148,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
'assets/images/al-habib_online_payment_service_icon.png', 'assets/images/al-habib_online_payment_service_icon.png',
title: TranslationBase.of(context).onlinePaymentService, title: TranslationBase.of(context).onlinePaymentService,
), ),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(),
),
imageLocation:
'assets/images/al-habib_online_payment_service_icon.png',
title: 'Covid-19- Drive-Thru Test',
),
ServicesContainer( ServicesContainer(
onTap: () { onTap: () {
Navigator.push( Navigator.push(
@ -166,37 +163,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
imageLocation: 'assets/images/emergency_service_image.png', imageLocation: 'assets/images/emergency_service_image.png',
title: TranslationBase.of(context).emergencyService, title: TranslationBase.of(context).emergencyService,
), ),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: ParkingPage(),
),
),
imageLocation: 'assets/images/pharmacy_logo.png',
title: 'Pharmacy'),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: InsuranceUpdate(),
),
),
imageLocation:
'assets/images/medical/insurance_card_icon.png',
title: TranslationBase.of(context).updateInsurance,
),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: authUser.patientID == null
? EReferralIndexPage()
: EReferralPage()),
),
imageLocation: 'assets/images/ereferral_service_icon.png',
title: 'E-Referral',
),
ServicesContainer( ServicesContainer(
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, context,
@ -208,15 +175,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
'assets/images/new-design/family_menu_icon_red.png', 'assets/images/new-design/family_menu_icon_red.png',
title: 'My Family', title: 'My Family',
), ),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(page: ChildVaccinesPage()),
),
imageLocation:
'assets/images/new-design/children_vaccines_icon.png',
title: 'Child Vaccines',
),
ServicesContainer( ServicesContainer(
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, context,
@ -228,61 +187,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
'assets/images/new-design/upcoming_icon_bottom_bar.png', 'assets/images/new-design/upcoming_icon_bottom_bar.png',
title: TranslationBase.of(context).todoList, title: TranslationBase.of(context).todoList,
), ),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(page: SymptomInfo()),
),
imageLocation: 'assets/images/new-design/body_icon.png',
title: 'Symptom Checker'),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(page: BloodDonationPage()),
),
imageLocation: 'assets/images/new-design/blood_icon.png',
title: 'Blood Donation',
),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: (HealthCalculators()),
),
),
imageLocation:
'assets/images/new-design/health_calculator_icon.png',
title: 'Health Calculators',
),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: HealthConverter(),
),
),
imageLocation:
'assets/images/new-design/health_convertor_icon.png',
title: 'Health Converter',
),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: H2OPageIndexPage(),
),
),
imageLocation: 'assets/images/new-design/water_icon.png',
title: 'H2O',
),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(),
),
imageLocation: 'assets/images/new-design/smartwatch_icon.png',
title: TranslationBase.of(context).smartWatches,
),
ServicesContainer( ServicesContainer(
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, context,

@ -27,8 +27,8 @@ class _ContactUsPageState extends State<ContactUsPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
isShowAppBar: true,//widget.isAppbar, isShowAppBar: true,
appBarTitle: "HMG Services",//TranslationBase.of(context).bookAppo, appBarTitle: TranslationBase.of(context).hMGServiceLabel,
isShowDecPage: false, isShowDecPage: false,
body: Container( body: Container(
margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0), margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0),
@ -43,7 +43,7 @@ class _ContactUsPageState extends State<ContactUsPage> {
Expanded( Expanded(
child: CardCommonContact( child: CardCommonContact(
image: 'assets/images/new-design/find_us_icon.png', image: 'assets/images/new-design/find_us_icon.png',
text: "Find us", text: TranslationBase.of(context).findUs,
subText: "", subText: "",
type: 0, type: 0,
@ -52,7 +52,7 @@ class _ContactUsPageState extends State<ContactUsPage> {
Expanded( Expanded(
child: CardCommonContact( child: CardCommonContact(
image: 'assets/images/new-design/feedback_icon.png', image: 'assets/images/new-design/feedback_icon.png',
text: "Feedback", text: TranslationBase.of(context).feedback,
subText: "", subText: "",
type: 1), type: 1),
@ -66,21 +66,14 @@ class _ContactUsPageState extends State<ContactUsPage> {
Expanded( Expanded(
child: CardCommonContact( child: CardCommonContact(
image: 'assets/images/new-design/live_chat_icon.png', image: 'assets/images/new-design/live_chat_icon.png',
text: "Live Chat", text: TranslationBase.of(context).liveChat,
subText: "Service", subText: TranslationBase.of(context).service,
type: 2, type: 2,
), ),
), ),
Expanded( Expanded(
child: Opacity( child: Container(),
opacity: 0,
child: CardCommonContact(
image: 'assets/images/new-design/feedback_icon.png',
text: "Feedback",
subText: "",
type: 3),
),
), ),
], ],

@ -34,9 +34,11 @@ class _FindUsPageState extends State<FindUsPage>
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<FindusViewModel>( return BaseView<FindusViewModel>(
allowAny: true,
onModelReady: (model) => model.getFindUsRequestOrders(), //model.getCOC(), onModelReady: (model) => model.getFindUsRequestOrders(), //model.getCOC(),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false,
appBarTitle: 'Locations', appBarTitle: 'Locations',
baseViewModel: model, baseViewModel: model,
body: Scaffold( body: Scaffold(

@ -23,6 +23,7 @@ class _HospitalsPageState extends State<HospitalsPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
isShowDecPage: false,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
// margin: EdgeInsets.only(left: 15,right: 15,top: 70), // margin: EdgeInsets.only(left: 15,right: 15,top: 70),

@ -23,6 +23,7 @@ class _PharmaciesPageState extends State<PharmaciesPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
isShowDecPage: false,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
margin: EdgeInsets.only(left: 15, right: 15, top: 70), margin: EdgeInsets.only(left: 15, right: 15, top: 70),

@ -1,8 +1,10 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/LiveChat/livechat_page.dart'; import 'package:diplomaticquarterapp/pages/ContactUs/LiveChat/livechat_page.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/findus/findus_page.dart'; import 'package:diplomaticquarterapp/pages/ContactUs/findus/findus_page.dart';
import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart'; import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class CardCommonContact extends StatelessWidget { class CardCommonContact extends StatelessWidget {
final image; final image;
@ -17,6 +19,7 @@ class CardCommonContact extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return GestureDetector( return GestureDetector(
onTap: () { onTap: () {
navigateToSearch(context, this.type); navigateToSearch(context, this.type);
@ -45,10 +48,12 @@ class CardCommonContact extends StatelessWidget {
style: TextStyle( style: TextStyle(
color: Colors.black, letterSpacing: 1.0, fontSize: 15.0)), color: Colors.black, letterSpacing: 1.0, fontSize: 15.0)),
), ),
Container( Align(
alignment: Alignment.bottomRight, alignment: projectViewModel.isArabic? Alignment.bottomLeft:Alignment.bottomRight,
margin: EdgeInsets.fromLTRB(0.0, 0.0, 10.0, 8.0), child: Container(
child: Image.asset(this.image, width: 60.0, height: 60.0), margin: EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 8.0),
child: Image.asset(this.image, width: 60.0, height: 60.0),
),
), ),
], ],
), ),

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart';
@ -13,6 +14,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class MyAppointments extends StatefulWidget { class MyAppointments extends StatefulWidget {
List<AppoitmentAllHistoryResultList> appoList = []; List<AppoitmentAllHistoryResultList> appoList = [];
@ -42,7 +44,7 @@ class _MyAppointmentsState extends State<MyAppointments>
void initState() { void initState() {
_tabController = new TabController(length: 3, vsync: this); _tabController = new TabController(length: 3, vsync: this);
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
if (authenticatedUserObject.isLogin) getPatientAppointmentHistory(); if (Provider.of<ProjectViewModel>(context, listen: false).isLogin) getPatientAppointmentHistory();
}); });
super.initState(); super.initState();
} }

@ -13,10 +13,12 @@ AppSharedPreferences sharedPref = AppSharedPreferences();
class BaseView<T extends BaseViewModel> extends StatefulWidget { class BaseView<T extends BaseViewModel> extends StatefulWidget {
final Widget Function(BuildContext context, T model, Widget child) builder; final Widget Function(BuildContext context, T model, Widget child) builder;
final Function(T) onModelReady; final Function(T) onModelReady;
final bool allowAny;
BaseView({ BaseView({
this.builder, this.builder,
this.onModelReady, this.onModelReady,
this.allowAny = false,
}); });
@override @override
@ -31,9 +33,10 @@ class _BaseViewState<T extends BaseViewModel> extends State<BaseView<T>> {
@override @override
void initState() { void initState() {
//TODO fix it if(widget.allowAny && widget.onModelReady != null){
//Provider.of<ProjectViewModel>(context, listen: false).isLogin; widget.onModelReady(model);
if (widget.onModelReady != null && Provider.of<ProjectViewModel>(context, listen: false).isLogin) { }
else if (widget.onModelReady != null && Provider.of<ProjectViewModel>(context, listen: false).isLogin) {
widget.onModelReady(model); widget.onModelReady(model);
} }
super.initState(); super.initState();

@ -34,6 +34,7 @@ class _FeedbackHomePageState extends State<FeedbackHomePage>
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
isBottomBar: false, isBottomBar: false,
isShowDecPage: false,
appBarTitle: 'Feedback', appBarTitle: 'Feedback',
body: Scaffold( body: Scaffold(
extendBodyBehindAppBar: true, extendBodyBehindAppBar: true,

@ -34,8 +34,10 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<FeedbackViewModel>( return BaseView<FeedbackViewModel>(
allowAny: true,
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowDecPage: false,
body: Container( body: Container(
height: MediaQuery.of(context).size.height * 0.8, height: MediaQuery.of(context).size.height * 0.8,
child: SingleChildScrollView( child: SingleChildScrollView(

@ -17,9 +17,11 @@ class _StatusFeedbackPageState extends State<StatusFeedbackPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<FeedbackViewModel>( return BaseView<FeedbackViewModel>(
allowAny: true,
onModelReady: (model) => model.getCOC(), onModelReady: (model) => model.getCOC(),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowDecPage: false,
body: Container( body: Container(
margin: EdgeInsets.only(top: 8.0,left: 8.0,right: 8.0 ), margin: EdgeInsets.only(top: 8.0,left: 8.0,right: 8.0 ),
padding: EdgeInsets.all(15.0), padding: EdgeInsets.all(15.0),

@ -170,7 +170,7 @@ class _HomePageState extends State<HomePage> {
color: Colors.transparent, color: Colors.transparent,
width: 0.5), width: 0.5),
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(9)), Radius.circular(4)),
), ),
child: Center( child: Center(
child: Texts( child: Texts(
@ -178,7 +178,8 @@ class _HomePageState extends State<HomePage> {
.viewMore, .viewMore,
color: Theme.of(context) color: Theme.of(context)
.primaryColor, .primaryColor,
fontSize: 12, fontSize: 14,
), ),
), ),
), ),
@ -685,7 +686,7 @@ class _HomePageState extends State<HomePage> {
child: Container(), child: Container(),
), ),
Texts( Texts(
TranslationBase.of(context).viewMore, TranslationBase.of(context).viewAll,
color: Colors.white, color: Colors.white,
bold: true, bold: true,
) )
@ -726,7 +727,7 @@ class _HomePageState extends State<HomePage> {
child: Container(), child: Container(),
), ),
Texts( Texts(
TranslationBase.of(context).viewMore, TranslationBase.of(context).viewAll,
color: Colors.white, color: Colors.white,
bold: true, bold: true,
) )

@ -27,8 +27,10 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:permission_handler/permission_handler.dart'; import 'package:permission_handler/permission_handler.dart';
import 'package:provider/provider.dart';
import '../../locator.dart'; import '../../locator.dart';
import '../../routes.dart';
import 'home_page.dart'; import 'home_page.dart';
class LandingPage extends StatefulWidget { class LandingPage extends StatefulWidget {
@ -330,10 +332,8 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
//final searchValue = Provider.of<SearchProvider>(context); ProjectViewModel projectViewModel = Provider.of(context);
//print(searchValue);
// projectProvider = Provider.of(context);
// checkValue(projectProvider);
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
elevation: 0, elevation: 0,
@ -341,10 +341,11 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
headline6: headline6:
TextStyle(color: Colors.white, fontWeight: FontWeight.bold), TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
), ),
title: Texts( title: Text(
getText(currentTab).toUpperCase(), getText(currentTab).toUpperCase(),
bold: true, style: TextStyle(fontWeight: FontWeight.bold,color: Colors.white,fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans'),
color: Colors.white, // bold: true,
// color: Colors.white,
), ),
leading: Builder( leading: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
@ -356,14 +357,20 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
}, },
), ),
actions: [ actions: [
// IconButton( IconButton(
// iconSize: 70, //iconSize: 70,
// icon: SvgPicture.asset('assets/images/svg/robort_svg.svg', icon: Icon(projectViewModel.isLogin?Icons.settings : Icons.login,color: Colors.white,),
// height: 100, width: 100, fit: BoxFit.cover), onPressed: () {
// onPressed: () { if(projectViewModel.isLogin)
// triggerRobot(); Navigator.of(context).pushNamed(
// } //do something, SETTINGS ,
// ) );
else
Navigator.of(context).pushNamed(
WELCOME_LOGIN ,
);
}, //do something,
)
], ],
centerTitle: true, centerTitle: true,
), ),

@ -156,8 +156,7 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).lab, title: TranslationBase.of(context).lab,
imagePath: 'lab_result_icon.png', imagePath: 'lab_result_icon.png',
subTitle: subTitle: TranslationBase.of(context).labSubtitle,
TranslationBase.of(context).lab,
), ),
), ),
), ),

@ -1,8 +1,10 @@
import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/BottomButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/BottomButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -10,15 +12,16 @@ import 'package:flutter/material.dart';
class PrescriptionsHistoryDetailsPage extends StatelessWidget { class PrescriptionsHistoryDetailsPage extends StatelessWidget {
final PrescriptionsOrder prescriptionsOrder; final PrescriptionsOrder prescriptionsOrder;
PrescriptionsHistoryDetailsPage({Key key,this.prescriptionsOrder}); PrescriptionsHistoryDetailsPage({Key key, this.prescriptionsOrder});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<PrescriptionsViewModel>( return BaseView<PrescriptionsViewModel>(
onModelReady: (model) => model.getPrescriptionReportEnh(prescriptionsOrder: prescriptionsOrder), onModelReady: (model) => model.getPrescriptionReportEnh(
builder: (_,model,widget) => AppScaffold( prescriptionsOrder: prescriptionsOrder),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: 'Order History', appBarTitle: TranslationBase.of(context).orderDetails,
baseViewModel: model, baseViewModel: model,
body: SingleChildScrollView( body: SingleChildScrollView(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
@ -27,82 +30,123 @@ class PrescriptionsHistoryDetailsPage extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
SizedBox(
height: 5,
),
Texts(TranslationBase.of(context).orderStatus +' : ${prescriptionsOrder.descriptionN}'),
SizedBox(
height: 5,
),
Table( Table(
border: TableBorder.symmetric( border: TableBorder.symmetric(
inside: BorderSide(width: 0.5), inside: BorderSide(width: 0.5),
outside: BorderSide(width: 0.5)), outside: BorderSide(width: 0.5)),
children: [ children: [
TableRow( TableRow(children: [
children: [ Container(
Container( height: 50,
height: 50, color: Colors.white,
color: Colors.white, child: Center(
child: Center(child: Texts('Order No'),), child: Texts(TranslationBase.of(context).orderNo),
), ),
Container( ),
height: 50, Container(
color: Colors.white, height: 50,
child: Center(child: Texts('Date'),), color: Colors.white,
), child: Center(
] child: Texts(TranslationBase.of(context).date),
), ),
TableRow( ),
children: [ ]),
Container( TableRow(children: [
height: 50, Container(
color: Colors.white, height: 50,
child: Center(child: Texts('12655'),), color: Colors.white,
), child: Center(
Container( child: Texts('${prescriptionsOrder.iD}'),
height: 50, ),
color: Colors.white, ),
child: Center(child: Texts('2020-7-15'),), Container(
), height: 50,
] color: Colors.white,
) child: Center(
child: Texts('${prescriptionsOrder.createdOn}'),
),
),
])
], ],
), ),
SizedBox(height: 15,), SizedBox(
...List.generate(model.prescriptionReportEnhList.length, (index) => Container( height: 15,
margin: EdgeInsets.all(8.0), ),
color: Colors.white, ...List.generate(
child: Row( model.prescriptionReportEnhList.length,
children: <Widget>[ (index) => Container(
ClipRRect( margin: EdgeInsets.all(8.0),
borderRadius: BorderRadius.all(Radius.circular(5)), color: Colors.white,
child: Image.network( child: Row(
model.prescriptionReportEnhList[index].imageSRCUrl, children: <Widget>[
fit: BoxFit.cover, ClipRRect(
width: 60, borderRadius: BorderRadius.all(Radius.circular(5)),
height: 70, child: Image.network(
model.prescriptionReportEnhList[index].imageSRCUrl,
fit: BoxFit.cover,
width: 60,
height: 70,
),
), ),
), Expanded(
Expanded( child: Padding(
child: Padding( padding: const EdgeInsets.all(8.0),
padding: const EdgeInsets.all(8.0), child: Column(
child: Column( crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
children: <Widget>[ Texts(model.prescriptionReportEnhList[index]
Texts(model.prescriptionReportEnhList[index] .itemDescription),
.itemDescription), ],
], ),
), ),
), ),
), ],
),
],
), ),
)) )
], ],
), ),
), ),
), ),
bottomSheet: Container( bottomSheet: Container(
//padding: EdgeInsets.all(8.0), //padding: EdgeInsets.all(8.0),
// margin: EdgeInsets.all(8.0), // margin: EdgeInsets.all(8.0),
child: BottomButton(label: 'Cancel order',color: Colors.red[300],), child: BottomButton(
label: TranslationBase.of(context).cancelOrder,
disabled: prescriptionsOrder.status != 1,
textColor: Colors.white,
onTap: (){
showCDialog(model,context);
//showAlertDialog(context);
},
),
), ),
), ),
); );
} }
showCDialog(PrescriptionsViewModel model,context){
ConfirmDialog(
context: context,
confirmMessage: "Are you sure ?",
okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel,
okFunction: () {
Navigator.of(context).pop();
model.updatePressOrder(presOrderID: prescriptionsOrder.iD).then((value) {
Navigator.of(context).pop();
});
},
cancelFunction: () => {}).showAlertDialog(context);
// dialog.showAlertDialog(context);
}
} }

@ -16,6 +16,7 @@ class PaymentService extends StatelessWidget {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false,
appBarTitle: TranslationBase.of(context).paymentService, appBarTitle: TranslationBase.of(context).paymentService,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(

@ -26,6 +26,7 @@ class MedicineSearch extends StatelessWidget {
baseViewModel: model, baseViewModel: model,
appBarTitle: TranslationBase.of(context).searchMedicine, appBarTitle: TranslationBase.of(context).searchMedicine,
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false,
body: Container( body: Container(
height: SizeConfig.screenHeight, height: SizeConfig.screenHeight,
child: Column( child: Column(

@ -804,6 +804,19 @@ class TranslationBase {
localizedValues['location-permission'][locale.languageCode]; localizedValues['location-permission'][locale.languageCode];
String get accessibility => String get accessibility =>
localizedValues['accessibility'][locale.languageCode]; localizedValues['accessibility'][locale.languageCode];
String get orderStatus => localizedValues['orderStatus'][locale.languageCode];
String get cancelOrder => localizedValues['CancelOrder'][locale.languageCode];
String get findUs => localizedValues['FindUs'][locale.languageCode];
String get feedback => localizedValues['Feedback'][locale.languageCode];
String get liveChat => localizedValues['LiveChat'][locale.languageCode];
String get service => localizedValues['Service'][locale.languageCode];
String get hMGServiceLabel => localizedValues['HMGServiceLabel'][locale.languageCode];
String get healthWeatherIndicators => localizedValues['HealthWeatherIndicators'][locale.languageCode];
String get healthTipsBasedOnCurrentWeather => localizedValues['HealthTipsBasedOnCurrentWeather'][locale.languageCode];
String get moreDetails => localizedValues['MoreDetails'][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -54,16 +54,19 @@ class BottomNavigationItem extends StatelessWidget {
size: 22.0), size: 22.0),
), ),
SizedBox( SizedBox(
height: 5, height: 2,
), ),
Texts( Texts(
name, name,
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: currentIndex == index color: currentIndex == index
? Theme.of(context).primaryColor ? Theme.of(context).primaryColor
: Theme.of(context).dividerColor, : Colors.grey,
fontSize: 11, fontSize: 11,
), ),
SizedBox(
height: 7,
),
], ],
) )
: authenticatedUserObject.isLogin : authenticatedUserObject.isLogin
@ -103,16 +106,19 @@ class BottomNavigationItem extends StatelessWidget {
size: 22.0), size: 22.0),
), ),
SizedBox( SizedBox(
height: 5, height: 2,
), ),
Texts( Texts(
name, name,
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: currentIndex == index color: currentIndex == index
? Theme.of(context).primaryColor ? Theme.of(context).primaryColor
: Theme.of(context).dividerColor, : Colors.grey,
fontSize: 11, fontSize: 11,
), ),
SizedBox(
height: 7,
),
], ],
), ),
], ],
@ -133,16 +139,19 @@ class BottomNavigationItem extends StatelessWidget {
size: 22.0), size: 22.0),
), ),
SizedBox( SizedBox(
height: 5, height: 2,
), ),
Texts( Texts(
name, name,
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: currentIndex == index color: currentIndex == index
? Theme.of(context).primaryColor ? Theme.of(context).primaryColor
: Theme.of(context).dividerColor, : Colors.grey,
fontSize: 11, fontSize: 11,
), ),
SizedBox(
height: 7,
),
], ],
), ),
), ),

@ -1,5 +1,7 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
/// SecondaryButton widget /// SecondaryButton widget
/// [label] button label /// [label] button label
@ -127,6 +129,7 @@ class _SecondaryButtonState extends State<SecondaryButton>
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return IgnorePointer( return IgnorePointer(
ignoring: widget.loading, ignoring: widget.loading,
child: GestureDetector( child: GestureDetector(
@ -185,7 +188,7 @@ class _SecondaryButtonState extends State<SecondaryButton>
height: MediaQuery.of(context).size.width * 2.2, height: MediaQuery.of(context).size.width * 2.2,
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, shape: BoxShape.circle,
color: widget.color?? Theme.of(context).primaryColor, color: widget.disabled? Colors.grey: widget.color ?? Theme.of(context).primaryColor,
), ),
), ),
), ),
@ -232,7 +235,7 @@ class _SecondaryButtonState extends State<SecondaryButton>
color: widget.textColor, color: widget.textColor,
fontSize: 17.0, fontSize: 17.0,
fontWeight: FontWeight.w800, fontWeight: FontWeight.w800,
fontFamily: "WorkSans"), fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans'),
), ),
) )
], ],

@ -1,6 +1,8 @@
import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/widgets/others/rounded_container_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/rounded_container_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../text.dart'; import '../text.dart';
@ -18,6 +20,7 @@ class MedicalProfileItem extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return RoundedContainer( return RoundedContainer(
showBorder: true, showBorder: true,
borderWidth: 0, borderWidth: 0,
@ -39,7 +42,7 @@ class MedicalProfileItem extends StatelessWidget {
fontWeight: FontWeight.bold), fontWeight: FontWeight.bold),
Texts(subTitle,fontSize: 1.4 * SizeConfig.textMultiplier,), Texts(subTitle,fontSize: 1.4 * SizeConfig.textMultiplier,),
Align( Align(
alignment: Alignment.bottomRight, alignment:projectViewModel.isArabic ? Alignment.bottomLeft : Alignment.bottomRight,
child: Image.asset( child: Image.asset(
"assets/images/medical/$imagePath", "assets/images/medical/$imagePath",
height: SizeConfig.heightMultiplier * 5, height: SizeConfig.heightMultiplier * 5,

@ -80,11 +80,15 @@ class TimeLineWidget extends StatelessWidget {
height: 4, height: 4,
), ),
Texts( Texts(
DateUtil.getMonthDayYearDateFormatted( DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(appoitmentAllHistoryResul.appointmentDate)),
DateUtil.convertStringToDate(
appoitmentAllHistoryResul.appointmentDate)),
color: Colors.white, color: Colors.white,
fontSize: 10.5, fontSize: 12.5,
fontWeight: FontWeight.normal,
),
Texts(
appoitmentAllHistoryResul.clinicName,
color: Colors.white,
fontSize: 12.5,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
) )
], ],
@ -93,17 +97,23 @@ class TimeLineWidget extends StatelessWidget {
) )
else else
Positioned( Positioned(
top:projectViewModel.isArabic ? 63 : 70, top:projectViewModel.isArabic ? 35 : 50,
child: Container( child: Container(
margin: EdgeInsets.only(left: 2, right: 2), margin: EdgeInsets.only(left: 2, right: 2),
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Texts(
appoitmentAllHistoryResul.clinicName,
color: Colors.white,
fontSize: 12.5,
fontWeight: FontWeight.normal,
),
Texts( Texts(
DateUtil.getMonthDayYearDateFormatted( DateUtil.getMonthDayYearDateFormatted(
DateUtil.convertStringToDate( DateUtil.convertStringToDate(
appoitmentAllHistoryResul.appointmentDate)), appoitmentAllHistoryResul.appointmentDate)),
color: Colors.white, color: Colors.white,
fontSize: 10.5, fontSize: 12.5,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
), ),
SizedBox( SizedBox(

@ -1,4 +1,6 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class Texts extends StatefulWidget { class Texts extends StatefulWidget {
final String text; final String text;
@ -164,6 +166,7 @@ class _TextsState extends State<Texts> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
TextStyle _getFontStyle() { TextStyle _getFontStyle() {
switch (widget.style) { switch (widget.style) {
case "headline2": case "headline2":
@ -262,10 +265,7 @@ class _TextsState extends State<Texts> {
style: _getFontStyle().copyWith( style: _getFontStyle().copyWith(
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,
fontWeight: FontWeight.w800, fontWeight: FontWeight.w800,
fontFamily: fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans',
Localizations.localeOf(context).languageCode == 'ar'
? 'Cairo'
: 'WorkSans',
), ),
), ),
), ),

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.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/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -22,12 +23,11 @@ class ConfirmDialog {
showAlertDialog(BuildContext context) { showAlertDialog(BuildContext context) {
// set up the buttons // set up the buttons
Widget cancelButton = FlatButton( Widget cancelButton = FlatButton(
child: Text(this.cancelText), child: Texts(this.cancelText),
onPressed: () { onPressed: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
}); });
Widget continueButton = Widget continueButton = FlatButton(child: Texts(okText), onPressed: okFunction);
FlatButton(child: Text(this.okText), onPressed: this.okFunction);
// set up the AlertDialog // set up the AlertDialog
AlertDialog alert = AlertDialog( AlertDialog alert = AlertDialog(
@ -41,7 +41,6 @@ class ConfirmDialog {
// show the dialog // show the dialog
showDialog( showDialog(
barrierDismissible: false,
context: context, context: context,
builder: (BuildContext context) { builder: (BuildContext context) {
return alert; return alert;

Loading…
Cancel
Save