merge changes-4

merge-requests/390/head
Sikander Saleem 5 years ago
parent 889ae24f07
commit f6ae7ed770

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

@ -1,122 +1,128 @@
{ {
"images" : [ "images":[
{ {
"size" : "20x20", "idiom":"iphone",
"idiom" : "iphone", "size":"20x20",
"filename" : "Icon-App-20x20@2x.png", "scale":"2x",
"scale" : "2x" "filename":"Icon-App-20x20@2x.png"
}, },
{ {
"size" : "20x20", "idiom":"iphone",
"idiom" : "iphone", "size":"20x20",
"filename" : "Icon-App-20x20@3x.png", "scale":"3x",
"scale" : "3x" "filename":"Icon-App-20x20@3x.png"
}, },
{ {
"size" : "29x29", "idiom":"iphone",
"idiom" : "iphone", "size":"29x29",
"filename" : "Icon-App-29x29@1x.png", "scale":"1x",
"scale" : "1x" "filename":"Icon-App-29x29@1x.png"
}, },
{ {
"size" : "29x29", "idiom":"iphone",
"idiom" : "iphone", "size":"29x29",
"filename" : "Icon-App-29x29@2x.png", "scale":"2x",
"scale" : "2x" "filename":"Icon-App-29x29@2x.png"
}, },
{ {
"size" : "29x29", "idiom":"iphone",
"idiom" : "iphone", "size":"29x29",
"filename" : "Icon-App-29x29@3x.png", "scale":"3x",
"scale" : "3x" "filename":"Icon-App-29x29@3x.png"
}, },
{ {
"size" : "40x40", "idiom":"iphone",
"idiom" : "iphone", "size":"40x40",
"filename" : "Icon-App-40x40@2x.png", "scale":"2x",
"scale" : "2x" "filename":"Icon-App-40x40@2x.png"
}, },
{ {
"size" : "40x40", "idiom":"iphone",
"idiom" : "iphone", "size":"40x40",
"filename" : "Icon-App-40x40@3x.png", "scale":"3x",
"scale" : "3x" "filename":"Icon-App-40x40@3x.png"
}, },
{ {
"size" : "60x60", "idiom":"iphone",
"idiom" : "iphone", "size":"60x60",
"filename" : "Icon-App-60x60@2x.png", "scale":"2x",
"scale" : "2x" "filename":"Icon-App-60x60@2x.png"
}, },
{ {
"size" : "60x60", "idiom":"iphone",
"idiom" : "iphone", "size":"60x60",
"filename" : "Icon-App-60x60@3x.png", "scale":"3x",
"scale" : "3x" "filename":"Icon-App-60x60@3x.png"
}, },
{ {
"size" : "20x20", "idiom":"iphone",
"idiom" : "ipad", "size":"76x76",
"filename" : "Icon-App-20x20@1x.png", "scale":"2x",
"scale" : "1x" "filename":"Icon-App-76x76@2x.png"
}, },
{ {
"size" : "20x20", "idiom":"ipad",
"idiom" : "ipad", "size":"20x20",
"filename" : "Icon-App-20x20@2x.png", "scale":"1x",
"scale" : "2x" "filename":"Icon-App-20x20@1x.png"
}, },
{ {
"size" : "29x29", "idiom":"ipad",
"idiom" : "ipad", "size":"20x20",
"filename" : "Icon-App-29x29@1x.png", "scale":"2x",
"scale" : "1x" "filename":"Icon-App-20x20@2x.png"
}, },
{ {
"size" : "29x29", "idiom":"ipad",
"idiom" : "ipad", "size":"29x29",
"filename" : "Icon-App-29x29@2x.png", "scale":"1x",
"scale" : "2x" "filename":"Icon-App-29x29@1x.png"
}, },
{ {
"size" : "40x40", "idiom":"ipad",
"idiom" : "ipad", "size":"29x29",
"filename" : "Icon-App-40x40@1x.png", "scale":"2x",
"scale" : "1x" "filename":"Icon-App-29x29@2x.png"
}, },
{ {
"size" : "40x40", "idiom":"ipad",
"idiom" : "ipad", "size":"40x40",
"filename" : "Icon-App-40x40@2x.png", "scale":"1x",
"scale" : "2x" "filename":"Icon-App-40x40@1x.png"
}, },
{ {
"size" : "76x76", "idiom":"ipad",
"idiom" : "ipad", "size":"40x40",
"filename" : "Icon-App-76x76@1x.png", "scale":"2x",
"scale" : "1x" "filename":"Icon-App-40x40@2x.png"
}, },
{ {
"size" : "76x76", "idiom":"ipad",
"idiom" : "ipad", "size":"76x76",
"filename" : "Icon-App-76x76@2x.png", "scale":"1x",
"scale" : "2x" "filename":"Icon-App-76x76@1x.png"
}, },
{ {
"size" : "83.5x83.5", "idiom":"ipad",
"idiom" : "ipad", "size":"76x76",
"filename" : "Icon-App-83.5x83.5@2x.png", "scale":"2x",
"scale" : "2x" "filename":"Icon-App-76x76@2x.png"
}, },
{ {
"size" : "1024x1024", "idiom":"ipad",
"idiom" : "ios-marketing", "size":"83.5x83.5",
"filename" : "Icon-App-1024x1024@1x.png", "scale":"2x",
"scale" : "1x" "filename":"Icon-App-83.5x83.5@2x.png"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"scale" : "1x",
"filename" : "ItunesArtwork@2x.png"
}
],
"info":{
"version":1,
"author":"easyappicon"
} }
],
"info" : {
"version" : 1,
"author" : "xcode"
}
} }

@ -0,0 +1,69 @@
import 'package:diplomaticquarterapp/uitl/utils.dart';
class _Event{
String name;
String description;
bool active;
_Event(dynamic map){
name = map['name'];
description = map['description'];
active = map['active'];
}
flutterName() => 'f: $name';
}
class AnalyticEvents{
static _Event get(String key) {
var e = _Event(mapping[key]);
if(e == null){
var label = labelFrom(className: key); // Convert Class Name in to Label (HomeCare -> Home Care)
e = _Event({"name": label, "active":true, "description":key});
}
return e;
}
static var mapping = const {
"HomeHealthCarePage" : {
"active" : true,
"name" : "Home Health Care Page",
"description" : "",
},
"SplashScreen" : {
"active" : true,
"name" : "Splash Screen",
"description" : "",
},
"LandingPage" : {
"active" : true,
"name" : "Landing Page",
"description" : "",
},
"WelcomeLogin" : {
"active" : true,
"name" : "Welcome Login",
"description" : "",
},
"LoginType" : {
"active" : true,
"name" : "Login Type",
"description" : "",
},
"Login" : {
"active" : true,
"name" : "Login",
"description" : "",
},
"ForgotPassword" : {
"active" : true,
"name" : "Forgot Password",
"description" : "",
},
"" : {
"active" : true,
"name" : "",
"description" : "",
},
};
}

@ -0,0 +1,85 @@
import 'package:diplomaticquarterapp/analytics/analytic-events.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:firebase_analytics/firebase_analytics.dart';
import 'package:firebase_analytics/observer.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
class Singleton {
const Singleton(); //Constant constructor
void hello() { print('Hello world'); }
}
var analytics = FirebaseAnalytics();
class GAnalytics{
const GAnalytics();
static GAnalytics shared = const GAnalytics();
NavObserver navObserver() => NavObserver();
}
// adb shell setprop debug.firebase.analytics.app com.ejada.hmg -> Android
class NavObserver extends RouteObserver<PageRoute<dynamic>>{
_sendScreenView(PageRoute route) async{
log(String className){
var event = AnalyticEvents.get(className);
if(event.active){
analytics.setCurrentScreen(screenName: event.flutterName(), screenClassOverride: className).catchError( (Object error) {
debugPrint('$FirebaseAnalyticsObserver: $error');
},
test: (Object error) {
return error is PlatformException;
},
);
}
}
if(route.settings.name != null && route.settings.name.isNotEmpty && route.settings.name != "null"){
var class_ = routes[route.settings.name](0);
if(class_ != null)
log(class_.toStringShort());
}else if(route is FadePage){
var class_ = route.page;
if(class_ != null)
log(class_.toStringShort());
}else if(route is MaterialPageRoute){
var class_ = route.builder(null);
if (class_ != null)
log(class_.toStringShort());
}else{
print("");
}
}
@override
void didPush(Route<dynamic> route, Route<dynamic> previousRoute) {
super.didPush(route, previousRoute);
if (route is PageRoute) {
_sendScreenView(route);
}
}
@override
void didReplace({Route<dynamic> newRoute, Route<dynamic> oldRoute}) {
super.didReplace(newRoute: newRoute, oldRoute: oldRoute);
if (newRoute is PageRoute) {
_sendScreenView(newRoute);
}
}
@override
void didPop(Route<dynamic> route, Route<dynamic> previousRoute) {
super.didPop(route, previousRoute);
// if (previousRoute is PageRoute && route is PageRoute) {
// _sendScreenView(previousRoute);
// }
}
}

@ -14,15 +14,15 @@ const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items';
const PACKAGES_ORDERS = '/api/orders'; const PACKAGES_ORDERS = '/api/orders';
const BASE_URL = 'https://uat.hmgwebservices.com/'; const BASE_URL = 'https://uat.hmgwebservices.com/';
//const BASE_URL = 'https://hmgwebservices.com/'; // const BASE_URL = 'https://hmgwebservices.com/';
// Pharmacy UAT URLs // Pharmacy UAT URLs
const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
const PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; const PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
// Pharmacy Production URLs // Pharmacy Production URLs
// const BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/'; //const BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/';
// const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/'; //const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/';
const PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity'; const PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity';
@ -33,8 +33,7 @@ const GET_GEO_ZONES = 'Services/Patients.svc/REST/GeoF_GetAllPoints';
const LOG_GEO_ZONES = 'Services/Patients.svc/REST/GeoF_InsertPatientFileInfo'; const LOG_GEO_ZONES = 'Services/Patients.svc/REST/GeoF_InsertPatientFileInfo';
// Delivery Driver // Delivery Driver
const DRIVER_LOCATION = const DRIVER_LOCATION = 'Services/Patients.svc/REST/PatientER_GetDriverLocation';
'Services/Patients.svc/REST/PatientER_GetDriverLocation';
//weather //weather
const WEATHER_INDICATOR = 'Services/Weather.svc/REST/GetCityInfo'; const WEATHER_INDICATOR = 'Services/Weather.svc/REST/GetCityInfo';
@ -42,51 +41,36 @@ const WEATHER_INDICATOR = 'Services/Weather.svc/REST/GetCityInfo';
const GET_PRIVILEGE = 'Services/Patients.svc/REST/Service_Privilege'; const GET_PRIVILEGE = 'Services/Patients.svc/REST/Service_Privilege';
// Wifi Credentials // Wifi Credentials
const WIFI_CREDENTIALS = const WIFI_CREDENTIALS = "Services/Patients.svc/Hmg_SMS_Get_By_ProjectID_And_PatientID";
"Services/Patients.svc/Hmg_SMS_Get_By_ProjectID_And_PatientID";
///Doctor ///Doctor
const GET_MY_DOCTOR = const GET_MY_DOCTOR = 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
const GET_DOCTOR_PROFILE = 'Services/Doctors.svc/REST/GetDocProfiles'; const GET_DOCTOR_PROFILE = 'Services/Doctors.svc/REST/GetDocProfiles';
const GET_DOCTOR_RATING_NOTES = const GET_DOCTOR_RATING_NOTES = 'Services/Doctors.svc/REST/dr_GetNotesDoctorRating';
'Services/Doctors.svc/REST/dr_GetNotesDoctorRating'; const GET_DOCTOR_RATING_DETAILS = 'Services/Doctors.svc/REST/dr_GetDoctorRatingDetails';
const GET_DOCTOR_RATING_DETAILS =
'Services/Doctors.svc/REST/dr_GetDoctorRatingDetails';
const GET_DOCTOR_RATING = 'Services/Doctors.svc/REST/dr_GetAvgDoctorRating'; const GET_DOCTOR_RATING = 'Services/Doctors.svc/REST/dr_GetAvgDoctorRating';
///Prescriptions ///Prescriptions
const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList'; const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList';
const GET_PRESCRIPTIONS_ALL_ORDERS = const GET_PRESCRIPTIONS_ALL_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; const GET_PRESCRIPTION_REPORT = 'Services/Patients.svc/REST/INP_GetPrescriptionReport';
const GET_PRESCRIPTION_REPORT = const SEND_PRESCRIPTION_EMAIL = 'Services/Notifications.svc/REST/SendPrescriptionEmail';
'Services/Patients.svc/REST/INP_GetPrescriptionReport'; const GET_PRESCRIPTION_REPORT_ENH = 'Services/Patients.svc/REST/GetPrescriptionReport_enh';
const SEND_PRESCRIPTION_EMAIL =
'Services/Notifications.svc/REST/SendPrescriptionEmail';
const GET_PRESCRIPTION_REPORT_ENH =
'Services/Patients.svc/REST/GetPrescriptionReport_enh';
///Lab Order ///Lab Order
const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders'; const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders';
const GET_Patient_LAB_SPECIAL_RESULT = const GET_Patient_LAB_SPECIAL_RESULT = 'Services/Patients.svc/REST/GetPatientLabSpecialResults';
'Services/Patients.svc/REST/GetPatientLabSpecialResults'; const SEND_LAB_RESULT_EMAIL = 'Services/Notifications.svc/REST/SendLabReportEmail';
const SEND_LAB_RESULT_EMAIL = const GET_Patient_LAB_RESULT = 'Services/Patients.svc/REST/GetPatientLabResults';
'Services/Notifications.svc/REST/SendLabReportEmail'; const GET_Patient_LAB_ORDERS_RESULT = 'Services/Patients.svc/REST/GetPatientLabOrdersResults';
const GET_Patient_LAB_RESULT =
'Services/Patients.svc/REST/GetPatientLabResults';
const GET_Patient_LAB_ORDERS_RESULT =
'Services/Patients.svc/REST/GetPatientLabOrdersResults';
/// ///
const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders'; const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders';
const GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT = const GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT = 'Services/Patients.svc/REST/GetPatientLabResultsByAppointmentNo';
'Services/Patients.svc/REST/GetPatientLabResultsByAppointmentNo';
const GET_PATIENT_ORDERS_DETAILS = const GET_PATIENT_ORDERS_DETAILS = 'Services/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead';
'Services/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead';
const GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL'; const GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL';
const SEND_RAD_REPORT_EMAIL = const SEND_RAD_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendRadReportEmail';
'Services/Notifications.svc/REST/SendRadReportEmail';
///Feedback ///Feedback
const SEND_FEEDBACK = 'Services/COCWS.svc/REST/InsertCOCItemInSPList'; const SEND_FEEDBACK = 'Services/COCWS.svc/REST/InsertCOCItemInSPList';
@ -95,32 +79,27 @@ const GET_PATIENT_AppointmentHistory = 'Services'
'/Doctors.svc/REST/PateintHasAppoimentHistory'; '/Doctors.svc/REST/PateintHasAppoimentHistory';
///VITAL SIGN ///VITAL SIGN
const GET_PATIENT_VITAL_SIGN = const GET_PATIENT_VITAL_SIGN = 'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign';
'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign';
///Er Nearest ///Er Nearest
const GET_NEAREST_HOSPITAL = const GET_NEAREST_HOSPITAL = 'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime';
'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime';
///ED Online ///ED Online
const ER_GET_VISUAL_TRIAGE_QUESTIONS = const ER_GET_VISUAL_TRIAGE_QUESTIONS = "services/Doctors.svc/REST/ER_GetVisualTriageQuestions";
"services/Doctors.svc/REST/ER_GetVisualTriageQuestions"; const ER_SAVE_TRIAGE_INFORMATION = "services/Doctors.svc/REST/ER_SaveTriageInformation";
const ER_SAVE_TRIAGE_INFORMATION =
"services/Doctors.svc/REST/ER_SaveTriageInformation";
const ER_GetPatientPaymentInformationForERClinic = const ER_GetPatientPaymentInformationForERClinic =
"services/Doctors.svc/REST/ER_GetPatientPaymentInformationForERClinic"; "services/Doctors.svc/REST/ER_GetPatientPaymentInformationForERClinic";
///Er Nearest ///Er Nearest
const GET_AMBULANCE_REQUEST = const GET_AMBULANCE_REQUEST = 'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod';
'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod'; const GET_PATIENT_ALL_PRES_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const GET_PATIENT_ALL_PRES_ORDERS = const GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID = 'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID';
'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; const UPDATE_PRESS_ORDER = 'Services/Patients.svc/REST/PatientER_UpdatePresOrder';
const GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID = const INSERT_ER_INERT_PRES_ORDER = 'Services/Patients.svc/REST/PatientER_InsertPresOrder';
'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID';
const UPDATE_PRESS_ORDER = /// ER RRT
'Services/Patients.svc/REST/PatientER_UpdatePresOrder'; const GET_ALL_RC_TRANSPORTATION = 'rc/api/Transportation/getalltransportation';
const INSERT_ER_INERT_PRES_ORDER = const GET_ALL_RRT_QUESTIONS = 'Services/Patients.svc/REST/PatientER_RRT_GetAllQuestions';
'Services/Patients.svc/REST/PatientER_InsertPresOrder';
///FindUs ///FindUs
const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations'; const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations';
@ -129,15 +108,13 @@ const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations';
const GET_LIVECHAT_REQUEST = 'Services/Patients.svc/REST/GetPatientICProjects'; const GET_LIVECHAT_REQUEST = 'Services/Patients.svc/REST/GetPatientICProjects';
///babyInformation ///babyInformation
const GET_BABYINFORMATION_REQUEST = const GET_BABYINFORMATION_REQUEST = 'Services/Community.svc/REST/GetBabyByUserID';
'Services/Community.svc/REST/GetBabyByUserID';
///Get Baby By User ID ///Get Baby By User ID
const GET_BABY_BY_USER_ID = 'Services/Community.svc/REST/GetBabyByUserID'; const GET_BABY_BY_USER_ID = 'Services/Community.svc/REST/GetBabyByUserID';
///userInformation ///userInformation
const GET_USERINFORMATION_REQUEST = const GET_USERINFORMATION_REQUEST = 'Services/Community.svc/REST/GetUserInformation_New';
'Services/Community.svc/REST/GetUserInformation_New';
///Update email ///Update email
const UPDATE_PATENT_EMAIL = 'Services/Patients.svc/REST/UpdatePateintEmail'; const UPDATE_PATENT_EMAIL = 'Services/Patients.svc/REST/UpdatePateintEmail';
@ -159,29 +136,21 @@ const GET_TABLE_REQUEST = 'Services/Community.svc/REST/CreateVaccinationTable';
const GET_CITIES_REQUEST = 'Services/Lists.svc/REST/GetAllCities'; const GET_CITIES_REQUEST = 'Services/Lists.svc/REST/GetAllCities';
///BloodDetails ///BloodDetails
const GET_BLOOD_REQUEST = const GET_BLOOD_REQUEST = 'services/PatientVarification.svc/REST/BloodDonation_GetBloodGroupDetails';
'services/PatientVarification.svc/REST/BloodDonation_GetBloodGroupDetails';
const SAVE_BLOOD_REQUEST = const SAVE_BLOOD_REQUEST = 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType';
'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType';
const GET_BLOOD_AGREEMENT = const GET_BLOOD_AGREEMENT = 'Services/PatientVarification.svc/REST/CheckUserAgreementForBloodDonation';
'Services/PatientVarification.svc/REST/CheckUserAgreementForBloodDonation'; const SAVE_BLOOD_AGREEMENT = 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation';
const SAVE_BLOOD_AGREEMENT =
'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation';
///Reports ///Reports
const REPORTS = 'Services/Doctors.svc/REST/GetPatientMedicalReportStatusInfo'; const REPORTS = 'Services/Doctors.svc/REST/GetPatientMedicalReportStatusInfo';
const INSERT_REQUEST_FOR_MEDICAL_REPORT = const INSERT_REQUEST_FOR_MEDICAL_REPORT = 'Services/Doctors.svc/REST/InsertRequestForMedicalReport';
'Services/Doctors.svc/REST/InsertRequestForMedicalReport'; const SEND_MEDICAL_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendMedicalReportEmail';
const SEND_MEDICAL_REPORT_EMAIL =
'Services/Notifications.svc/REST/SendMedicalReportEmail';
///Rate ///Rate
const IS_LAST_APPOITMENT_RATED = const IS_LAST_APPOITMENT_RATED = 'Services/Doctors.svc/REST/IsLastAppoitmentRated';
'Services/Doctors.svc/REST/IsLastAppoitmentRated'; const GET_APPOINTMENT_DETAILS_BY_NO = 'Services/MobileNotifications.svc/REST/GetAppointmentDetailsByApptNo';
const GET_APPOINTMENT_DETAILS_BY_NO =
'Services/MobileNotifications.svc/REST/GetAppointmentDetailsByApptNo';
const GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID'; const GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID';
@ -193,8 +162,7 @@ const GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID';
const GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized"; const GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized";
//URL to get active appointment list //URL to get active appointment list
const GET_ACTIVE_APPOINTMENTS_LIST_URL = const GET_ACTIVE_APPOINTMENTS_LIST_URL = "Services/Doctors.svc/Rest/Dr_GetAppointmentActiveNumber";
"Services/Doctors.svc/Rest/Dr_GetAppointmentActiveNumber";
//URL to get projects list //URL to get projects list
const GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject'; const GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject';
@ -203,115 +171,87 @@ const GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject';
const GET_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/SearchDoctorsByTime"; const GET_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/SearchDoctorsByTime";
//URL to dental doctors list //URL to dental doctors list
const GET_DENTAL_DOCTORS_LIST_URL = const GET_DENTAL_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/Dental_DoctorChiefComplaintMapping";
"Services/Doctors.svc/REST/Dental_DoctorChiefComplaintMapping";
//URL to get doctor free slots //URL to get doctor free slots
const GET_DOCTOR_FREE_SLOTS = "Services/Doctors.svc/REST/GetDoctorFreeSlots"; const GET_DOCTOR_FREE_SLOTS = "Services/Doctors.svc/REST/GetDoctorFreeSlots";
//URL to insert appointment //URL to insert appointment
const INSERT_SPECIFIC_APPOINTMENT = const INSERT_SPECIFIC_APPOINTMENT = "Services/Doctors.svc/REST/InsertSpecificAppointment";
"Services/Doctors.svc/REST/InsertSpecificAppointment";
//URL to get patient share //URL to get patient share
const GET_PATIENT_SHARE = const GET_PATIENT_SHARE = "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNO";
"Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNO";
//URL to get patient appointment history //URL to get patient appointment history
const GET_PATIENT_APPOINTMENT_HISTORY = const GET_PATIENT_APPOINTMENT_HISTORY = "Services/Doctors.svc/REST/PateintHasAppoimentHistory";
"Services/Doctors.svc/REST/PateintHasAppoimentHistory";
const SEND_REPORT_EYE_EMAIL = const SEND_REPORT_EYE_EMAIL = "Services/Notifications.svc/REST/SendGlassesPrescriptionEmail";
"Services/Notifications.svc/REST/SendGlassesPrescriptionEmail";
const SEND_CONTACT_LENS_PRESCRIPTION_EMAIL = const SEND_CONTACT_LENS_PRESCRIPTION_EMAIL = "Services/Notifications.svc/REST/SendContactLensPrescriptionEmail";
"Services/Notifications.svc/REST/SendContactLensPrescriptionEmail";
//URL to get patient appointment curfew history //URL to get patient appointment curfew history
const GET_PATIENT_APPOINTMENT_CURFEW_HISTORY = const GET_PATIENT_APPOINTMENT_CURFEW_HISTORY = "Services/Doctors.svc/REST/AppoimentHistoryForCurfew";
"Services/Doctors.svc/REST/AppoimentHistoryForCurfew";
//URL to confirm appointment //URL to confirm appointment
const CONFIRM_APPOINTMENT = const CONFIRM_APPOINTMENT = "Services/MobileNotifications.svc/REST/ConfirmAppointment";
"Services/MobileNotifications.svc/REST/ConfirmAppointment";
const INSERT_VIDA_REQUEST = const INSERT_VIDA_REQUEST = "Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart";
"Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart";
//URL to cancel appointment //URL to cancel appointment
const CANCEL_APPOINTMENT = "Services/Doctors.svc/REST/CancelAppointment"; const CANCEL_APPOINTMENT = "Services/Doctors.svc/REST/CancelAppointment";
//URL get appointment QR //URL get appointment QR
const GENERATE_QR_APPOINTMENT = const GENERATE_QR_APPOINTMENT = "Services/Doctors.svc/REST/GenerateQRAppointmentNo";
"Services/Doctors.svc/REST/GenerateQRAppointmentNo";
//URL send email appointment QR //URL send email appointment QR
const EMAIL_QR_APPOINTMENT = const EMAIL_QR_APPOINTMENT = "Services/Notifications.svc/REST/sendEmailForOnLineCheckin";
"Services/Notifications.svc/REST/sendEmailForOnLineCheckin";
//URL check payment status //URL check payment status
const CHECK_PAYMENT_STATUS = const CHECK_PAYMENT_STATUS = "Services/PayFort_Serv.svc/REST/GetRequestStatusByRequestID";
"Services/PayFort_Serv.svc/REST/GetRequestStatusByRequestID";
//URL create advance payment //URL create advance payment
const CREATE_ADVANCE_PAYMENT = "Services/Doctors.svc/REST/CreateAdvancePayment"; const CREATE_ADVANCE_PAYMENT = "Services/Doctors.svc/REST/CreateAdvancePayment";
const HIS_CREATE_ADVANCE_PAYMENT = const HIS_CREATE_ADVANCE_PAYMENT = "Services/Patients.svc/REST/HIS_CreateAdvancePayment";
"Services/Patients.svc/REST/HIS_CreateAdvancePayment";
const ADD_ADVANCE_NUMBER_REQUEST = const ADD_ADVANCE_NUMBER_REQUEST = 'Services/PayFort_Serv.svc/REST/AddAdvancedNumberRequest';
'Services/PayFort_Serv.svc/REST/AddAdvancedNumberRequest';
const IS_ALLOW_ASK_DOCTOR = const IS_ALLOW_ASK_DOCTOR = 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult'; const GET_CALL_REQUEST_TYPE = 'Services/Doctors.svc/REST/GetCallRequestType_LOV';
const GET_CALL_REQUEST_TYPE = const ADD_VIDA_REQUEST = 'Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart';
'Services/Doctors.svc/REST/GetCallRequestType_LOV';
const ADD_VIDA_REQUEST =
'Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart';
const SEND_CALL_REQUEST = 'Services/Doctors.svc/REST/InsertCallInfo'; const SEND_CALL_REQUEST = 'Services/Doctors.svc/REST/InsertCallInfo';
const GET_LIVECARE_CLINICS = const GET_LIVECARE_CLINICS = 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinics';
'Services/ER_VirtualCall.svc/REST/PatientER_GetClinics';
const GET_LIVECARE_SCHEDULE_CLINICS = const GET_LIVECARE_SCHEDULE_CLINICS = 'Services/Doctors.svc/REST/PatientER_GetClinicsHaveSchedule';
'Services/Doctors.svc/REST/PatientER_GetClinicsHaveSchedule';
const GET_LIVECARE_SCHEDULE_CLINIC_DOCTOR_LIST = const GET_LIVECARE_SCHEDULE_CLINIC_DOCTOR_LIST = 'Services/Doctors.svc/REST/PatientER_GetDoctorByClinicID';
'Services/Doctors.svc/REST/PatientER_GetDoctorByClinicID';
const GET_LIVECARE_SCHEDULE_DOCTOR_TIME_SLOTS = const GET_LIVECARE_SCHEDULE_DOCTOR_TIME_SLOTS = 'Services/Doctors.svc/REST/PatientER_GetDoctorFreeSlots';
'Services/Doctors.svc/REST/PatientER_GetDoctorFreeSlots';
const INSERT_LIVECARE_SCHEDULE_APPOINTMENT = const INSERT_LIVECARE_SCHEDULE_APPOINTMENT = 'Services/Doctors.svc/REST/InsertSpecificAppoitmentForSchedule';
'Services/Doctors.svc/REST/InsertSpecificAppoitmentForSchedule';
const GET_PATIENT_SHARE_LIVECARE = const GET_PATIENT_SHARE_LIVECARE =
"Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNOForLiveCare"; "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNOForLiveCare";
const GET_LIVECARE_CLINIC_TIMING = const GET_LIVECARE_CLINIC_TIMING = 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinicsServiceTimingsSchedule';
'Services/ER_VirtualCall.svc/REST/PatientER_GetClinicsServiceTimingsSchedule';
const GET_ER_APPOINTMENT_FEES = const GET_ER_APPOINTMENT_FEES = 'Services/DoctorApplication.svc/REST/GetERAppointmentFees';
'Services/DoctorApplication.svc/REST/GetERAppointmentFees';
const GET_ER_APPOINTMENT_TIME = 'Services/ER_VirtualCall.svc/REST/GetRestTime'; const GET_ER_APPOINTMENT_TIME = 'Services/ER_VirtualCall.svc/REST/GetRestTime';
const ADD_NEW_CALL_FOR_PATIENT_ER = const ADD_NEW_CALL_FOR_PATIENT_ER = 'Services/DoctorApplication.svc/REST/NewCallForPatientER';
'Services/DoctorApplication.svc/REST/NewCallForPatientER';
const GET_LIVECARE_HISTORY = const GET_LIVECARE_HISTORY = 'Services/ER_VirtualCall.svc/REST/GetPatientErVirtualHistory';
'Services/ER_VirtualCall.svc/REST/GetPatientErVirtualHistory'; const CANCEL_LIVECARE_REQUEST = 'Services/ER_VirtualCall.svc/REST/DeleteErRequest';
const CANCEL_LIVECARE_REQUEST = const SEND_LIVECARE_INVOICE_EMAIL = 'Services/Notifications.svc/REST/SendInvoiceForLiveCare';
'Services/ER_VirtualCall.svc/REST/DeleteErRequest';
const SEND_LIVECARE_INVOICE_EMAIL =
'Services/Notifications.svc/REST/SendInvoiceForLiveCare';
const GET_USER_TERMS = 'Services/Patients.svc/REST/GetUserTermsAndConditions'; const GET_USER_TERMS = 'Services/Patients.svc/REST/GetUserTermsAndConditions';
const UPDATE_HEALTH_TERMS = const UPDATE_HEALTH_TERMS = 'services/Patients.svc/REST/UpdatePateintHealthSummaryReport';
'services/Patients.svc/REST/UpdatePateintHealthSummaryReport';
const GET_PATIENT_HEALTH_STATS = 'Services/Patients.svc/REST/Med_GetTransactionsSts';
const GET_PATIENT_HEALTH_STATS = const SEND_CHECK_IN_NFC_REQUEST = 'Services/Patients.svc/REST/Patient_CheckAppointmentValidation_ForNFC';
'Services/Patients.svc/REST/Med_GetTransactionsSts';
//URL to get medicine and pharmacies list //URL to get medicine and pharmacies list
const CHANNEL = 3; const CHANNEL = 3;
@ -332,21 +272,16 @@ var DeviceTypeID = Platform.isIOS ? 1 : 2;
const LANGUAGE_ID = 2; const LANGUAGE_ID = 2;
const GET_PHARMCY_ITEMS = "Services/Lists.svc/REST/GetPharmcyItems_Region"; const GET_PHARMCY_ITEMS = "Services/Lists.svc/REST/GetPharmcyItems_Region";
const GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList"; const GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList";
const GET_PAtIENTS_INSURANCE = const GET_PAtIENTS_INSURANCE = "Services/Patients.svc/REST/Get_PatientInsuranceDetails";
"Services/Patients.svc/REST/Get_PatientInsuranceDetails"; const GET_PAtIENTS_INSURANCE_UPDATED = "Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory";
const GET_PAtIENTS_INSURANCE_UPDATED =
"Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory";
const INSURANCE_DETAILS = "Services/Patients.svc/REST/Get_InsuranceCheckList"; const INSURANCE_DETAILS = "Services/Patients.svc/REST/Get_InsuranceCheckList";
const GET_PATIENT_INSURANCE_DETAILS = const GET_PATIENT_INSURANCE_DETAILS = "Services/Patients.svc/REST/PatientER_GetPatientInsuranceDetails";
"Services/Patients.svc/REST/PatientER_GetPatientInsuranceDetails"; const UPLOAD_INSURANCE_CARD = 'Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate';
const UPLOAD_INSURANCE_CARD =
'Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate';
const GET_VACCINES = "Services/Patients.svc/REST/GetDoneVaccinesByPatientID"; const GET_VACCINES = "Services/Patients.svc/REST/GetDoneVaccinesByPatientID";
const GET_VACCINES_EMAIL = "Services/Notifications.svc/REST/SendVaccinesEmail"; const GET_VACCINES_EMAIL = "Services/Notifications.svc/REST/SendVaccinesEmail";
const GET_PAtIENTS_INSURANCE_APPROVALS = const GET_PAtIENTS_INSURANCE_APPROVALS = "Services/Patients.svc/REST/GetApprovalStatus";
"Services/Patients.svc/REST/GetApprovalStatus";
const SEARCH_BOT = 'HabibiChatBotApi/BotInterface/GetVoiceCommandResponse'; const SEARCH_BOT = 'HabibiChatBotApi/BotInterface/GetVoiceCommandResponse';
const GET_VACCINATIONS_ITEMS = "/Services/ERP.svc/REST/GET_VACCINATIONS_ITEMS"; const GET_VACCINATIONS_ITEMS = "/Services/ERP.svc/REST/GET_VACCINATIONS_ITEMS";
@ -356,81 +291,57 @@ const GET_PATIENT_SICK_LEAVE = 'Services/Patients.svc/REST/GetPatientSickLeave';
const SendSickLeaveEmail = 'Services/Notifications.svc/REST/SendSickLeaveEmail'; const SendSickLeaveEmail = 'Services/Notifications.svc/REST/SendSickLeaveEmail';
const GET_PATIENT_AdVANCE_BALANCE_AMOUNT = const GET_PATIENT_AdVANCE_BALANCE_AMOUNT = 'Services/Patients.svc/REST/GetPatientAdvanceBalanceAmount';
'Services/Patients.svc/REST/GetPatientAdvanceBalanceAmount'; const GET_PATIENT_INFO_BY_ID = 'Services/Doctors.svc/REST/GetPatientInfoByPatientID';
const GET_PATIENT_INFO_BY_ID =
'Services/Doctors.svc/REST/GetPatientInfoByPatientID';
const GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER = const GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER =
'Services/Patients.svc/REST/AP_GetPatientInfoByPatientIDandMobileNumber'; 'Services/Patients.svc/REST/AP_GetPatientInfoByPatientIDandMobileNumber';
const SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = const SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = 'Services/Authentication.svc/REST/SendActivationCodeForAdvancePayment';
'Services/Authentication.svc/REST/SendActivationCodeForAdvancePayment';
const CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = const CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT =
'Services/Authentication.svc/REST/CheckActivationCodeForAdvancePayment'; 'Services/Authentication.svc/REST/CheckActivationCodeForAdvancePayment';
const GET_COVID_DRIVETHRU_PROJECT_LIST = const GET_COVID_DRIVETHRU_PROJECT_LIST = 'Services/Doctors.svc/REST/COVID19_ProjectDriveThroughTestingCenter';
'Services/Doctors.svc/REST/COVID19_ProjectDriveThroughTestingCenter';
const GET_COVID_DRIVETHRU_PAYMENT_INFO = 'Services/Doctors.svc/REST/COVID19_GetPatientPaymentInormation';
const GET_COVID_DRIVETHRU_PAYMENT_INFO = const GET_COVID_DRIVETHRU_FREE_SLOTS = 'Services/Doctors.svc/REST/COVID19_GetFreeSlots';
'Services/Doctors.svc/REST/COVID19_GetPatientPaymentInormation';
const GET_COVID_DRIVETHRU_FREE_SLOTS = const GET_COVID_DRIVETHRU_PROCEDURES_LIST =
'Services/Doctors.svc/REST/COVID19_GetFreeSlots'; 'Services/Doctors.svc/REST/COVID19_GetTestProcedures';
///Smartwatch Integration Services ///Smartwatch Integration Services
const GET_PATIENT_LAST_RECORD = const GET_PATIENT_LAST_RECORD = 'Services/Patients.svc/REST/Med_GetPatientLastRecord';
'Services/Patients.svc/REST/Med_GetPatientLastRecord';
///My Trackers ///My Trackers
const GET_DIABETIC_RESULT_AVERAGE = const GET_DIABETIC_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetDiabeticResultAverage';
'Services/Patients.svc/REST/Patient_GetDiabeticResultAverage'; const GET_DIABTEC_RESULT = 'Services/Patients.svc/REST/Patient_GetDiabtecResults';
const GET_DIABTEC_RESULT = const ADD_DIABTEC_RESULT = 'Services/Patients.svc/REST/Patient_AddDiabtecResult';
'Services/Patients.svc/REST/Patient_GetDiabtecResults';
const ADD_DIABTEC_RESULT = const GET_BLOOD_PRESSURE_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetBloodPressureResultAverage';
'Services/Patients.svc/REST/Patient_AddDiabtecResult'; const GET_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_GetBloodPressureResult';
const ADD_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_AddBloodPressureResult';
const GET_BLOOD_PRESSURE_RESULT_AVERAGE =
'Services/Patients.svc/REST/Patient_GetBloodPressureResultAverage'; const GET_WEIGHT_PRESSURE_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResultAverage';
const GET_BLOOD_PRESSURE_RESULT = const GET_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResult';
'Services/Patients.svc/REST/Patient_GetBloodPressureResult'; const ADD_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_AddWeightMeasurementResult';
const ADD_BLOOD_PRESSURE_RESULT =
'Services/Patients.svc/REST/Patient_AddBloodPressureResult';
const GET_WEIGHT_PRESSURE_RESULT_AVERAGE =
'Services/Patients.svc/REST/Patient_GetWeightMeasurementResultAverage';
const GET_WEIGHT_PRESSURE_RESULT =
'Services/Patients.svc/REST/Patient_GetWeightMeasurementResult';
const ADD_WEIGHT_PRESSURE_RESULT =
'Services/Patients.svc/REST/Patient_AddWeightMeasurementResult';
const ADD_ACTIVE_PRESCRIPTIONS_REPORT_BY_PATIENT_ID = const ADD_ACTIVE_PRESCRIPTIONS_REPORT_BY_PATIENT_ID =
'Services/Patients.svc/Rest/GetActivePrescriptionReportByPatientID'; 'Services/Patients.svc/Rest/GetActivePrescriptionReportByPatientID';
const GET_CALL_INFO_HOURS_RESULT = const GET_CALL_INFO_HOURS_RESULT = 'Services/Doctors.svc/REST/GetCallInfoHoursResult';
'Services/Doctors.svc/REST/GetCallInfoHoursResult'; const GET_CALL_REQUEST_TYPE_LOV = 'Services/Doctors.svc/REST/GetCallRequestType_LOV';
const GET_CALL_REQUEST_TYPE_LOV =
'Services/Doctors.svc/REST/GetCallRequestType_LOV'; const UPDATE_DIABETIC_RESULT = 'Services/Patients.svc/REST/Patient_UpdateDiabeticResult';
const UPDATE_DIABETIC_RESULT = const SEND_AVERAGE_BLOOD_SUGAR_REPORT = 'Services/Notifications.svc/REST/SendAverageBloodSugarReport';
'Services/Patients.svc/REST/Patient_UpdateDiabeticResult'; const DEACTIVATE_DIABETIC_STATUS = 'services/Patients.svc/REST/Patient_DeactivateDiabeticStatus';
const DEACTIVATE_BLOOD_PRESSURES_STATUS = 'services/Patients.svc/REST/Patient_DeactivateBloodPressureStatus';
const SEND_AVERAGE_BLOOD_SUGAR_REPORT =
'Services/Notifications.svc/REST/SendAverageBloodSugarReport'; const UPDATE_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_UpdateBloodPressureResult';
const DEACTIVATE_DIABETIC_STATUS = const SEND_AVERAGE_BLOOD_WEIGHT_REPORT = 'Services/Notifications.svc/REST/SendAverageBodyWeightReport';
'services/Patients.svc/REST/Patient_DeactivateDiabeticStatus'; const SEND_AVERAGE_BLOOD_PRESSURE_REPORT = 'Services/Notifications.svc/REST/SendAverageBloodPressureReport';
const DEACTIVATE_BLOOD_PRESSURES_STATUS =
'services/Patients.svc/REST/Patient_DeactivateBloodPressureStatus'; const UPDATE_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_UpdateWeightMeasurementResult';
const DEACTIVATE_WEIGHT_PRESSURE_RESULT = 'services/Patients.svc/REST/Patient_DeactivateWeightMeasurementStatus';
const UPDATE_BLOOD_PRESSURE_RESULT =
'Services/Patients.svc/REST/Patient_UpdateBloodPressureResult';
const SEND_AVERAGE_BLOOD_WEIGHT_REPORT =
'Services/Notifications.svc/REST/SendAverageBodyWeightReport';
const SEND_AVERAGE_BLOOD_PRESSURE_REPORT =
'Services/Notifications.svc/REST/SendAverageBloodPressureReport';
const UPDATE_WEIGHT_PRESSURE_RESULT =
'Services/Patients.svc/REST/Patient_UpdateWeightMeasurementResult';
const DEACTIVATE_WEIGHT_PRESSURE_RESULT =
'services/Patients.svc/REST/Patient_DeactivateWeightMeasurementStatus';
const GET_DOCTOR_RESPONSE = 'Services/Patients.svc/REST/GetDoctorResponse'; const GET_DOCTOR_RESPONSE = 'Services/Patients.svc/REST/GetDoctorResponse';
const UPDATE_READ_STATUS = 'Services/Patients.svc/REST/UpdateReadStatus'; const UPDATE_READ_STATUS = 'Services/Patients.svc/REST/UpdateReadStatus';
const INSERT_CALL_INFO = 'Services/Doctors.svc/REST/InsertCallInfo'; const INSERT_CALL_INFO = 'Services/Doctors.svc/REST/InsertCallInfo';
@ -438,39 +349,31 @@ const INSERT_CALL_INFO = 'Services/Doctors.svc/REST/InsertCallInfo';
const GET_PATIENT_ALLERGIES = 'Services/Patients.svc/REST/GetPatientAllergies'; const GET_PATIENT_ALLERGIES = 'Services/Patients.svc/REST/GetPatientAllergies';
// H2O // H2O
const H2O_GET_USER_PROGRESS = const H2O_GET_USER_PROGRESS = "Services/H2ORemainder.svc/REST/H2O_GetUserProgress";
"Services/H2ORemainder.svc/REST/H2O_GetUserProgress"; const H2O_INSERT_USER_ACTIVITY = "Services/H2ORemainder.svc/REST/H2O_InsertUserActivity";
const H2O_INSERT_USER_ACTIVITY = const H2O_GET_USER_DETAIL = "Services/H2ORemainder.svc/REST/H2O_GetUserDetails_New";
"Services/H2ORemainder.svc/REST/H2O_InsertUserActivity"; const H2O_UPDATE_USER_DETAIL = "Services/H2ORemainder.svc/REST/H2O_UpdateUserDetails_New";
const H2O_GET_USER_DETAIL = const H2O_UNDO_USER_ACTIVITY = "Services/H2ORemainder.svc/REST/H2o_UndoUserActivity";
"Services/H2ORemainder.svc/REST/H2O_GetUserDetails_New";
const H2O_UPDATE_USER_DETAIL =
"Services/H2ORemainder.svc/REST/H2O_UpdateUserDetails_New";
const H2O_UNDO_USER_ACTIVITY =
"Services/H2ORemainder.svc/REST/H2o_UndoUserActivity";
//E_Referral Services //E_Referral Services
const GET_ALL_RELATIONSHIP_TYPES = const GET_ALL_RELATIONSHIP_TYPES = "Services/Patients.svc/REST/GetAllRelationshipTypes";
"Services/Patients.svc/REST/GetAllRelationshipTypes"; const SEND_ACTIVATION_CODE_FOR_E_REFERRAL = 'Services/Authentication.svc/REST/SendActivationCodeForEReferral';
const SEND_ACTIVATION_CODE_FOR_E_REFERRAL = const CHECK_ACTIVATION_CODE_FOR_E_REFERRAL = 'Services/Authentication.svc/REST/CheckActivationCodeForEReferral';
'Services/Authentication.svc/REST/SendActivationCodeForEReferral';
const CHECK_ACTIVATION_CODE_FOR_E_REFERRAL =
'Services/Authentication.svc/REST/CheckActivationCodeForEReferral';
const GET_ALL_CITIES = 'services/Lists.svc/rest/GetAllCities'; const GET_ALL_CITIES = 'services/Lists.svc/rest/GetAllCities';
const CREATE_E_REFERRAL = "Services/Patients.svc/REST/CreateEReferral"; const CREATE_E_REFERRAL = "Services/Patients.svc/REST/CreateEReferral";
const GET_E_REFERRALS = "Services/Patients.svc/REST/GetEReferrals"; const GET_E_REFERRALS = "Services/Patients.svc/REST/GetEReferrals";
// Encillary Orders // Encillary Orders
const GET_ANCILLARY_ORDERS = const GET_ANCILLARY_ORDERS = 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderList';
'Services/Doctors.svc/REST/GetOnlineAncillaryOrderList';
const GET_ANCILLARY_ORDERS_DETAILS = const GET_ANCILLARY_ORDERS_DETAILS = 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderProcList';
'Services/Doctors.svc/REST/GetOnlineAncillaryOrderProcList';
//Pharmacy wishlist //Pharmacy wishlist
// const GET_WISHLIST = "http://swd-pharapp-01:7200/api/shopping_cart_items/"; // const GET_WISHLIST = "http://swd-pharapp-01:7200/api/shopping_cart_items/";
const GET_DOCTOR_LIST_BY_TIME = "Services/Doctors.svc/REST/SearchDoctorsByTime";
// pharmacy // pharmacy
const PHARMACY_AUTORZIE_CUSTOMER = "AutorizeCustomer"; const PHARMACY_AUTORZIE_CUSTOMER = "AutorizeCustomer";
const PHARMACY_VERIFY_CUSTOMER = "VerifyCustomer"; const PHARMACY_VERIFY_CUSTOMER = "VerifyCustomer";
@ -496,50 +399,34 @@ const GET_SHIPPING_OPTIONS = "get_shipping_option/";
const DELETE_SHOPPING_CART = "delete_shopping_cart_items/"; const DELETE_SHOPPING_CART = "delete_shopping_cart_items/";
const DELETE_SHOPPING_CART_ALL = "delete_shopping_cart_item_by_customer/"; const DELETE_SHOPPING_CART_ALL = "delete_shopping_cart_item_by_customer/";
const ORDER_SHOPPING_CART = "orders"; const ORDER_SHOPPING_CART = "orders";
const GET_LACUM_ACCOUNT_INFORMATION = const GET_LACUM_ACCOUNT_INFORMATION = "Services/Patients.svc/REST/GetLakumAccountInformation";
"Services/Patients.svc/REST/GetLakumAccountInformation"; const GET_LACUM_GROUP_INFORMATION = "Services/Patients.svc/REST/GetlakumInQueryInfoGrouping";
const GET_LACUM_GROUP_INFORMATION = const LACUM_ACCOUNT_ACTIVATE = "Services/Patients.svc/REST/LakumAccountActivation";
"Services/Patients.svc/REST/GetlakumInQueryInfoGrouping"; const LACUM_ACCOUNT_DEACTIVATE = "Services/Patients.svc/REST/LakumAccountDeactivation";
const LACUM_ACCOUNT_ACTIVATE = const CREATE_LAKUM_ACCOUNT = "Services/Patients.svc/REST/PHR_CreateLakumAccount";
"Services/Patients.svc/REST/LakumAccountActivation"; const TRANSFER_YAHALA_LOYALITY_POINTS = "Services/Patients.svc/REST/TransferYaHalaLoyaltyPoints";
const LACUM_ACCOUNT_DEACTIVATE = const LAKUM_GET_USER_TERMS_AND_CONDITIONS = "Services/ERP.svc/REST/GetUserTermsAndConditionsForEPharmcy";
"Services/Patients.svc/REST/LakumAccountDeactivation";
const CREATE_LAKUM_ACCOUNT =
"Services/Patients.svc/REST/PHR_CreateLakumAccount";
const TRANSFER_YAHALA_LOYALITY_POINTS =
"Services/Patients.svc/REST/TransferYaHalaLoyaltyPoints";
const LAKUM_GET_USER_TERMS_AND_CONDITIONS =
"Services/ERP.svc/REST/GetUserTermsAndConditionsForEPharmcy";
const PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList'; const PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList';
const GET_RECOMMENDED_PRODUCT = 'alsoProduct/'; const GET_RECOMMENDED_PRODUCT = 'alsoProduct/';
const GET_MOST_VIEWED_PRODUCTS = "mostview?"; const GET_MOST_VIEWED_PRODUCTS = "mostview?";
const GET_NEW_PRODUCTS = "newproducts?"; const GET_NEW_PRODUCTS = "newproducts?";
// Home Health Care // Home Health Care
const HHC_GET_ALL_SERVICES = const HHC_GET_ALL_SERVICES = "Services/Patients.svc/REST/PatientER_HHC_GetAllServices";
"Services/Patients.svc/REST/PatientER_HHC_GetAllServices"; const HHC_GET_ALL_CMC_SERVICES = "Services/Patients.svc/REST/PatientER_CMC_GetAllServices";
const HHC_GET_ALL_CMC_SERVICES = const PATIENT_ER_UPDATE_PRES_ORDER = "Services/Patients.svc/REST/PatientER_UpdatePresOrder";
"Services/Patients.svc/REST/PatientER_CMC_GetAllServices"; const GET_ORDER_DETAIL_BY_ID = "Services/Patients.svc/REST/PatientER_HHC_GetTransactionsForOrder";
const PATIENT_ER_UPDATE_PRES_ORDER = const GET_CMC_ORDER_DETAIL_BY_ID = "Services/Patients.svc/REST/PatientER_CMC_GetTransactionsForOrder";
"Services/Patients.svc/REST/PatientER_UpdatePresOrder";
const GET_ORDER_DETAIL_BY_ID =
"Services/Patients.svc/REST/PatientER_HHC_GetTransactionsForOrder";
const GET_CMC_ORDER_DETAIL_BY_ID =
"Services/Patients.svc/REST/PatientER_CMC_GetTransactionsForOrder";
const GET_CHECK_UP_ITEMS = "Services/Patients.svc/REST/GetCheckUpItems"; const GET_CHECK_UP_ITEMS = "Services/Patients.svc/REST/GetCheckUpItems";
const PUSH_NOTIFICATION_GET_ALL_NOTIFICATIONS = const PUSH_NOTIFICATION_GET_ALL_NOTIFICATIONS =
'Services/MobileNotifications.svc/REST/PushNotification_GetAllNotifications'; 'Services/MobileNotifications.svc/REST/PushNotification_GetAllNotifications';
const PUSH_NOTIFICATION_SET_MESSAGES_FROM_POOL_AS_READ = const PUSH_NOTIFICATION_SET_MESSAGES_FROM_POOL_AS_READ =
'Services/MobileNotifications.svc/REST/PushNotification_SetMessagesFromPoolAsRead'; 'Services/MobileNotifications.svc/REST/PushNotification_SetMessagesFromPoolAsRead';
const GET_PATIENT_ALL_PRES_ORD = const GET_PATIENT_ALL_PRES_ORD = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; const PATIENT_ER_INSERT_PRES_ORDER = 'Services/Patients.svc/REST/PatientER_InsertPresOrder';
const PATIENT_ER_INSERT_PRES_ORDER =
'Services/Patients.svc/REST/PatientER_InsertPresOrder';
const PHARMACY_MAKE_REVIEW = 'epharmacy/api/insertreviews'; const PHARMACY_MAKE_REVIEW = 'epharmacy/api/insertreviews';
const BLOOD_DONATION_REGISTER_BLOOD_TYPE = const BLOOD_DONATION_REGISTER_BLOOD_TYPE = 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType';
'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType'; const ADD_USER_AGREEMENT_FOR_BLOOD_DONATION = 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation';
const ADD_USER_AGREEMENT_FOR_BLOOD_DONATION =
'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation';
//Pharmacy wishlist //Pharmacy wishlist
const GET_WISHLIST = "shopping_cart_items/"; const GET_WISHLIST = "shopping_cart_items/";
@ -572,8 +459,7 @@ const GET_SUB_PRODUCTS = 'products?categoryid=';
const GET_FINAL_PRODUCTS = const GET_FINAL_PRODUCTS =
'products?fields=id,reviews,discount_ids,name,namen,localized_names,display_order,short_description,full_description,full_descriptionn,sku,order_minimum_quantity,order_maximum_quantity,price,old_price,images,is_rx,rx_message,rx_messagen,discount_name,discount_namen,approved_rating_sum,approved_total_reviews,allow_back_in_stock_subscriptions,stock_quantity,stock_availability,stock_availabilityn,discount_percentage&CategoryId='; 'products?fields=id,reviews,discount_ids,name,namen,localized_names,display_order,short_description,full_description,full_descriptionn,sku,order_minimum_quantity,order_maximum_quantity,price,old_price,images,is_rx,rx_message,rx_messagen,discount_name,discount_namen,approved_rating_sum,approved_total_reviews,allow_back_in_stock_subscriptions,stock_quantity,stock_availability,stock_availabilityn,discount_percentage&CategoryId=';
const GET_CLINIC_CATEGORY = 'Services/Doctors.svc/REST/DP_GetClinicCategory'; const GET_CLINIC_CATEGORY = 'Services/Doctors.svc/REST/DP_GetClinicCategory';
const GET_DISEASE_BY_CLINIC_ID = const GET_DISEASE_BY_CLINIC_ID = 'Services/Doctors.svc/REST/DP_GetDiseasesByClinicID';
'Services/Doctors.svc/REST/DP_GetDiseasesByClinicID';
const SEARCH_DOCTOR_BY_TIME = 'Services/Doctors.svc/REST/SearchDoctorsByTime'; const SEARCH_DOCTOR_BY_TIME = 'Services/Doctors.svc/REST/SearchDoctorsByTime';
const TIMER_MIN = 10; const TIMER_MIN = 10;
@ -589,6 +475,8 @@ const SCAN_QR_CODE = 'productbysku/';
const FILTERED_PRODUCTS = 'products?categoryids='; const FILTERED_PRODUCTS = 'products?categoryids=';
const GET_DOCTOR_LIST_CALCULATION = "Services/Doctors.svc/REST/GetCallculationDoctors";
class AppGlobal { class AppGlobal {
static var context; static var context;

@ -97,30 +97,29 @@ const Map localizedValues = {
'payment': {'en': 'Payment', 'ar': 'الدفع'}, 'payment': {'en': 'Payment', 'ar': 'الدفع'},
'cancel-nocaps': {'en': 'Cancel', 'ar': 'الغاء'}, 'cancel-nocaps': {'en': 'Cancel', 'ar': 'الغاء'},
'set-reminder': {'en': 'Set Reminder', 'ar': 'تعيين تذكير'}, 'set-reminder': {'en': 'Set Reminder', 'ar': 'تعيين تذكير'},
"national-id-number": {"en": "National ID Number", "ar": "رقم الهوية الوطنيةالاقامة"},
"medical-file-number": {"en": "Medical File Number", "ar": "رقم الملف الطبي"},
'login': {'en': 'Login', 'ar': 'تسجيل الدخول'}, 'login': {'en': 'Login', 'ar': 'تسجيل الدخول'},
'loginregister': {'en': 'Login / Register', 'ar': 'تسجيل الدخول'}, 'loginregister': {'en': 'Login / Register', 'ar': 'تسجيل الدخول'},
'poweredBy': {'en': 'Powered By', 'ar': 'مشغل بواسطة'}, 'poweredBy': {'en': 'Powered By', 'ar': 'مشغل بواسطة'},
"welcome": {"en": "Welcome", "ar": "مرحبا"}, "welcome": {"en": "Welcome", "ar": "مرحبا"},
"welcome-to": {"en": "Welcome to", "ar": "مرحبا بك في"}, "welcome-to": {"en": "Welcome to", "ar": "مرحبا بك في"},
"dr-sulaiman-text": {"en": "Dr. Sulaiman Al Habib", "ar": "د. سليمان الحبيب"},
"patient-app": {"en": "Patient App", "ar": "تطبيق المريض"}, "patient-app": {"en": "Patient App", "ar": "تطبيق المريض"},
"welcome_text": {"en": "Dr. Sulaiman Al Habib Mobile Application", "ar": "الدكتور سليمان الحبيب لتطبيقات الهاتف المتحرك"}, "welcome_text": {"en": "Dr. Sulaiman Al Habib Mobile Application", "ar": "الدكتور سليمان الحبيب لتطبيقات الهاتف المتحرك"},
"dr-sulaiman-text": {"en": "Dr. Sulaiman Al Habib", "ar": "د. سليمان الحبيب"},
'welcome_text2': {'en': 'Have you visited AlHabib Medical Group before? ', 'ar': 'هل قمت بزيارة مجموعة الحبيب الطبية من قبل؟'}, 'welcome_text2': {'en': 'Have you visited AlHabib Medical Group before? ', 'ar': 'هل قمت بزيارة مجموعة الحبيب الطبية من قبل؟'},
'yes': {'en': 'Yes', 'ar': 'نعم'}, 'yes': {'en': 'Yes', 'ar': 'نعم'},
'no': {'en': 'No', 'ar': 'لا'}, 'no': {'en': 'No', 'ar': 'لا'},
"logintyperadio": {"en": "Choose from below options to login to your medical file.", "ar": "اختر من الخيارات أدناه لتسجيل الدخول إلى ملفك الطبي."}, "logintyperadio": {"en": "Choose from below options to login to your medical file.", "ar": "اختر من الخيارات أدناه لتسجيل الدخول إلى ملفك الطبي."},
"registernow": {"en": "Register Now", "ar": "تسجيل الان"}, "registernow": {"en": "Register Now", "ar": "تسجيل الان"},
"nationalID": {"en": "Enter the Identification Number", "ar": "أدخل رقم الهوية الوطنية او الاقامة"}, "nationalID": {"en": "Enter the Identification Number", "ar": "أدخل رقم الهوية الوطنية او الاقامة"},
"national-id-number": {"en": "National ID Number", "ar": "رقم الهوية الوطنيةالاقامة"},
"medical-file-number": {"en": "Medical File Number", "ar": "رقم الملف الطبي"},
"national-id": {"en": "National ID", "ar": "رقم الهوية"}, "national-id": {"en": "National ID", "ar": "رقم الهوية"},
"fileNo": {"en": "File Number", "ar": "رقم الملف"}, "fileNo": {"en": "File Number", "ar": "رقم الملف"},
"fileno": {"en": "File No", "ar": "رقم الملف"}, "fileno": {"en": "File No", "ar": "رقم الملف"},
"forgotFileNo": {"en": "Forgot file Number?", "ar": "نسيت رقم الملف الطبي؟"}, "forgotFileNo": {"en": "Forgot file Number?", "ar": "نسيت رقم الملف الطبي؟"},
"forgotFileNoTitle": {"en": "Forgot medical file", "ar": "نسيت رقم الملف"}, "forgotFileNoTitle": {"en": "Forgot medical file", "ar": "نسيت رقم الملف"},
"enter-national-id": {"en": "Please Enter Mobile Number and National ID Number", "ar": "الرجاء إدخال رقم الجوال ورقم الهوية"}, "enter-national-id": {"en": "Please enter mobile number and identification number", "ar": "الرجاء إدخال رقم الجوال ورقم الهوية"},
"profile-info": {"en": "Please enter profile information", "ar": "الرجاء إدخال معلومات الملف الشخصي"}, "profile-info": {"en": "Please enter profile information", "ar": "الرجاء إدخال معلومات الملف الشخصي"},
"submit": {"en": "Submit", "ar": "ارسال"}, "submit": {"en": "Submit", "ar": "ارسال"},
"forgot-desc": {"en": "Enter the mobile number to receive the Medical file Number via SMS", "ar": "أدخل رقم الجوال المسجل لاستلام رقم الملف عن طريق الرسائل النصية"}, "forgot-desc": {"en": "Enter the mobile number to receive the Medical file Number via SMS", "ar": "أدخل رقم الجوال المسجل لاستلام رقم الملف عن طريق الرسائل النصية"},
@ -133,10 +132,8 @@ const Map localizedValues = {
"verify-with-faceid": {"en": "Face ID", "ar": "معرف الوجه"}, "verify-with-faceid": {"en": "Face ID", "ar": "معرف الوجه"},
"verify-with-sms": {"en": "SMS", "ar": "الرسائل القصيرة"}, "verify-with-sms": {"en": "SMS", "ar": "الرسائل القصيرة"},
"verify-with-whatsapp": {"en": "Whatsapp", "ar": " الواتس اب"}, "verify-with-whatsapp": {"en": "Whatsapp", "ar": " الواتس اب"},
"verify-through": {"en": "Verify Through", "ar": " تحقق من خلال"}, "last-login": {"en": "LAST LOGIN AT:", "ar": "آخر تسجيل دخول"},
"last-login": {"en": "Last Login Details:", "ar": "آخر تسجيل دخول"}, "last-login-with": {"en": "VERIFICATION TYPE:", "ar": "نوع التحقق:"},
"last-login-with": {"en": "Verification Type:", "ar": "نوع التحقق:"},
"please-verify": {"en": "Please Verify", "ar": "ارجوك تحقق:"},
"verify-fingerprint": { "verify-fingerprint": {
"en": "To activate the fingerprint login service, please verify data by using one of the following options.", "en": "To activate the fingerprint login service, please verify data by using one of the following options.",
"ar": "لتفعيل خدمة الدخول بالبصمة، يرجى اختيار احدى القنوات التالية للتحقق من البيانات" "ar": "لتفعيل خدمة الدخول بالبصمة، يرجى اختيار احدى القنوات التالية للتحقق من البيانات"
@ -184,7 +181,7 @@ const Map localizedValues = {
'askDocNotAllowed': {'en': 'This service will be available for last 15 days doctor Visit only', 'ar': 'هذه الخدمة متاحة للزيارات خلال اخر 15 يوم فقط'}, 'askDocNotAllowed': {'en': 'This service will be available for last 15 days doctor Visit only', 'ar': 'هذه الخدمة متاحة للزيارات خلال اخر 15 يوم فقط'},
"more-verify": {"en": "More Verification Options", "ar": "المزيد من خيارات التحقق"}, "more-verify": {"en": "More Verification Options", "ar": "المزيد من خيارات التحقق"},
"welcome-back": {"en": "Welcome back!", "ar": "مرحبا بعودتك!"}, "welcome-back": {"en": "Welcome back!", "ar": "مرحبا بعودتك!"},
"account-info": {"en": "Would you like to login with current Username?", "ar": "هل ترغب في تسجيل الدخول باسم المستخدم الحالي؟"}, "account-info": {"en": "Would you like to login with current username?", "ar": "هل ترغب في تسجيل الدخول باسم المستخدم الحالي؟"},
"another-acc": {"en": "Use Another Account", "ar": "استخدم حسابا آخر"}, "another-acc": {"en": "Use Another Account", "ar": "استخدم حسابا آخر"},
"next": {"en": "Next", "ar": 'التالى'}, "next": {"en": "Next", "ar": 'التالى'},
"first-name": {"en": "First Name", "ar": "الاسم الأول"}, "first-name": {"en": "First Name", "ar": "الاسم الأول"},
@ -281,6 +278,13 @@ const Map localizedValues = {
"ar": "ar":
" خدمة المواقف، تتيح هذه الخدمة للمستخدم معلومات عن موقف السيارة ليسهل عليه العودة لها لاحقاً ، 1- بالضغط على زر(قراءة الكود) تستطيع حفظ البيانات الخاصة بالموقف. 2-بالضغط على زر(عرض موقف سيارتي) يعرض لك موقع السيارة في خرائط قوقل. 3- لإعادة قراءة موقف آخرعن طريق الضغط على زر(مسح بيانات الموقف). " " خدمة المواقف، تتيح هذه الخدمة للمستخدم معلومات عن موقف السيارة ليسهل عليه العودة لها لاحقاً ، 1- بالضغط على زر(قراءة الكود) تستطيع حفظ البيانات الخاصة بالموقف. 2-بالضغط على زر(عرض موقف سيارتي) يعرض لك موقع السيارة في خرائط قوقل. 3- لإعادة قراءة موقف آخرعن طريق الضغط على زر(مسح بيانات الموقف). "
}, },
"parkingDescription": {
"en":
"Parking service is for you to scan the car location so you can find it easy on you way out. click on (scan parking) button to save the parking location, then (show my park) button will appear to show you the way for the parking. if you want to rescan parking QR just click on (Clear My Data).",
"ar":
"خدمة المواقف، تتيح هذه الخدمة للمستخدم معلومات عن موقف السيارة ليسهل عليه العودة لها لاحقاً ، 1- بالضغط على زر(قراءة الكود) تستطيع حفظ البيانات الخاصة بالموقف. 2-بالضغط على زر(عرض موقف سيارتي) يعرض لك موقع السيارة في خرائط قوقل. 3- لإعادة قراءة موقف آخرعن طريق الضغط على زر(مسح بيانات الموقف)."
},
"checkinOption": {"en": "Check-In Options", "ar": "تحقق في الخيارات"},
"readBarcode": {"en": "Read Barcode", "ar": "قراءة الكود"}, "readBarcode": {"en": "Read Barcode", "ar": "قراءة الكود"},
"showMyPark": {"en": "Show My Park", "ar": "عرض بارك"}, "showMyPark": {"en": "Show My Park", "ar": "عرض بارك"},
"clearMyData": {"en": "clear My Data", "ar": "امسح البيانات"}, "clearMyData": {"en": "clear My Data", "ar": "امسح البيانات"},
@ -744,7 +748,7 @@ const Map localizedValues = {
"HealthTipsBasedOnCurrentWeather": {"en": "Health Tips Based On Current Weather", 'ar': ' نصائح صحية على أساس الطقس الحالي '}, "HealthTipsBasedOnCurrentWeather": {"en": "Health Tips Based On Current Weather", 'ar': ' نصائح صحية على أساس الطقس الحالي '},
"MoreDetails": {"en": "More details", "ar": " المزيد من التفاصيل "}, "MoreDetails": {"en": "More details", "ar": " المزيد من التفاصيل "},
"SendCopy": {"en": "Send Copy", "ar": "ارسال نسخة"}, "SendCopy": {"en": "Send Copy", "ar": "ارسال نسخة"},
"ResendOrder": {"en": "Resend order & deliver", "ar": "إعادة طلب و توصيل"}, "ResendOrder": {"en": "Refill Order & Delivery", "ar": "إعادة طلب و توصيل"},
"Ports": {"en": "Ports", "ar": "المنافذ"}, "Ports": {"en": "Ports", "ar": "المنافذ"},
"Way": {"en": "Way", "ar": "الطزيقة"}, "Way": {"en": "Way", "ar": "الطزيقة"},
"Average": {"en": "Average", "ar": "المعدل"}, "Average": {"en": "Average", "ar": "المعدل"},
@ -778,6 +782,7 @@ const Map localizedValues = {
"complain-without-appo": {"en": "Complaint without appointment", "ar": "شكوى بدون موعد"}, "complain-without-appo": {"en": "Complaint without appointment", "ar": "شكوى بدون موعد"},
"question": {"en": "Question", "ar": "سؤال"}, "question": {"en": "Question", "ar": "سؤال"},
"message-type": {"en": "Message Type", "ar": "نوع الرسالة"}, "message-type": {"en": "Message Type", "ar": "نوع الرسالة"},
"feedback-type": {"en": "Feedback Type", "ar": "نوع الرسالة"},
"compliment": {"en": "compliment", "ar": "ثناء"}, "compliment": {"en": "compliment", "ar": "ثناء"},
"suggestion": {"en": "Suggestion", "ar": "إقتراح"}, "suggestion": {"en": "Suggestion", "ar": "إقتراح"},
"your-feedback": {"en": "Your feedback was sent", "ar": "لقد تم ارسال اقراحك شكرا لك"}, "your-feedback": {"en": "Your feedback was sent", "ar": "لقد تم ارسال اقراحك شكرا لك"},
@ -789,6 +794,10 @@ const Map localizedValues = {
"YouCanFind": {"en": "You Can Find ", "ar": "باستطاعتك العثور على "}, "YouCanFind": {"en": "You Can Find ", "ar": "باستطاعتك العثور على "},
"ItemInSearch": {"en": " Item In Search", "ar": " عنصر في البحث "}, "ItemInSearch": {"en": " Item In Search", "ar": " عنصر في البحث "},
"blood-donation": {"en": "Blood Donation", "ar": "التبرع بالدم"}, "blood-donation": {"en": "Blood Donation", "ar": "التبرع بالدم"},
"blood-donation-info": {
"en": "Through this service, you can register your name as a blood donor where the blood bank in the Habib Medical Group will communicate you in case of need for blood type.",
"ar": "عن طريق هذه الخدمة تستطيع تسجيل اسمك كمتبرع بالدم حيث سيتم التواصل معك عن طريق بنك الدم في مجموعة الحبيب الطبية في حال الحاجة الى فصيلة الدم ."
},
"blood-instruction": {"en": "Enter the required information, In order to register for Blood Donation Service", "ar": "ادخل المعلومات المطلوبة للتسجيل بخدمة التبرع بالدم"}, "blood-instruction": {"en": "Enter the required information, In order to register for Blood Donation Service", "ar": "ادخل المعلومات المطلوبة للتسجيل بخدمة التبرع بالدم"},
"view-terms": {"en": "To view the terms and conditions", "ar": "عرض الشروط والأحكام"}, "view-terms": {"en": "To view the terms and conditions", "ar": "عرض الشروط والأحكام"},
"wantConnectHmgNetwork": { "wantConnectHmgNetwork": {
@ -840,6 +849,7 @@ const Map localizedValues = {
}, },
"RRT-transport-heading": {"en": "Select Transportation Method", "ar": "حدد طريقة النقل"}, "RRT-transport-heading": {"en": "Select Transportation Method", "ar": "حدد طريقة النقل"},
"RRT-direction-heading": {"en": "Select Direction", "ar": "حدد الاتجاه"}, "RRT-direction-heading": {"en": "Select Direction", "ar": "حدد الاتجاه"},
"RRT-way-heading": {"en": "Select Way", "ar": "حدد الطريق"},
"to-hospital": {"en": "To Hospital", "ar": "الى المستشفى"}, "to-hospital": {"en": "To Hospital", "ar": "الى المستشفى"},
"from-hospital": {"en": "From Hospital", "ar": "من المستشفى"}, "from-hospital": {"en": "From Hospital", "ar": "من المستشفى"},
"one-direc": {"en": "One Way", "ar": "ذهاب"}, "one-direc": {"en": "One Way", "ar": "ذهاب"},
@ -861,6 +871,20 @@ const Map localizedValues = {
"stretcher": {"en": "Stretcher", "ar": "نقالة"}, "stretcher": {"en": "Stretcher", "ar": "نقالة"},
"none": {"en": "None", "ar": "لا شيء"}, "none": {"en": "None", "ar": "لا شيء"},
"RRT-Summary": {"en": "Summary", "ar": "ملخص الطلب"}, "RRT-Summary": {"en": "Summary", "ar": "ملخص الطلب"},
"AmountBeforeTax": {"en": "Amount Before Tax:", "ar": "Amount Before Tax:"},
"ApproximateServiceFee": {"en": "Approximate Service Fee", "ar": "Approximate Service Fee"},
"TaxAmount": {"en": "Tax Amount:", "ar": "Tax Amount:"},
"TotalAmountPayable": {"en": "Total Amount Payable:", "ar": "Total Amount Payable:"},
"iAcceptTermsConditions": {"en": "I Accept the Terms And Conditions", "ar": "You can pay by the following options:"},
"YouCanPayByTheFollowingOptions": {"en": "You can pay by the following options:", "ar": "I Accept the Terms And Conditions"},
"RRTDDetails": {
"en":
"The RRT service provides medical services urgent and stable cases, not life-threatening situation or extremities and the service includes providing medical care from a copmplete medical team at home",
"ar":
"The RRT service provides medical services urgent and stable cases, not life-threatening situation or extremities and the service includes providing medical care from a copmplete medical team at home"
},
"Rapid-Response-Team": {"en": "Rapid Response Team", "ar": "فريق الاستجابة السريع"},
"rrtService": {"en": "RRT Service", "ar": "خدمة RRT"},
"bill-amount": {"en": "Bill Amount", "ar": "مبلغ الفاتورة"}, "bill-amount": {"en": "Bill Amount", "ar": "مبلغ الفاتورة"},
"transport-method": {"en": "Transportation Method", "ar": "طريقة النقل"}, "transport-method": {"en": "Transportation Method", "ar": "طريقة النقل"},
"directions": {"en": "Directions", "ar": "الاتجاهات"}, "directions": {"en": "Directions", "ar": "الاتجاهات"},
@ -1045,7 +1069,7 @@ const Map localizedValues = {
"updated-email": {"en": "Updated email successfully", "ar": "تم تحديث البريد الالكتروني"}, "updated-email": {"en": "Updated email successfully", "ar": "تم تحديث البريد الالكتروني"},
"view-list-children": {"en": "View List of Children", "ar": "عرض قائمة الأطفال"}, "view-list-children": {"en": "View List of Children", "ar": "عرض قائمة الأطفال"},
"covidTest": {"en": "COVID TEST", "ar": "فحص كورونا"}, "covidTest": {"en": "COVID-19 TEST", "ar": "فحص كورونا"},
"driveThru": {"en": "Drive-Thru", "ar": "من السيارة"}, "driveThru": {"en": "Drive-Thru", "ar": "من السيارة"},
"trackDeliveryDriver": {"en": "Track Delivery Driver", "ar": "trackDeliveryDriver"}, "trackDeliveryDriver": {"en": "Track Delivery Driver", "ar": "trackDeliveryDriver"},
@ -1208,7 +1232,7 @@ const Map localizedValues = {
"drinking": {"en": "Drinkning", "ar": "الشرب"}, "drinking": {"en": "Drinkning", "ar": "الشرب"},
"remaining": {"en": "Remaining", "ar": "المتبقي"}, "remaining": {"en": "Remaining", "ar": "المتبقي"},
"taken": {"en": "Taken", "ar": " مأخوذ"}, "taken": {"en": "Taken", "ar": " مأخوذ"},
"ml": {"en": "ml", "ar": "مل"}, "ml": {"en": "ML", "ar": "مل"},
"l": {"en": "L", "ar": "لتر"}, "l": {"en": "L", "ar": "لتر"},
"custom-label": {"en": "Enter amount", "ar": "أدخل كمية الماء"}, "custom-label": {"en": "Enter amount", "ar": "أدخل كمية الماء"},
"custom-label-in-litres": {"en": "Enter amount in liters", "ar": "أدخل الكمية باللتر"}, "custom-label-in-litres": {"en": "Enter amount in liters", "ar": "أدخل الكمية باللتر"},
@ -1295,10 +1319,21 @@ const Map localizedValues = {
"expectedArrivalTime": {"en": "Expected arrival time", "ar": "الوقت المتوقع للوصول"}, "expectedArrivalTime": {"en": "Expected arrival time", "ar": "الوقت المتوقع للوصول"},
"add-address": {"en": "Add new address", "ar": "اضف عنوان جديد"}, "add-address": {"en": "Add new address", "ar": "اضف عنوان جديد"},
"enter-file": {"en": "Please Enter Mobile Number and Medical File Number", "ar": "الرجاء إدخال رقم الجوال ورقم الملف الطبي"}, "enter-file": {"en": "Please Enter Mobile Number and Medical File Number", "ar": "الرجاء إدخال رقم الجوال ورقم الملف الطبي"},
"allow": {"en": "Allow", "ar": "السماح"},
"reject": {"en": "Reject", "ar": "رفض"},
"referralRequesterInformation": {"en": "Referral requester information", "ar": "معلومات طالب الإحالة"}, "referralRequesterInformation": {"en": "Referral requester information", "ar": "معلومات طالب الإحالة"},
"enterReferralRequesterName": {"en": "Enter Referral Requester Name*", "ar": "أدخل اسم مقدم طلب الإحالة *"}, "enterReferralRequesterName": {"en": "Enter Referral Requester Name*", "ar": "أدخل اسم مقدم طلب الإحالة *"},
"selectRelationship": {"en": "Select Relationship", "ar": "حدد العلاقة"}, "selectRelationship": {"en": "Select Relationship", "ar": "حدد العلاقة"},
"requesterRelationship": {"en": "Requester Relationship", "ar": "علاقة الطالب"}, "requesterRelationship": {"en": "Requester Relationship", "ar": "علاقة الطالب"},
"newReferral": {"en": "New Referral", "ar": "إحالة جديدة"}, "newReferral": {"en": "New Referral", "ar": "إحالة جديدة"},
"searchForReferrals": {"en": "Search For Referrals", "ar": "ابحث عن الإحالات"} "searchForReferrals": {"en": "Search For Referrals", "ar": "ابحث عن الإحالات"},
"covid-select-procedure": {"en": "Please select the procedure:", "ar": "الرجاء تحديد الإجراء:"},
"online-consultation": {"en": "Online Consultation", "ar": "استشارة مباشرة"},
"expected-weiting": {"en": "Waiting time to start LiveCare consultation ", "ar": "وقت الانتظار المتوقع لبدء استشارة لايف كير"},
"er-consult-fee": {"en": "Consultation Fee", "ar": "رسوم الاستشارة"},
"insured-patient": {"en": "If you're Insurance patient, you have only have to pay the co-payment", "ar": "إذا كنت مريضًا في مجال التأمين ، فليس عليك سوى دفع المبلغ المشترك"},
"i-accept-terms": {"en": "I Accept the Terms And Conditions", "ar": "أوافق على الشروط والأحكام"},
"upcoming-pay-options": {"en": "You can pay by the following Options:", "ar": "يمكنك الدفع عن طريق الخيارات التالية:"},
"please-accept-terms": {"en": "Please accept terms & conditions to continue", "ar": "يرجى قبول الشروط والأحكام للمتابعة"},
}; };

@ -23,7 +23,7 @@ class ActivePrescriptionReport {
dynamic patientName; dynamic patientName;
dynamic phoneOffice1; dynamic phoneOffice1;
dynamic prescriptionQR; dynamic prescriptionQR;
int prescriptionTimes; double prescriptionTimes;
dynamic productImage; dynamic productImage;
String productImageBase64; String productImageBase64;
String productImageString; String productImageString;

@ -1,140 +1,465 @@
class InsuranceApprovalDetails {
String procedureName;
String status;
String isInvoicedDesc;
InsuranceApprovalDetails({
this.procedureName,
this.status,
this.isInvoicedDesc,
});
InsuranceApprovalDetails.fromJson(Map<String, dynamic> json) {
try {
isInvoicedDesc = json['IsInvoicedDesc'];
status = json['Status'];
procedureName = json['ProcedureName'];
} catch (e) {
print(e);
}
}
}
class InsuranceApprovalModel { class InsuranceApprovalModel {
InsuranceApprovalDetails approvalDetails; String setupID;
double versionID;
int channel;
int languageID;
String iPAdress;
String generalid;
int patientOutSA;
String sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
int patientID;
String tokenID;
int patientTypeID;
int patientType;
int eXuldAPPNO;
int projectID; int projectID;
String doctorName;
String clinicName;
String patientDescription;
int approvalNo; int approvalNo;
String approvalStatusDescption; String approvalDate;
int unUsedCount; int patientType;
int patientID;
//String companyName; int companyID;
int subCategoryID;
int doctorID;
int clinicID;
int approvalType;
String inpatientApprovalSubType;
String validFrom;
String vaildDays;
String validTo;
bool isApprovalOnGross;
bool isPackage;
int requestedAmount;
int actualApprovedAmount;
int aviliableAmount;
String companyApprovalNo;
int progNoteOrderNo;
String submitOn;
String receiptOn;
String remarks1;
String remarks2;
int status;
String feedbackStatusBy;
String feedbackStatus;
String feedbackStatusOn;
int authorizerID;
String expiryDate; String expiryDate;
String rceiptOn;
int appointmentNo; int appointmentNo;
int admissionNo;
int admissionRequestNo;
int createdBy;
String createdOn;
int editedBy;
String editedOn;
String rowVer;
bool isAddlDiscApplied;
int inProgressReasonID;
String extendedBy;
String extendedOn;
int subPolicyNo;
int noOrderAuthorizerID;
bool isVerbalApproval;
String subStatus;
bool isNotificationSend;
String eApprovalStatus;
String eApprovalRemarks;
bool isEmailSentOnDelayApproval;
int eAuthorizationID;
InsuranceApprovalDetails apporvalDetails;
String approvalStatusDescption;
String clinicName;
String clinicNameN;
String companyName;
String doctorImageURL;
String doctorName;
String doctorNameN;
int doctorRate;
String doctorTitle;
int gender;
String genderDescription;
bool isActiveDoctorProfile;
bool isExecludeDoctor;
bool isInOutPatient;
String isInOutPatientDescription;
String isInOutPatientDescriptionN;
bool isLiveCareAppointment;
String projectName;
String projectNameN;
String qR;
List<String> speciality;
String strApprovalDate;
String strExpiryDate;
String strSubmitDate;
int totaUnUsedCount;
int unUsedCount;
InsuranceApprovalModel( InsuranceApprovalModel(
{this.versionID, {this.setupID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.patientID,
this.tokenID,
this.patientTypeID,
this.patientType,
this.eXuldAPPNO,
this.projectID, this.projectID,
this.doctorName,
this.clinicName,
this.patientDescription,
this.approvalNo, this.approvalNo,
this.approvalStatusDescption, this.approvalDate,
this.unUsedCount, this.patientType,
//this.companyName, this.patientID,
this.companyID,
this.subCategoryID,
this.doctorID,
this.clinicID,
this.approvalType,
this.inpatientApprovalSubType,
this.validFrom,
this.vaildDays,
this.validTo,
this.isApprovalOnGross,
this.isPackage,
this.requestedAmount,
this.actualApprovedAmount,
this.aviliableAmount,
this.companyApprovalNo,
this.progNoteOrderNo,
this.submitOn,
this.receiptOn,
this.remarks1,
this.remarks2,
this.status,
this.feedbackStatusBy,
this.feedbackStatus,
this.feedbackStatusOn,
this.authorizerID,
this.expiryDate, this.expiryDate,
this.rceiptOn, this.appointmentNo,
this.approvalDetails, this.admissionNo,
this.appointmentNo}); this.admissionRequestNo,
this.createdBy,
InsuranceApprovalDetails x = InsuranceApprovalDetails(); this.createdOn,
this.editedBy,
this.editedOn,
this.rowVer,
this.isAddlDiscApplied,
this.inProgressReasonID,
this.extendedBy,
this.extendedOn,
this.subPolicyNo,
this.noOrderAuthorizerID,
this.isVerbalApproval,
this.subStatus,
this.isNotificationSend,
this.eApprovalStatus,
this.eApprovalRemarks,
this.isEmailSentOnDelayApproval,
this.eAuthorizationID,
this.apporvalDetails,
this.approvalStatusDescption,
this.clinicName,
this.clinicNameN,
this.companyName,
this.doctorImageURL,
this.doctorName,
this.doctorNameN,
this.doctorRate,
this.doctorTitle,
this.gender,
this.genderDescription,
this.isActiveDoctorProfile,
this.isExecludeDoctor,
this.isInOutPatient,
this.isInOutPatientDescription,
this.isInOutPatientDescriptionN,
this.isLiveCareAppointment,
this.projectName,
this.projectNameN,
this.qR,
this.speciality,
this.strApprovalDate,
this.strExpiryDate,
this.strSubmitDate,
this.totaUnUsedCount,
this.unUsedCount});
InsuranceApprovalModel.fromJson(Map<String, dynamic> json) { InsuranceApprovalModel.fromJson(Map<String, dynamic> json) {
try { setupID = json['SetupID'];
rceiptOn = json['ReceiptOn']; projectID = json['ProjectID'];
expiryDate = json['ExpiryDate']; approvalNo = json['ApprovalNo'];
//companyName = json['CompanyName']; approvalDate = json['ApprovalDate'];
unUsedCount = json['TotaUnUsedCount']; patientType = json['PatientType'];
approvalStatusDescption = json['ApprovalStatusDescption']; patientID = json['PatientID'];
approvalNo = json['ApprovalNo']; companyID = json['CompanyID'];
patientDescription = json['IsInOutPatientDescription']; subCategoryID = json['SubCategoryID'];
versionID = json['VersionID']; doctorID = json['DoctorID'];
channel = json['Channel']; clinicID = json['ClinicID'];
languageID = json['LanguageID']; approvalType = json['ApprovalType'];
iPAdress = json['IPAdress']; inpatientApprovalSubType = json['InpatientApprovalSubType'];
generalid = json['generalid']; validFrom = json['ValidFrom'];
patientOutSA = json['PatientOutSA']; vaildDays = json['VaildDays'];
sessionID = json['SessionID']; validTo = json['ValidTo'];
isDentalAllowedBackend = json['isDentalAllowedBackend']; isApprovalOnGross = json['IsApprovalOnGross'];
deviceTypeID = json['DeviceTypeID']; isPackage = json['IsPackage'];
patientID = json['PatientID']; requestedAmount = json['RequestedAmount'];
tokenID = json['TokenID']; actualApprovedAmount = json['ActualApprovedAmount'];
patientTypeID = json['PatientTypeID']; aviliableAmount = json['AviliableAmount'];
patientType = json['PatientType']; companyApprovalNo = json['CompanyApprovalNo'];
eXuldAPPNO = json['EXuldAPPNO']; progNoteOrderNo = json['ProgNoteOrderNo'];
projectID = json['ProjectID']; submitOn = json['SubmitOn'];
doctorName = json['DoctorName']; receiptOn = json['ReceiptOn'];
clinicName = json['ClinicName']; remarks1 = json['Remarks1'];
approvalDetails = remarks2 = json['Remarks2'];
InsuranceApprovalDetails.fromJson(json['ApporvalDetails'][0]); status = json['Status'];
appointmentNo = json['AppointmentNo']; feedbackStatusBy = json['FeedbackStatusBy'];
} catch (e) { feedbackStatus = json['FeedbackStatus'];
print(e); feedbackStatusOn = json['FeedbackStatusOn'];
authorizerID = json['AuthorizerID'];
expiryDate = json['ExpiryDate'];
appointmentNo = json['AppointmentNo'];
admissionNo = json['AdmissionNo'];
admissionRequestNo = json['AdmissionRequestNo'];
createdBy = json['CreatedBy'];
createdOn = json['CreatedOn'];
editedBy = json['EditedBy'];
editedOn = json['EditedOn'];
rowVer = json['RowVer'];
isAddlDiscApplied = json['IsAddlDiscApplied'];
inProgressReasonID = json['InProgressReasonID'];
extendedBy = json['ExtendedBy'];
extendedOn = json['ExtendedOn'];
subPolicyNo = json['SubPolicyNo'];
noOrderAuthorizerID = json['NoOrderAuthorizerID'];
isVerbalApproval = json['isVerbalApproval'];
subStatus = json['SubStatus'];
isNotificationSend = json['IsNotificationSend'];
eApprovalStatus = json['EApprovalStatus'];
eApprovalRemarks = json['EApprovalRemarks'];
isEmailSentOnDelayApproval = json['IsEmailSentOnDelayApproval'];
eAuthorizationID = json['EAuthorizationID'];
if (json['ApporvalDetails'] != null) {
apporvalDetails = InsuranceApprovalDetails.fromJson(json['ApporvalDetails'][0]);
} }
approvalStatusDescption = json['ApprovalStatusDescption'];
clinicName = json['ClinicName'];
clinicNameN = json['ClinicNameN'];
companyName = json['CompanyName'];
doctorImageURL = json['DoctorImageURL'];
doctorName = json['DoctorName'];
doctorNameN = json['DoctorNameN'];
doctorRate = json['DoctorRate'];
doctorTitle = json['DoctorTitle'];
gender = json['Gender'];
genderDescription = json['GenderDescription'];
isActiveDoctorProfile = json['IsActiveDoctorProfile'];
isExecludeDoctor = json['IsExecludeDoctor'];
isInOutPatient = json['IsInOutPatient'];
isInOutPatientDescription = json['IsInOutPatientDescription'];
isInOutPatientDescriptionN = json['IsInOutPatientDescriptionN'];
isLiveCareAppointment = json['IsLiveCareAppointment'];
projectName = json['ProjectName'];
projectNameN = json['ProjectNameN'];
qR = json['QR'];
speciality = json['Speciality'].cast<String>();
strApprovalDate = json['StrApprovalDate'];
strExpiryDate = json['StrExpiryDate'];
strSubmitDate = json['StrSubmitDate'];
totaUnUsedCount = json['TotaUnUsedCount'];
unUsedCount = json['UnUsedCount'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
data['VersionID'] = this.versionID; data['SetupID'] = this.setupID;
data['Channel'] = this.channel; data['ProjectID'] = this.projectID;
data['LanguageID'] = this.languageID; data['ApprovalNo'] = this.approvalNo;
data['IPAdress'] = this.iPAdress; data['ApprovalDate'] = this.approvalDate;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
data['PatientID'] = this.patientID;
data['TokenID'] = this.tokenID;
data['PatientTypeID'] = this.patientTypeID;
data['PatientType'] = this.patientType; data['PatientType'] = this.patientType;
if (appointmentNo == null) { data['PatientID'] = this.patientID;
data['EXuldAPPNO'] = this.eXuldAPPNO; data['CompanyID'] = this.companyID;
data['ProjectID'] = this.projectID; data['SubCategoryID'] = this.subCategoryID;
} data['DoctorID'] = this.doctorID;
if (appointmentNo != null) { data['ClinicID'] = this.clinicID;
data['AppointmentNo'] = this.appointmentNo; data['ApprovalType'] = this.approvalType;
data['InpatientApprovalSubType'] = this.inpatientApprovalSubType;
data['ValidFrom'] = this.validFrom;
data['VaildDays'] = this.vaildDays;
data['ValidTo'] = this.validTo;
data['IsApprovalOnGross'] = this.isApprovalOnGross;
data['IsPackage'] = this.isPackage;
data['RequestedAmount'] = this.requestedAmount;
data['ActualApprovedAmount'] = this.actualApprovedAmount;
data['AviliableAmount'] = this.aviliableAmount;
data['CompanyApprovalNo'] = this.companyApprovalNo;
data['ProgNoteOrderNo'] = this.progNoteOrderNo;
data['SubmitOn'] = this.submitOn;
data['ReceiptOn'] = this.receiptOn;
data['Remarks1'] = this.remarks1;
data['Remarks2'] = this.remarks2;
data['Status'] = this.status;
data['FeedbackStatusBy'] = this.feedbackStatusBy;
data['FeedbackStatus'] = this.feedbackStatus;
data['FeedbackStatusOn'] = this.feedbackStatusOn;
data['AuthorizerID'] = this.authorizerID;
data['ExpiryDate'] = this.expiryDate;
data['AppointmentNo'] = this.appointmentNo;
data['AdmissionNo'] = this.admissionNo;
data['AdmissionRequestNo'] = this.admissionRequestNo;
data['CreatedBy'] = this.createdBy;
data['CreatedOn'] = this.createdOn;
data['EditedBy'] = this.editedBy;
data['EditedOn'] = this.editedOn;
data['RowVer'] = this.rowVer;
data['IsAddlDiscApplied'] = this.isAddlDiscApplied;
data['InProgressReasonID'] = this.inProgressReasonID;
data['ExtendedBy'] = this.extendedBy;
data['ExtendedOn'] = this.extendedOn;
data['SubPolicyNo'] = this.subPolicyNo;
data['NoOrderAuthorizerID'] = this.noOrderAuthorizerID;
data['isVerbalApproval'] = this.isVerbalApproval;
data['SubStatus'] = this.subStatus;
data['IsNotificationSend'] = this.isNotificationSend;
data['EApprovalStatus'] = this.eApprovalStatus;
data['EApprovalRemarks'] = this.eApprovalRemarks;
data['IsEmailSentOnDelayApproval'] = this.isEmailSentOnDelayApproval;
data['EAuthorizationID'] = this.eAuthorizationID;
if (this.apporvalDetails != null) {
data['ApporvalDetails'] = this.apporvalDetails.toJson;
} }
data['ApprovalStatusDescption'] = this.approvalStatusDescption;
data['ClinicName'] = this.clinicName;
data['ClinicNameN'] = this.clinicNameN;
data['CompanyName'] = this.companyName;
data['DoctorImageURL'] = this.doctorImageURL;
data['DoctorName'] = this.doctorName;
data['DoctorNameN'] = this.doctorNameN;
data['DoctorRate'] = this.doctorRate;
data['DoctorTitle'] = this.doctorTitle;
data['Gender'] = this.gender;
data['GenderDescription'] = this.genderDescription;
data['IsActiveDoctorProfile'] = this.isActiveDoctorProfile;
data['IsExecludeDoctor'] = this.isExecludeDoctor;
data['IsInOutPatient'] = this.isInOutPatient;
data['IsInOutPatientDescription'] = this.isInOutPatientDescription;
data['IsInOutPatientDescriptionN'] = this.isInOutPatientDescriptionN;
data['IsLiveCareAppointment'] = this.isLiveCareAppointment;
data['ProjectName'] = this.projectName;
data['ProjectNameN'] = this.projectNameN;
data['QR'] = this.qR;
data['Speciality'] = this.speciality;
data['StrApprovalDate'] = this.strApprovalDate;
data['StrExpiryDate'] = this.strExpiryDate;
data['StrSubmitDate'] = this.strSubmitDate;
data['TotaUnUsedCount'] = this.totaUnUsedCount;
data['UnUsedCount'] = this.unUsedCount;
return data;
}
}
class InsuranceApprovalDetails {
int setupID;
int projectID;
int approvalNo;
int lineItemNo;
int orderType;
int procedureID;
int toothNo;
int price;
int approvedAmount;
String unapprovedPatientShare;
int waivedAmount;
String discountType;
int discountValue;
String shareType;
String patientShareTypeValue;
String companyShareTypeValue;
String patientShare;
String companyShare;
int deductableAmount;
String disapprovedRemarks;
int progNoteOrderNo;
int progNoteLineItemNo;
String invoiceTransactionType;
int invoiceNo;
String procedureName;
String procedureNameN;
String status;
bool isInvoiced;
String isInvoicedDesc;
InsuranceApprovalDetails(
{this.setupID,
this.projectID,
this.approvalNo,
this.lineItemNo,
this.orderType,
this.procedureID,
this.toothNo,
this.price,
this.approvedAmount,
this.unapprovedPatientShare,
this.waivedAmount,
this.discountType,
this.discountValue,
this.shareType,
this.patientShareTypeValue,
this.companyShareTypeValue,
this.patientShare,
this.companyShare,
this.deductableAmount,
this.disapprovedRemarks,
this.progNoteOrderNo,
this.progNoteLineItemNo,
this.invoiceTransactionType,
this.invoiceNo,
this.procedureName,
this.procedureNameN,
this.status,
this.isInvoiced,
this.isInvoicedDesc});
InsuranceApprovalDetails.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID'];
projectID = json['ProjectID'];
approvalNo = json['ApprovalNo'];
lineItemNo = json['LineItemNo'];
orderType = json['OrderType'];
procedureID = json['ProcedureID'];
toothNo = json['ToothNo'];
price = json['Price'];
approvedAmount = json['ApprovedAmount'];
unapprovedPatientShare = json['UnapprovedPatientShare'];
waivedAmount = json['WaivedAmount'];
discountType = json['DiscountType'];
discountValue = json['DiscountValue'];
shareType = json['ShareType'];
patientShareTypeValue = json['PatientShareTypeValue'];
companyShareTypeValue = json['CompanyShareTypeValue'];
patientShare = json['PatientShare'];
companyShare = json['CompanyShare'];
deductableAmount = json['DeductableAmount'];
disapprovedRemarks = json['DisapprovedRemarks'];
progNoteOrderNo = json['ProgNoteOrderNo'];
progNoteLineItemNo = json['ProgNoteLineItemNo'];
invoiceTransactionType = json['InvoiceTransactionType'];
invoiceNo = json['InvoiceNo'];
procedureName = json['ProcedureName'];
procedureNameN = json['ProcedureNameN'];
status = json['Status'];
isInvoiced = json['IsInvoiced'];
isInvoicedDesc = json['IsInvoicedDesc'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['SetupID'] = this.setupID;
data['ProjectID'] = this.projectID;
data['ApprovalNo'] = this.approvalNo;
data['LineItemNo'] = this.lineItemNo;
data['OrderType'] = this.orderType;
data['ProcedureID'] = this.procedureID;
data['ToothNo'] = this.toothNo;
data['Price'] = this.price;
data['ApprovedAmount'] = this.approvedAmount;
data['UnapprovedPatientShare'] = this.unapprovedPatientShare;
data['WaivedAmount'] = this.waivedAmount;
data['DiscountType'] = this.discountType;
data['DiscountValue'] = this.discountValue;
data['ShareType'] = this.shareType;
data['PatientShareTypeValue'] = this.patientShareTypeValue;
data['CompanyShareTypeValue'] = this.companyShareTypeValue;
data['PatientShare'] = this.patientShare;
data['CompanyShare'] = this.companyShare;
data['DeductableAmount'] = this.deductableAmount;
data['DisapprovedRemarks'] = this.disapprovedRemarks;
data['ProgNoteOrderNo'] = this.progNoteOrderNo;
data['ProgNoteLineItemNo'] = this.progNoteLineItemNo;
data['InvoiceTransactionType'] = this.invoiceTransactionType;
data['InvoiceNo'] = this.invoiceNo;
data['ProcedureName'] = this.procedureName;
data['ProcedureNameN'] = this.procedureNameN;
data['Status'] = this.status;
data['IsInvoiced'] = this.isInvoiced;
data['IsInvoicedDesc'] = this.isInvoicedDesc;
return data; return data;
} }
} }

@ -2,24 +2,29 @@ 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/AlHabibMedicalService/HealthCalculator/ClinicCategory.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/ClinicCategory.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart';
import 'package:diplomaticquarterapp/core/model/health_calcolator/get_doctor_by_time_model.dart';
import 'package:diplomaticquarterapp/core/model/health_calcolator/get_doctor_by_time_request_model.dart';
import 'package:diplomaticquarterapp/core/model/health_calcolator/get_doctor_list_calcolation_model.dart';
import 'package:diplomaticquarterapp/core/model/health_calcolator/get_doctor_list_calcolation_request_model.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:flutter/cupertino.dart';
class BariatricsService extends BaseService { class BariatricsService extends BaseService {
List<ClinicCategory> clinicCategoryList = []; List<ClinicCategory> clinicCategoryList = [];
List<DiseasesByClinic> diseasesList = []; List<DiseasesByClinic> diseasesList = [];
List<GetDoctorListModel> doctorList = [];
List<DoctorListByTimeModel> doctorListByTime = [];
Future getClinicCategory() async { Future getClinicCategory() async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
var languageID = var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
body['ClinicID'] = 108; // hint: it is static depend on IONIC project body['ClinicID'] = 108; // hint: it is static depend on IONIC project
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
body['LanguageID'] = languageID == 'ar' ? 1 : 2; body['LanguageID'] = languageID == 'ar' ? 1 : 2;
await baseAppClient.post(GET_CLINIC_CATEGORY, await baseAppClient.post(GET_CLINIC_CATEGORY, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
clinicCategoryList.clear(); clinicCategoryList.clear();
if (response['ClinicCategoryList'] != null) if (response['ClinicCategoryList'] != null)
response['ClinicCategoryList'].forEach((city) { response['ClinicCategoryList'].forEach((city) {
@ -36,8 +41,7 @@ class BariatricsService extends BaseService {
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['ClinicID'] = 108; // hint: it is static depend on IONIC project body['ClinicID'] = 108; // hint: it is static depend on IONIC project
await baseAppClient.post(GET_DISEASE_BY_CLINIC_ID, await baseAppClient.post(GET_DISEASE_BY_CLINIC_ID, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
diseasesList.clear(); diseasesList.clear();
if (response['DiseasesByClinicList'] != null) if (response['DiseasesByClinicList'] != null)
response['DiseasesByClinicList'].forEach((city) { response['DiseasesByClinicList'].forEach((city) {
@ -51,8 +55,7 @@ class BariatricsService extends BaseService {
Future searchDoctorsByTime(DiseasesByClinic disease) async { Future searchDoctorsByTime(DiseasesByClinic disease) async {
hasError = false; hasError = false;
var languageID = var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['ClinicID'] = 108; // hint: it is static depend on IONIC project body['ClinicID'] = 108; // hint: it is static depend on IONIC project
@ -66,8 +69,38 @@ class BariatricsService extends BaseService {
body['Longitude'] = 0; body['Longitude'] = 0;
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
await baseAppClient.post(SEARCH_DOCTOR_BY_TIME, await baseAppClient.post(SEARCH_DOCTOR_BY_TIME, onSuccess: (dynamic response, int statusCode) {},
onSuccess: (dynamic response, int statusCode) { onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
Future getDoctorList({@required DiseasesByClinic disease}) async {
hasError = false;
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Map<String, dynamic> body = Map();
body['ClinicID'] = 108; // hint: it is static depend on IONIC project
body['ContinueDentalPlan'] = false;
body['IsGetNearAppointment'] = false;
body['IsSearchAppointmnetByClinicID'] = true;
body['LanguageID'] = languageID == 'ar' ? 1 : 2;
body['Latitude'] = 0;
body['License'] = true;
body['Longitude'] = 0;
body['PatientID'] = 0;
body['isDentalAllowedBackend'] = false;
if(disease != null)
body['DiseaseID'] = disease.diseasesID;
await baseAppClient.post(GET_DOCTOR_LIST_BY_TIME, onSuccess: (dynamic response, int statusCode) {
doctorListByTime.clear();
if (response['DoctorList'] != null)
response['DoctorList'].forEach((city) {
doctorListByTime.add(DoctorListByTimeModel.fromJson(city));
});
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;

@ -29,8 +29,7 @@ AppSharedPreferences sharedPref = new AppSharedPreferences();
/// onFailure: (String error, int statusCode) {}, /// onFailure: (String error, int statusCode) {},
/// body: Map(); /// body: Map();
/// ///
AuthenticatedUserObject authenticatedUserObject = AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
locator<AuthenticatedUserObject>();
VitalSignService _vitalSignService = locator<VitalSignService>(); VitalSignService _vitalSignService = locator<VitalSignService>();
class BaseAppClient { class BaseAppClient {
@ -50,14 +49,10 @@ class BaseAppClient {
//Map profile = await sharedPref.getObj(DOCTOR_PROFILE); //Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
var pharmacyToken = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN); var pharmacyToken = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN);
var user = await sharedPref.getObject(USER_PROFILE); var user = await sharedPref.getObject(USER_PROFILE);
Map<String, String> headers = { Map<String, String> headers = {'Content-Type': 'application/json', 'Accept': 'application/json'};
'Content-Type': 'application/json',
'Accept': 'application/json'
};
if (!isExternal) { if (!isExternal) {
String token = await sharedPref.getString(TOKEN); String token = await sharedPref.getString(TOKEN);
var languageID = var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
if (body.containsKey('SetupID')) { if (body.containsKey('SetupID')) {
body['SetupID'] = body.containsKey('SetupID') body['SetupID'] = body.containsKey('SetupID')
? body['SetupID'] != null ? body['SetupID'] != null
@ -68,23 +63,17 @@ class BaseAppClient {
body['VersionID'] = VERSION_ID; body['VersionID'] = VERSION_ID;
body['Channel'] = CHANNEL; body['Channel'] = CHANNEL;
body['LanguageID'] = languageID == 'ar' ? 1 : 2; body['LanguageID'] = (languageID == 'ar' ? 1 : 2);
body['IPAdress'] = IP_ADDRESS; body['IPAdress'] = IP_ADDRESS;
body['generalid'] = GENERAL_ID; body['generalid'] = GENERAL_ID;
body['PatientOutSA'] = body.containsKey('PatientOutSA')
? body['PatientOutSA'] != null
? body['PatientOutSA']
: PATIENT_OUT_SA
: PATIENT_OUT_SA;
if (body.containsKey('isDentalAllowedBackend')) { if (body.containsKey('isDentalAllowedBackend')) {
body['isDentalAllowedBackend'] = body['isDentalAllowedBackend'] = body.containsKey('isDentalAllowedBackend')
body.containsKey('isDentalAllowedBackend') ? body['isDentalAllowedBackend'] != null
? body['isDentalAllowedBackend'] != null ? body['isDentalAllowedBackend']
? body['isDentalAllowedBackend'] : IS_DENTAL_ALLOWED_BACKEND
: IS_DENTAL_ALLOWED_BACKEND : IS_DENTAL_ALLOWED_BACKEND;
: IS_DENTAL_ALLOWED_BACKEND;
} }
body['DeviceTypeID'] = Platform.isAndroid ? 1 : 2; body['DeviceTypeID'] = Platform.isAndroid ? 1 : 2;
@ -107,19 +96,20 @@ class BaseAppClient {
: PATIENT_TYPE_ID; : PATIENT_TYPE_ID;
if (user != null) { if (user != null) {
body['TokenID'] = token; body['TokenID'] = token;
body['PatientID'] = body['PatientID'] != null body['PatientID'] = body['PatientID'] != null ? body['PatientID'] : user['PatientID'];
? body['PatientID']
: user['PatientID'];
body['PatientOutSA'] = user['OutSA']; body['PatientOutSA'] = user['OutSA'];
body['PatientOutSA'] = body.containsKey('PatientOutSA')
? body['PatientOutSA'] != null
? body['PatientOutSA']
: PATIENT_OUT_SA
: PATIENT_OUT_SA;
body['SessionID'] = SESSION_ID; //getSe body['SessionID'] = SESSION_ID; //getSe
headers = { headers = {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'Accept': 'application/json', 'Accept': 'application/json',
'Authorization': pharmacyToken, 'Authorization': pharmacyToken,
'Mobilenumber': user != null 'Mobilenumber': user != null ? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString()) : "",
? Utils.getPhoneNumberWithoutZero(
user['MobileNumber'].toString())
: "",
'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9', 'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
'Username': user['PatientID'].toString(), 'Username': user['PatientID'].toString(),
}; };
@ -131,8 +121,7 @@ class BaseAppClient {
print("Body : ${json.encode(body)}"); print("Body : ${json.encode(body)}");
if (await Utils.checkConnection()) { if (await Utils.checkConnection()) {
final response = await http.post(url.trim(), final response = await http.post(url.trim(), body: json.encode(body), headers: headers);
body: json.encode(body), headers: headers);
final int statusCode = response.statusCode; final int statusCode = response.statusCode;
print("statusCode :$statusCode"); print("statusCode :$statusCode");
if (statusCode < 200 || statusCode >= 400 || json == null) { if (statusCode < 200 || statusCode >= 400 || json == null) {
@ -144,8 +133,7 @@ class BaseAppClient {
onSuccess(parsed, statusCode); onSuccess(parsed, statusCode);
} else { } else {
if (parsed['ErrorType'] == 4) { if (parsed['ErrorType'] == 4) {
navigateToAppUpdate( navigateToAppUpdate(AppGlobal.context, parsed['ErrorEndUserMessage']);
AppGlobal.context, parsed['ErrorEndUserMessage']);
} }
if (isAllowAny) { if (isAllowAny) {
onSuccess(parsed, statusCode); onSuccess(parsed, statusCode);
@ -160,34 +148,24 @@ class BaseAppClient {
if (parsed != null) { if (parsed != null) {
onSuccess(parsed, statusCode); onSuccess(parsed, statusCode);
} else { } else {
onFailure( onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
statusCode);
logout(); logout();
} }
} }
} else if (parsed['MessageStatus'] == 1 || } else if (parsed['MessageStatus'] == 1 || parsed['SMSLoginRequired'] == true) {
parsed['SMSLoginRequired'] == true) {
onSuccess(parsed, statusCode); onSuccess(parsed, statusCode);
} else if (parsed['MessageStatus'] == 2 && } else if (parsed['MessageStatus'] == 2 && parsed['IsAuthenticated']) {
parsed['IsAuthenticated']) {
if (parsed['SameClinicApptList'] != null) { if (parsed['SameClinicApptList'] != null) {
onSuccess(parsed, statusCode); onSuccess(parsed, statusCode);
} else { } else {
if (parsed['message'] == null && if (parsed['message'] == null && parsed['ErrorEndUserMessage'] == null) {
parsed['ErrorEndUserMessage'] == null) {
if (parsed['ErrorSearchMsg'] == null) { if (parsed['ErrorSearchMsg'] == null) {
onFailure("Server Error found with no available message", onFailure("Server Error found with no available message", statusCode);
statusCode);
} else { } else {
onFailure(parsed['ErrorSearchMsg'], statusCode); onFailure(parsed['ErrorSearchMsg'], statusCode);
} }
} else { } else {
onFailure( onFailure(parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
parsed['message'] ??
parsed['ErrorEndUserMessage'] ??
parsed['ErrorMessage'],
statusCode);
} }
} }
} else if (!parsed['IsAuthenticated']) { } else if (!parsed['IsAuthenticated']) {
@ -201,9 +179,7 @@ class BaseAppClient {
if (parsed['message'] != null) { if (parsed['message'] != null) {
onFailure(parsed['message'] ?? parsed['message'], statusCode); onFailure(parsed['message'] ?? parsed['message'], statusCode);
} else { } else {
onFailure( onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
statusCode);
} }
} }
} }
@ -240,16 +216,13 @@ class BaseAppClient {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'Accept': 'application/json', 'Accept': 'application/json',
'Authorization': token ?? '', 'Authorization': token ?? '',
'Mobilenumber': user != null 'Mobilenumber': user != null ? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString()) : "",
? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString())
: "",
'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9', 'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
'Username': user != null ? user['PatientID'].toString() : "", 'Username': user != null ? user['PatientID'].toString() : "",
}; };
if (!isExternal) { if (!isExternal) {
String token = await sharedPref.getString(TOKEN); String token = await sharedPref.getString(TOKEN);
var languageID = var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
if (body.containsKey('SetupID')) { if (body.containsKey('SetupID')) {
body['SetupID'] = body.containsKey('SetupID') body['SetupID'] = body.containsKey('SetupID')
? body['SetupID'] != null ? body['SetupID'] != null
@ -271,12 +244,11 @@ class BaseAppClient {
: PATIENT_OUT_SA; : PATIENT_OUT_SA;
if (body.containsKey('isDentalAllowedBackend')) { if (body.containsKey('isDentalAllowedBackend')) {
body['isDentalAllowedBackend'] = body['isDentalAllowedBackend'] = body.containsKey('isDentalAllowedBackend')
body.containsKey('isDentalAllowedBackend') ? body['isDentalAllowedBackend'] != null
? body['isDentalAllowedBackend'] != null ? body['isDentalAllowedBackend']
? body['isDentalAllowedBackend'] : IS_DENTAL_ALLOWED_BACKEND
: IS_DENTAL_ALLOWED_BACKEND : IS_DENTAL_ALLOWED_BACKEND;
: IS_DENTAL_ALLOWED_BACKEND;
} }
body['DeviceTypeID'] = Platform.isAndroid ? 1 : 2; body['DeviceTypeID'] = Platform.isAndroid ? 1 : 2;
@ -299,9 +271,7 @@ class BaseAppClient {
: PATIENT_TYPE_ID; : PATIENT_TYPE_ID;
if (user != null) { if (user != null) {
body['TokenID'] = token; body['TokenID'] = token;
body['PatientID'] = body['PatientID'] != null body['PatientID'] = body['PatientID'] != null ? body['PatientID'] : user['PatientID'];
? body['PatientID']
: user['PatientID'];
body['PatientOutSA'] = user['OutSA']; body['PatientOutSA'] = user['OutSA'];
body['SessionID'] = SESSION_ID; //getSe body['SessionID'] = SESSION_ID; //getSe
headers = { headers = {
@ -320,8 +290,7 @@ class BaseAppClient {
print("Body : ${json.encode(body)}"); print("Body : ${json.encode(body)}");
if (await Utils.checkConnection()) { if (await Utils.checkConnection()) {
final response = await http.post(url.trim(), final response = await http.post(url.trim(), body: json.encode(body), headers: headers);
body: json.encode(body), headers: headers);
final int statusCode = response.statusCode; final int statusCode = response.statusCode;
print("statusCode :$statusCode"); print("statusCode :$statusCode");
if (statusCode < 200 || statusCode >= 400 || json == null) { if (statusCode < 200 || statusCode >= 400 || json == null) {
@ -333,8 +302,7 @@ class BaseAppClient {
onSuccess(parsed, statusCode); onSuccess(parsed, statusCode);
} else { } else {
if (parsed['ErrorType'] == 4) { if (parsed['ErrorType'] == 4) {
navigateToAppUpdate( navigateToAppUpdate(AppGlobal.context, parsed['ErrorEndUserMessage']);
AppGlobal.context, parsed['ErrorEndUserMessage']);
} }
if (isAllowAny) { if (isAllowAny) {
onSuccess(parsed, statusCode); onSuccess(parsed, statusCode);
@ -349,34 +317,24 @@ class BaseAppClient {
if (parsed != null) { if (parsed != null) {
onSuccess(parsed, statusCode); onSuccess(parsed, statusCode);
} else { } else {
onFailure( onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
statusCode);
logout(); logout();
} }
} }
} else if (parsed['MessageStatus'] == 1 || } else if (parsed['MessageStatus'] == 1 || parsed['SMSLoginRequired'] == true) {
parsed['SMSLoginRequired'] == true) {
onSuccess(parsed, statusCode); onSuccess(parsed, statusCode);
} else if (parsed['MessageStatus'] == 2 && } else if (parsed['MessageStatus'] == 2 && parsed['IsAuthenticated']) {
parsed['IsAuthenticated']) {
if (parsed['SameClinicApptList'] != null) { if (parsed['SameClinicApptList'] != null) {
onSuccess(parsed, statusCode); onSuccess(parsed, statusCode);
} else { } else {
if (parsed['message'] == null && if (parsed['message'] == null && parsed['ErrorEndUserMessage'] == null) {
parsed['ErrorEndUserMessage'] == null) {
if (parsed['ErrorSearchMsg'] == null) { if (parsed['ErrorSearchMsg'] == null) {
onFailure("Server Error found with no available message", onFailure("Server Error found with no available message", statusCode);
statusCode);
} else { } else {
onFailure(parsed['ErrorSearchMsg'], statusCode); onFailure(parsed['ErrorSearchMsg'], statusCode);
} }
} else { } else {
onFailure( onFailure(parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
parsed['message'] ??
parsed['ErrorEndUserMessage'] ??
parsed['ErrorMessage'],
statusCode);
} }
} }
} else if (!parsed['IsAuthenticated']) { } else if (!parsed['IsAuthenticated']) {
@ -390,9 +348,7 @@ class BaseAppClient {
if (parsed['message'] != null) { if (parsed['message'] != null) {
onFailure(parsed['message'] ?? parsed['message'], statusCode); onFailure(parsed['message'] ?? parsed['message'], statusCode);
} else { } else {
onFailure( onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
statusCode);
} }
} }
} }
@ -408,8 +364,7 @@ class BaseAppClient {
} }
Future navigateToAppUpdate(context, String text) async { Future navigateToAppUpdate(context, String text) async {
Navigator.pushReplacement( Navigator.pushReplacement(context, FadePage(page: AppUpdatePage(appUpdateText: text)));
context, FadePage(page: AppUpdatePage(appUpdateText: text)));
} }
get(String endPoint, get(String endPoint,
@ -433,10 +388,7 @@ class BaseAppClient {
if (await Utils.checkConnection()) { if (await Utils.checkConnection()) {
final response = await http.get( final response = await http.get(
url.trim(), url.trim(),
headers: { headers: {'Content-Type': 'application/json', 'Accept': 'application/json'},
'Content-Type': 'application/json',
'Accept': 'application/json'
},
); );
final int statusCode = response.statusCode; final int statusCode = response.statusCode;
print("statusCode :$statusCode"); print("statusCode :$statusCode");
@ -480,9 +432,7 @@ class BaseAppClient {
'Content-Type': 'text/html; charset=utf-8', 'Content-Type': 'text/html; charset=utf-8',
'Accept': 'application/json', 'Accept': 'application/json',
'Authorization': token ?? '', 'Authorization': token ?? '',
'Mobilenumber': user != null 'Mobilenumber': user != null ? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString()) : "",
? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString())
: "",
'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9', 'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
'Username': user != null ? user['PatientID'].toString() : "", 'Username': user != null ? user['PatientID'].toString() : "",
}); });
@ -491,8 +441,7 @@ class BaseAppClient {
if (statusCode < 200 || statusCode >= 400 || json == null) { if (statusCode < 200 || statusCode >= 400 || json == null) {
if (statusCode == 401) { if (statusCode == 401) {
AppToast.showErrorToast( AppToast.showErrorToast(message: TranslationBase.of(AppGlobal.context).pharmacyRelogin);
message: TranslationBase.of(AppGlobal.context).pharmacyRelogin);
Navigator.of(AppGlobal.context).pushNamed(HOME); Navigator.of(AppGlobal.context).pushNamed(HOME);
} else { } else {
onFailure('Error While Fetching data', statusCode); onFailure('Error While Fetching data', statusCode);
@ -520,10 +469,7 @@ class BaseAppClient {
final response = await http.post( final response = await http.post(
url.trim(), url.trim(),
body: json.encode(body), body: json.encode(body),
headers: { headers: {'Content-Type': 'application/json', 'Accept': 'application/json'},
'Content-Type': 'application/json',
'Accept': 'application/json'
},
); );
final int statusCode = response.statusCode; final int statusCode = response.statusCode;
@ -556,10 +502,7 @@ class BaseAppClient {
if (await Utils.checkConnection()) { if (await Utils.checkConnection()) {
final response = await http.get( final response = await http.get(
url.trim(), url.trim(),
headers: { headers: {'Content-Type': 'application/json', 'Accept': 'application/json'},
'Content-Type': 'application/json',
'Accept': 'application/json'
},
); );
final int statusCode = response.statusCode; final int statusCode = response.statusCode;
@ -586,10 +529,7 @@ class BaseAppClient {
final response = await http.put( final response = await http.put(
url.trim(), url.trim(),
body: json.encode(body), body: json.encode(body),
headers: { headers: {'Content-Type': 'application/json', 'Accept': 'application/json'},
'Content-Type': 'application/json',
'Accept': 'application/json'
},
); );
final int statusCode = response.statusCode; final int statusCode = response.statusCode;
@ -622,10 +562,7 @@ class BaseAppClient {
if (await Utils.checkConnection()) { if (await Utils.checkConnection()) {
final response = await http.delete( final response = await http.delete(
url.trim(), url.trim(),
headers: { headers: {'Content-Type': 'application/json', 'Accept': 'application/json'},
'Content-Type': 'application/json',
'Accept': 'application/json'
},
); );
final int statusCode = response.statusCode; final int statusCode = response.statusCode;
@ -645,10 +582,8 @@ class BaseAppClient {
await sharedPref.remove(LOGIN_TOKEN_ID); await sharedPref.remove(LOGIN_TOKEN_ID);
await sharedPref.remove(PHARMACY_CUSTOMER_ID); await sharedPref.remove(PHARMACY_CUSTOMER_ID);
await authenticatedUserObject.getUser(); await authenticatedUserObject.getUser();
Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).isLogin = Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).isLogin = false;
false; var model = Provider.of<ToDoCountProviderModel>(AppGlobal.context, listen: false);
var model =
Provider.of<ToDoCountProviderModel>(AppGlobal.context, listen: false);
_vitalSignService.weightKg = ""; _vitalSignService.weightKg = "";
_vitalSignService.heightCm = ""; _vitalSignService.heightCm = "";
model.setState(0, false); model.setState(0, false);
@ -662,8 +597,7 @@ class BaseAppClient {
static defaultHttpParameters() async { static defaultHttpParameters() async {
String token = await sharedPref.getString(TOKEN); String token = await sharedPref.getString(TOKEN);
var languageID = var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
var user = await sharedPref.getObject(USER_PROFILE); var user = await sharedPref.getObject(USER_PROFILE);
var params = {}; var params = {};
if (user != null) { if (user != null) {
@ -699,8 +633,7 @@ class BaseAppClient {
try { try {
if (isExternal) { if (isExternal) {
String token = await sharedPref.getString(TOKEN); String token = await sharedPref.getString(TOKEN);
var languageID = var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
var user = await sharedPref.getObject(USER_PROFILE); var user = await sharedPref.getObject(USER_PROFILE);
if (body.containsKey('SetupID')) { if (body.containsKey('SetupID')) {
body['SetupID'] = body.containsKey('SetupID') body['SetupID'] = body.containsKey('SetupID')
@ -723,12 +656,11 @@ class BaseAppClient {
: PATIENT_OUT_SA; : PATIENT_OUT_SA;
if (body.containsKey('isDentalAllowedBackend')) { if (body.containsKey('isDentalAllowedBackend')) {
body['isDentalAllowedBackend'] = body['isDentalAllowedBackend'] = body.containsKey('isDentalAllowedBackend')
body.containsKey('isDentalAllowedBackend') ? body['isDentalAllowedBackend'] != null
? body['isDentalAllowedBackend'] != null ? body['isDentalAllowedBackend']
? body['isDentalAllowedBackend'] : IS_DENTAL_ALLOWED_BACKEND
: IS_DENTAL_ALLOWED_BACKEND : IS_DENTAL_ALLOWED_BACKEND;
: IS_DENTAL_ALLOWED_BACKEND;
} }
body['DeviceTypeID'] = Platform.isAndroid ? 1 : 2; body['DeviceTypeID'] = Platform.isAndroid ? 1 : 2;
@ -751,9 +683,7 @@ class BaseAppClient {
: PATIENT_TYPE_ID; : PATIENT_TYPE_ID;
if (user != null) { if (user != null) {
body['TokenID'] = token; body['TokenID'] = token;
body['PatientID'] = body['PatientID'] != null body['PatientID'] = body['PatientID'] != null ? body['PatientID'] : user['PatientID'];
? body['PatientID']
: user['PatientID'];
body['PatientOutSA'] = user['OutSA']; body['PatientOutSA'] = user['OutSA'];
body['SessionID'] = SESSION_ID; //getSessionId(token); body['SessionID'] = SESSION_ID; //getSessionId(token);
} }
@ -765,17 +695,14 @@ class BaseAppClient {
var ss = json.encode(body); var ss = json.encode(body);
if (await Utils.checkConnection()) { if (await Utils.checkConnection()) {
final response = final response = await http.post(url.trim(), body: json.encode(body), headers: {
await http.post(url.trim(), body: json.encode(body), headers: {
// 'Content-Type': 'application/json', // 'Content-Type': 'application/json',
// 'Accept': 'application/json', // 'Accept': 'application/json',
// 'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9', // 'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'Accept': 'application/json', 'Accept': 'application/json',
'Authorization': token ?? '', 'Authorization': token ?? '',
'Mobilenumber': user != null 'Mobilenumber': user != null ? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString()) : "",
? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString())
: "",
'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9', 'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
'Username': user != null ? user['PatientID'].toString() : "", 'Username': user != null ? user['PatientID'].toString() : "",
}); });
@ -790,8 +717,7 @@ class BaseAppClient {
onSuccess(parsed, statusCode); onSuccess(parsed, statusCode);
} else { } else {
if (parsed['ErrorType'] == 4) { if (parsed['ErrorType'] == 4) {
navigateToAppUpdate( navigateToAppUpdate(AppGlobal.context, parsed['ErrorEndUserMessage']);
AppGlobal.context, parsed['ErrorEndUserMessage']);
} }
if (isAllowAny) { if (isAllowAny) {
onSuccess(parsed, statusCode); onSuccess(parsed, statusCode);
@ -806,31 +732,21 @@ class BaseAppClient {
if (parsed != null) { if (parsed != null) {
onSuccess(parsed, statusCode); onSuccess(parsed, statusCode);
} else { } else {
onFailure( onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
statusCode);
logout(); logout();
} }
} }
} else if (parsed['MessageStatus'] == 1 || } else if (parsed['MessageStatus'] == 1 || parsed['SMSLoginRequired'] == true) {
parsed['SMSLoginRequired'] == true) {
onSuccess(parsed, statusCode); onSuccess(parsed, statusCode);
} else if (parsed['MessageStatus'] == 2 && } else if (parsed['MessageStatus'] == 2 && parsed['IsAuthenticated']) {
parsed['IsAuthenticated']) { if (parsed['message'] == null && parsed['ErrorEndUserMessage'] == null) {
if (parsed['message'] == null &&
parsed['ErrorEndUserMessage'] == null) {
if (parsed['ErrorSearchMsg'] == null) { if (parsed['ErrorSearchMsg'] == null) {
onFailure("Server Error found with no available message", onFailure("Server Error found with no available message", statusCode);
statusCode);
} else { } else {
onFailure(parsed['ErrorSearchMsg'], statusCode); onFailure(parsed['ErrorSearchMsg'], statusCode);
} }
} else { } else {
onFailure( onFailure(parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
parsed['message'] ??
parsed['ErrorEndUserMessage'] ??
parsed['ErrorMessage'],
statusCode);
} }
} else if (!parsed['IsAuthenticated']) { } else if (!parsed['IsAuthenticated']) {
await logout(); await logout();
@ -843,9 +759,7 @@ class BaseAppClient {
if (parsed['message'] != null) { if (parsed['message'] != null) {
onFailure(parsed['message'] ?? parsed['message'], statusCode); onFailure(parsed['message'] ?? parsed['message'], statusCode);
} else { } else {
onFailure( onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
statusCode);
} }
} }
} }

@ -6,6 +6,7 @@ import 'package:diplomaticquarterapp/core/model/feedback/request_insert_coc_item
import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart'; import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
class FeedbackService extends BaseService { class FeedbackService extends BaseService {
List<COCItem> cOCItemList = List(); List<COCItem> cOCItemList = List();
@ -26,7 +27,7 @@ class FeedbackService extends BaseService {
_requestInsertCOCItem.details = details; _requestInsertCOCItem.details = details;
_requestInsertCOCItem.cOCTypeName = cOCTypeName; _requestInsertCOCItem.cOCTypeName = cOCTypeName;
_requestInsertCOCItem.formTypeID = cOCTypeName; _requestInsertCOCItem.formTypeID = cOCTypeName;
_requestInsertCOCItem.mobileNo = user.mobileNumber; _requestInsertCOCItem.mobileNo = "966" + Utils.getPhoneNumberWithoutZero(user.mobileNumber);
_requestInsertCOCItem.isUserLoggedIn = true; _requestInsertCOCItem.isUserLoggedIn = true;
_requestInsertCOCItem.projectID = user.projectID; _requestInsertCOCItem.projectID = user.projectID;
_requestInsertCOCItem.patientName = user.firstName + " " + user.lastName; _requestInsertCOCItem.patientName = user.firstName + " " + user.lastName;
@ -64,7 +65,7 @@ class FeedbackService extends BaseService {
hasError = false; hasError = false;
Map<String, dynamic> body = new Map<String, dynamic>(); Map<String, dynamic> body = new Map<String, dynamic>();
body['IdentificationNo'] = user.patientIdentificationNo; body['IdentificationNo'] = user.patientIdentificationNo;
body['MobileNo'] = user.mobileNumber; body['MobileNo'] = "966" + Utils.getPhoneNumberWithoutZero(user.mobileNumber);
body['Searching_type'] = '1'; body['Searching_type'] = '1';
await baseAppClient.post(GET_STATUS_FOR_COCO, await baseAppClient.post(GET_STATUS_FOR_COCO,

@ -1,6 +1,7 @@
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/insurance/Insurance_card_details.dart'; import 'package:diplomaticquarterapp/core/model/insurance/Insurance_card_details.dart';
import 'package:diplomaticquarterapp/core/model/insurance/ReauestInsuranceApprovalModel.dart';
import 'package:diplomaticquarterapp/core/model/insurance/insurance_approval.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.dart';
import 'package:diplomaticquarterapp/core/model/insurance/insurance_card_update_model.dart'; import 'package:diplomaticquarterapp/core/model/insurance/insurance_card_update_model.dart';
@ -25,8 +26,7 @@ class InsuranceCardService extends BaseService {
List<InsuranceCardDetailsModel> insuranceCardDetailsList = List(); List<InsuranceCardDetailsModel> insuranceCardDetailsList = List();
bool isHaveInsuranceCard = false; bool isHaveInsuranceCard = false;
GetAllSharedRecordsByStatusResponse getAllSharedRecordsByStatusResponse = GetAllSharedRecordsByStatusResponse getAllSharedRecordsByStatusResponse = GetAllSharedRecordsByStatusResponse();
GetAllSharedRecordsByStatusResponse();
clearInsuranceCard() { clearInsuranceCard() {
_cardList.clear(); _cardList.clear();
@ -36,19 +36,12 @@ class InsuranceCardService extends BaseService {
_cardUpdated.clear(); _cardUpdated.clear();
} }
RequestInsuranceApprovalModel _requestInsuranceApprovalModel = RequestInsuranceApprovalModel(isDentalAllowedBackend: false, patientTypeID: 1, patientType: 1, eXuldAPPNO: 0, projectID: 0);
InsuranceApprovalModel _insuranceApprovalModel = InsuranceApprovalModel(
isDentalAllowedBackend: false,
patientTypeID: 1,
patientType: 1,
eXuldAPPNO: 0,
projectID: 0);
Future getInsurance() async { Future getInsurance() async {
hasError = false; hasError = false;
_cardList.clear(); _cardList.clear();
await baseAppClient.post(GET_PAtIENTS_INSURANCE, await baseAppClient.post(GET_PAtIENTS_INSURANCE, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
response['List_PatientInsuranceCard'].forEach((item) { response['List_PatientInsuranceCard'].forEach((item) {
_cardList.add(InsuranceCardModel.fromJson(item)); _cardList.add(InsuranceCardModel.fromJson(item));
}); });
@ -60,10 +53,9 @@ class InsuranceCardService extends BaseService {
Future getInsuranceUpdate() async { Future getInsuranceUpdate() async {
hasError = false; hasError = false;
_cardList.clear(); _cardList.clear();
await baseAppClient.post(GET_PAtIENTS_INSURANCE_UPDATED, await baseAppClient.post(GET_PAtIENTS_INSURANCE_UPDATED, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) { _cardUpdated.clear();
_cardUpdated.clear();
response['List_PatientInsuranceCardHistory'].forEach((item) { response['List_PatientInsuranceCardHistory'].forEach((item) {
_cardUpdated.add(InsuranceUpdateModel.fromJson(item)); _cardUpdated.add(InsuranceUpdateModel.fromJson(item));
}); });
@ -77,17 +69,16 @@ class InsuranceCardService extends BaseService {
hasError = false; hasError = false;
// _cardList.clear(); // _cardList.clear();
if (appointmentNo != null) { if (appointmentNo != null) {
_insuranceApprovalModel.appointmentNo = appointmentNo; // _requestInsuranceApprovalModel.appointmentNo = appointmentNo;
_insuranceApprovalModel.eXuldAPPNO = null; _requestInsuranceApprovalModel.eXuldAPPNO = null;
_insuranceApprovalModel.projectID = null; _requestInsuranceApprovalModel.projectID = null;
} else { } else {
_insuranceApprovalModel.appointmentNo = null; // _requestInsuranceApprovalModel.appointmentNo = null;
_insuranceApprovalModel.eXuldAPPNO = 0; _requestInsuranceApprovalModel.eXuldAPPNO = 0;
_insuranceApprovalModel.projectID = 0; _requestInsuranceApprovalModel.projectID = 0;
} }
await baseAppClient.post(GET_PAtIENTS_INSURANCE_APPROVALS, await baseAppClient.post(GET_PAtIENTS_INSURANCE_APPROVALS, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
print(response['HIS_Approval_List'].length); print(response['HIS_Approval_List'].length);
_insuranceApproval.clear(); _insuranceApproval.clear();
_insuranceApproval.length = 0; _insuranceApproval.length = 0;
@ -97,14 +88,13 @@ class InsuranceCardService extends BaseService {
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: _insuranceApprovalModel.toJson()); }, body: _requestInsuranceApprovalModel.toJson());
} }
Future getFamilyFiles() async { Future getFamilyFiles() async {
var myFamily = await sharedPref.getObject(FAMILY_FILE); var myFamily = await sharedPref.getObject(FAMILY_FILE);
if (myFamily != null) { if (myFamily != null) {
getAllSharedRecordsByStatusResponse = getAllSharedRecordsByStatusResponse = GetAllSharedRecordsByStatusResponse.fromJson(myFamily);
GetAllSharedRecordsByStatusResponse.fromJson(myFamily);
} else { } else {
getSharedRecordByStatus(); getSharedRecordByStatus();
} }
@ -115,68 +105,75 @@ class InsuranceCardService extends BaseService {
dynamic localRes; dynamic localRes;
var request = GetAllSharedRecordsByStatusReq(); var request = GetAllSharedRecordsByStatusReq();
request.status = 0; request.status = 0;
await baseAppClient.post(GET_SHARED_RECORD_BY_STATUS, await baseAppClient.post(GET_SHARED_RECORD_BY_STATUS, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
AppToast.showErrorToast(message: error); AppToast.showErrorToast(message: error);
throw error; throw error;
}, body: request.toJson()); }, body: request.toJson());
sharedPref.setObject(FAMILY_FILE, localRes); sharedPref.setObject(FAMILY_FILE, localRes);
getAllSharedRecordsByStatusResponse = getAllSharedRecordsByStatusResponse = GetAllSharedRecordsByStatusResponse.fromJson(localRes);
GetAllSharedRecordsByStatusResponse.fromJson(localRes);
} catch (error) { } catch (error) {
print(error); print(error);
throw error; throw error;
} }
} }
Future getInsuranceDetails(data) async{
Future getInsuranceDetails(data) async {
dynamic localRes; dynamic localRes;
await baseAppClient.post(INSURANCE_DETAILS, await baseAppClient.post(
onSuccess: (dynamic response, int statusCode) { INSURANCE_DETAILS,
localRes = response['List_InsuranceCheckList']; onSuccess: (dynamic response, int statusCode) {
}, onFailure: (String error, int statusCode) { localRes = response['List_InsuranceCheckList'];
hasError = true; },
super.error = error; onFailure: (String error, int statusCode) {
}, body:{'CompanyID': data.companyID,'SubCategoryID':data.subCategoryID },); hasError = true;
super.error = error;
},
body: {'CompanyID': data.companyID, 'SubCategoryID': data.subCategoryID},
);
return Future.value(localRes); return Future.value(localRes);
} }
Future getPatientInsuranceDetails({String setupID, int projectID, String patientIdentificationID,int patientID}) async{ Future getPatientInsuranceDetails({String setupID, int projectID, String patientIdentificationID, int patientID}) async {
error = ""; error = "";
hasError = false; hasError = false;
insuranceCardDetails = null; insuranceCardDetails = null;
isHaveInsuranceCard = false; isHaveInsuranceCard = false;
await baseAppClient.post(GET_PATIENT_INSURANCE_DETAILS, await baseAppClient.post(
onSuccess: (dynamic response, int statusCode) { GET_PATIENT_INSURANCE_DETAILS,
insuranceCardDetailsList.clear(); onSuccess: (dynamic response, int statusCode) {
isHaveInsuranceCard = true; insuranceCardDetailsList.clear();
response['List_PatientInsuranceDetails'].forEach((item) { isHaveInsuranceCard = true;
insuranceCardDetailsList.add(InsuranceCardDetailsModel.fromJson(item)); response['List_PatientInsuranceDetails'].forEach((item) {
}); insuranceCardDetailsList.add(InsuranceCardDetailsModel.fromJson(item));
}, onFailure: (String error, int statusCode) { });
hasError = true; },
super.error = error; onFailure: (String error, int statusCode) {
}, body:{'SetupID': setupID,'ProjectID':projectID,'PatientIdentificationID':patientIdentificationID ,'isDentalAllowedBackend':false,'PatientID':patientID},); 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{ Future uploadInsuranceCard({String patientIdentificationID, int patientID, String image = ""}) async {
error = ""; error = "";
Map<String,dynamic> body = Map(); Map<String, dynamic> body = Map();
body['PatientID']=patientID; body['PatientID'] = patientID;
body['PatientType']=user.patientType; body['PatientType'] = user.patientType;
body['MobileNo']=user.mobileNumber; body['MobileNo'] = user.mobileNumber;
body['PatientIdentificationID']=patientIdentificationID; body['PatientIdentificationID'] = patientIdentificationID;
body['InsuranceCardImage']= image; body['InsuranceCardImage'] = image;
await baseAppClient.post(UPLOAD_INSURANCE_CARD, await baseAppClient.post(
onSuccess: (dynamic response, int statusCode) { UPLOAD_INSURANCE_CARD,
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:body,); },
body: body,
);
} }
} }

@ -73,7 +73,7 @@ class BloodPressureService extends BaseService {
super.error = ""; super.error = "";
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
body['to'] = user.emailAddress; body['To'] = user.emailAddress;
await baseAppClient.post(SEND_AVERAGE_BLOOD_PRESSURE_REPORT, await baseAppClient.post(SEND_AVERAGE_BLOOD_PRESSURE_REPORT,
onSuccess: (response, statusCode) async {}, onSuccess: (response, statusCode) async {},
onFailure: (String error, int statusCode) { onFailure: (String error, int statusCode) {

@ -114,7 +114,7 @@ class BloodSugarService extends BaseService {
super.error = ""; super.error = "";
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
body['to'] = user.emailAddress; body['To'] = user.emailAddress;
await baseAppClient.post(SEND_AVERAGE_BLOOD_SUGAR_REPORT, await baseAppClient.post(SEND_AVERAGE_BLOOD_SUGAR_REPORT,
onSuccess: (response, statusCode) async {}, onSuccess: (response, statusCode) async {},
onFailure: (String error, int statusCode) { onFailure: (String error, int statusCode) {

@ -9,6 +9,7 @@ import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:charts_flutter/flutter.dart' as charts; import 'package:charts_flutter/flutter.dart' as charts;
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import '../../../locator.dart'; import '../../../locator.dart';
import 'dart:math' as math;
class H2OViewModel extends BaseViewModel { class H2OViewModel extends BaseViewModel {
H2OService _h2OService = locator<H2OService>(); H2OService _h2OService = locator<H2OService>();
@ -91,11 +92,21 @@ class H2OViewModel extends BaseViewModel {
_h2OService.userProgressForWeekDataList.forEach((UserProgressForWeekDataModel data) { _h2OService.userProgressForWeekDataList.forEach((UserProgressForWeekDataModel data) {
globalData.add(new ChartSeries(data.dayName, data.percentageConsumed)); globalData.add(new ChartSeries(data.dayName, data.percentageConsumed));
}); });
Iterable<int> minMaxList = globalData.map((e) => e.x).toList();
int maxValue = minMaxList.isEmpty ? 0 : minMaxList.reduce(math.max);
int minValue = minMaxList.isEmpty ? 0 : minMaxList.reduce(math.min);
if (maxValue == 0 && minValue == 0) {
maxValue = 1;
minValue = -1;
}
return [ return [
new charts.Series<ChartSeries, String>( new charts.Series<ChartSeries, String>(
id: 'Global Revenue', id: 'Global Revenue',
domainFn: (ChartSeries sales, _) => sales.y, domainFn: (ChartSeries sales, _) => sales.y,
measureFn: (ChartSeries sales, _) => sales.x, measureFn: (ChartSeries sales, _) => sales.x,
measureLowerBoundFn: (ChartSeries sales, _) => minValue,
measureUpperBoundFn: (ChartSeries sales, _) => maxValue,
data: globalData, data: globalData,
), ),
]; ];

@ -2,8 +2,11 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/ClinicCategory.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/ClinicCategory.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/ClinicCategory.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/ClinicCategory.dart';
import 'package:diplomaticquarterapp/core/model/health_calcolator/get_doctor_by_time_model.dart';
import 'package:diplomaticquarterapp/core/model/health_calcolator/get_doctor_list_calcolation_model.dart';
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart'; import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:flutter/cupertino.dart';
import '../../../../locator.dart'; import '../../../../locator.dart';
@ -13,6 +16,9 @@ class BariatricsViewModel extends BaseViewModel {
List<ClinicCategory> get clinicCategoryList => _service.clinicCategoryList; List<ClinicCategory> get clinicCategoryList => _service.clinicCategoryList;
List<DiseasesByClinic> get diseasesList => _service.diseasesList; List<DiseasesByClinic> get diseasesList => _service.diseasesList;
List<GetDoctorListModel> get doctorList => _service.doctorList;
List<DoctorListByTimeModel> get doctorListByTime => _service.doctorListByTime;
List<DoctorsListTime> doctorLists = List();
void getClinicCategory() async { void getClinicCategory() async {
setState(ViewState.Busy); setState(ViewState.Busy);
@ -46,4 +52,27 @@ class BariatricsViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
} }
void getDoctorList({@required DiseasesByClinic disease}) async {
setState(ViewState.Busy);
await _service.getDoctorList(disease:disease);
if (_service.hasError) {
error = _service.error;
setState(ViewState.Error);
} else {
{
_service.doctorListByTime.forEach((element) {
List<DoctorsListTime> patientLabOrdersClinic =
doctorLists.where((elementClinic) => elementClinic.filterName == element.projectName).toList();
if (patientLabOrdersClinic.length != 0) {
doctorLists[doctorLists.indexOf(patientLabOrdersClinic[0])].doctorsByTimeList.add(element);
} else {
doctorLists.add(DoctorsListTime(filterName: element.projectName, doctor: element));
}
});
setState(ViewState.Idle);
}
}
}
} }

@ -9,14 +9,11 @@ import '../../../core/viewModels/base_view_model.dart';
class BloodPressureViewMode extends BaseViewModel { class BloodPressureViewMode extends BaseViewModel {
BloodPressureService bloodPressureService = locator<BloodPressureService>(); BloodPressureService bloodPressureService = locator<BloodPressureService>();
List<BloodPressureResult> get monthDiabtecPatientResult => List<BloodPressureResult> get monthDiabtecPatientResult => bloodPressureService.monthDiabtecPatientResult;
bloodPressureService.monthDiabtecPatientResult;
List<BloodPressureResult> get weekDiabtecPatientResult => List<BloodPressureResult> get weekDiabtecPatientResult => bloodPressureService.weekDiabtecPatientResult;
bloodPressureService.weekDiabtecPatientResult;
List<BloodPressureResult> get yearDiabtecPatientResult => List<BloodPressureResult> get yearDiabtecPatientResult => bloodPressureService.yearDiabtecPatientResult;
bloodPressureService.yearDiabtecPatientResult;
List<TimeSeriesSales2> weightWeekTimeSeriesDataTop = []; List<TimeSeriesSales2> weightWeekTimeSeriesDataTop = [];
List<TimeSeriesSales2> weightWeekTimeSeriesDataLow = []; List<TimeSeriesSales2> weightWeekTimeSeriesDataLow = [];
@ -37,35 +34,36 @@ class BloodPressureViewMode extends BaseViewModel {
} else { } else {
clearDate(); clearDate();
bloodPressureService.weekDiabtectResultAverageList.forEach((element) { bloodPressureService.weekDiabtectResultAverageList.forEach((element) {
weightWeekTimeSeriesDataTop.add(TimeSeriesSales2( weightWeekTimeSeriesDataTop
element.bloodPressureDate, .add(TimeSeriesSales2(element.bloodPressureDate, element.dailyDiastolicPressureAverageResult.toDouble()));
element.dailyDiastolicPressureAverageResult.toDouble())); weightWeekTimeSeriesDataLow
weightWeekTimeSeriesDataLow.add(TimeSeriesSales2( .add(TimeSeriesSales2(element.bloodPressureDate, element.dailySystolicePressureAverageResult.toDouble()));
element.bloodPressureDate,
element.dailySystolicePressureAverageResult.toDouble()));
for (int index = 0; index < bloodPressureService.monthDiabtectResultAverageList.length; index++) { for (int index = 0; index < bloodPressureService.monthDiabtectResultAverageList.length; index++) {
weighMonthTimeSeriesDataTop.add(TimeSeriesSales3(
weighMonthTimeSeriesDataTop.add(TimeSeriesSales3(index, bloodPressureService.monthDiabtectResultAverageList[index].weekDiastolicPressureAverageResult.toDouble())); index,
bloodPressureService.monthDiabtectResultAverageList[index].weekDiastolicPressureAverageResult
weighMonthTimeSeriesDataLow.add(TimeSeriesSales3(index, bloodPressureService.monthDiabtectResultAverageList[index].weekSystolicePressureAverageResult.toDouble())); .toDouble()));
weighMonthTimeSeriesDataLow.add(TimeSeriesSales3(
index,
bloodPressureService.monthDiabtectResultAverageList[index].weekSystolicePressureAverageResult
.toDouble()));
} }
bloodPressureService.yearDiabtecResultAverageList.forEach((element) { bloodPressureService.yearDiabtecResultAverageList.forEach((element) {
weightYearTimeSeriesDataTop.add(TimeSeriesSales2(element.date, weightYearTimeSeriesDataTop
element.monthSystolicePressureAverageResult.toDouble())); .add(TimeSeriesSales2(element.date, element.monthSystolicePressureAverageResult.toDouble()));
weightYearTimeSeriesDataLow.add(TimeSeriesSales2(element.date, weightYearTimeSeriesDataLow
element.monthDiastolicPressureAverageResult.toDouble())); .add(TimeSeriesSales2(element.date, element.monthDiastolicPressureAverageResult.toDouble()));
}); });
}); });
setState(ViewState.Idle); setState(ViewState.Idle);
} }
} }
void clearDate() {
void clearDate(){
weightWeekTimeSeriesDataTop.clear(); weightWeekTimeSeriesDataTop.clear();
weightWeekTimeSeriesDataLow.clear(); weightWeekTimeSeriesDataLow.clear();
weighMonthTimeSeriesDataTop.clear(); weighMonthTimeSeriesDataTop.clear();
@ -86,24 +84,25 @@ class BloodPressureViewMode extends BaseViewModel {
} }
} }
Future addORUpdateDiabtecResult( Future addORUpdateDiabtecResult(
{String bloodPressureDate, {String bloodPressureDate,
String diastolicPressure, String diastolicPressure,
String systolicePressure, String systolicePressure,
int measuredArm,bool isUpdate = false}) async { int measuredArm,
bool isUpdate = false}) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
if(!isUpdate) if (!isUpdate)
await bloodPressureService.addDiabtecResult( await bloodPressureService.addDiabtecResult(
bloodPressureDate: bloodPressureDate, bloodPressureDate: bloodPressureDate,
diastolicPressure: diastolicPressure, diastolicPressure: diastolicPressure,
systolicePressure: systolicePressure, systolicePressure: systolicePressure,
measuredArm: measuredArm); measuredArm: measuredArm);
else else
await bloodPressureService.updateDiabtecResult( await bloodPressureService.updateDiabtecResult(
bloodPressureDate: bloodPressureDate, bloodPressureDate: bloodPressureDate,
diastolicPressure: diastolicPressure, diastolicPressure: diastolicPressure,
systolicePressure: systolicePressure, systolicePressure: systolicePressure,
measuredArm: measuredArm); measuredArm: measuredArm);
if (bloodPressureService.hasError) { if (bloodPressureService.hasError) {
error = bloodPressureService.error; error = bloodPressureService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
@ -113,7 +112,6 @@ class BloodPressureViewMode extends BaseViewModel {
} }
} }
Future deactivateDiabeticStatus({int lineItemNo}) async { Future deactivateDiabeticStatus({int lineItemNo}) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);

@ -39,6 +39,9 @@ class BloodSugarViewMode extends BaseViewModel {
element.dailyAverageResult.toDouble(), element.dailyAverageResult.toDouble(),
)); ));
}); });
if (bloodWeekTimeSeriesData.isEmpty) {
bloodWeekTimeSeriesData.add(TimeSeriesSales2(DateTime.now(), 0));
}
for (int index = 0; for (int index = 0;
index < bloodSugarService.monthDiabtectResultAverageList.length; index < bloodSugarService.monthDiabtectResultAverageList.length;

@ -16,14 +16,11 @@ class LabsViewModel extends BaseViewModel {
List<LabOrderResult> get labOrdersResultsList => _labsService.labOrdersResultsList; List<LabOrderResult> get labOrdersResultsList => _labsService.labOrdersResultsList;
List<PatientLabOrdersList> _patientLabOrdersListClinic = List(); List<PatientLabOrdersList> _patientLabOrdersListClinic = List();
List<PatientLabOrdersList> _patientLabOrdersListHospital = List(); List<PatientLabOrdersList> _patientLabOrdersListHospital = List();
List<PatientLabOrdersList> get patientLabOrdersList => List<PatientLabOrdersList> get patientLabOrdersList =>
filterType == FilterType.Clinic filterType == FilterType.Clinic ? _patientLabOrdersListClinic : _patientLabOrdersListHospital;
? _patientLabOrdersListClinic
: _patientLabOrdersListHospital;
void getLabs() async { void getLabs() async {
if (authenticatedUserObject.isLogin) { if (authenticatedUserObject.isLogin) {
@ -34,41 +31,33 @@ class LabsViewModel extends BaseViewModel {
setState(ViewState.Error); setState(ViewState.Error);
} else { } else {
_labsService.patientLabOrdersList.forEach((element) { _labsService.patientLabOrdersList.forEach((element) {
List<PatientLabOrdersList> patientLabOrdersClinic = List<PatientLabOrdersList> patientLabOrdersClinic = _patientLabOrdersListClinic
_patientLabOrdersListClinic .where((elementClinic) => elementClinic.filterName == element.clinicDescription)
.where((elementClinic) => .toList();
elementClinic.filterName == element.clinicDescription)
.toList();
if (patientLabOrdersClinic.length != 0) { if (patientLabOrdersClinic.length != 0) {
_patientLabOrdersListClinic[_patientLabOrdersListClinic _patientLabOrdersListClinic[_patientLabOrdersListClinic.indexOf(patientLabOrdersClinic[0])]
.indexOf(patientLabOrdersClinic[0])]
.patientLabOrdersList .patientLabOrdersList
.add(element); .add(element);
} else { } else {
_patientLabOrdersListClinic.add(PatientLabOrdersList( _patientLabOrdersListClinic
filterName: element.clinicDescription, .add(PatientLabOrdersList(filterName: element.clinicDescription, patientDoctorAppointment: element));
patientDoctorAppointment: element));
} }
// doctor list sort via project // doctor list sort via project
List<PatientLabOrdersList> patientLabOrdersHospital = List<PatientLabOrdersList> patientLabOrdersHospital = _patientLabOrdersListHospital
_patientLabOrdersListHospital .where(
.where( (elementClinic) => elementClinic.filterName == element.projectName,
(elementClinic) => )
elementClinic.filterName == element.projectName, .toList();
)
.toList();
if (patientLabOrdersHospital.length != 0) { if (patientLabOrdersHospital.length != 0) {
_patientLabOrdersListHospital[_patientLabOrdersListHospital _patientLabOrdersListHospital[_patientLabOrdersListHospital.indexOf(patientLabOrdersHospital[0])]
.indexOf(patientLabOrdersHospital[0])]
.patientLabOrdersList .patientLabOrdersList
.add(element); .add(element);
} else { } else {
_patientLabOrdersListHospital.add(PatientLabOrdersList( _patientLabOrdersListHospital
filterName: element.projectName, .add(PatientLabOrdersList(filterName: element.projectName, patientDoctorAppointment: element));
patientDoctorAppointment: element));
} }
}); });
@ -82,24 +71,16 @@ class LabsViewModel extends BaseViewModel {
notifyListeners(); notifyListeners();
} }
List<PatientLabSpecialResult> get patientLabSpecialResult => List<PatientLabSpecialResult> get patientLabSpecialResult => _labsService.patientLabSpecialResult;
_labsService.patientLabSpecialResult;
List<LabResult> get labResultList => _labsService.labResultList; List<LabResult> get labResultList => _labsService.labResultList;
List<LabResultList> labResultLists = List(); List<LabResultList> labResultLists = List();
getLaboratoryResult( getLaboratoryResult({String projectID, int clinicID, String invoiceNo, String orderNo}) async {
{String projectID,
int clinicID,
String invoiceNo,
String orderNo}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _labsService.getLaboratoryResult( await _labsService.getLaboratoryResult(
invoiceNo: invoiceNo, invoiceNo: invoiceNo, orderNo: orderNo, projectID: projectID, clinicID: clinicID);
orderNo: orderNo,
projectID: projectID,
clinicID: clinicID);
if (_labsService.hasError) { if (_labsService.hasError) {
error = _labsService.error; error = _labsService.error;
setState(ViewState.Error); setState(ViewState.Error);
@ -116,14 +97,16 @@ class LabsViewModel extends BaseViewModel {
setState(ViewState.Error); setState(ViewState.Error);
} else { } else {
_labsService.labResultList.forEach((element) { _labsService.labResultList.forEach((element) {
List<LabResultList> patientLabOrdersClinic = labResultLists.where((elementClinic) => elementClinic.filterName == element.testCode).toList(); List<LabResultList> patientLabOrdersClinic =
labResultLists.where((elementClinic) => elementClinic.filterName == element.testCode).toList();
if (patientLabOrdersClinic.length != 0) { if (patientLabOrdersClinic.length != 0) {
var value = labResultLists[labResultLists.indexOf(patientLabOrdersClinic[0])]
var value= labResultLists[labResultLists.indexOf(patientLabOrdersClinic[0])].patientLabResultList .patientLabResultList
.where((e) => e.sampleCollectedOn== element.sampleCollectedOn && e.resultValue ==element.resultValue ).toList(); .where((e) => e.sampleCollectedOn == element.sampleCollectedOn && e.resultValue == element.resultValue)
if(value.isEmpty) .toList();
labResultLists[labResultLists.indexOf(patientLabOrdersClinic[0])].patientLabResultList.add(element); if (value.isEmpty)
labResultLists[labResultLists.indexOf(patientLabOrdersClinic[0])].patientLabResultList.add(element);
} else { } else {
labResultLists.add(LabResultList(filterName: element.testCode, lab: element)); labResultLists.add(LabResultList(filterName: element.testCode, lab: element));
} }
@ -132,32 +115,33 @@ class LabsViewModel extends BaseViewModel {
} }
} }
getPatientLabOrdersResults({PatientLabOrders patientLabOrder, String procedure}) async {
getPatientLabOrdersResults({PatientLabOrders patientLabOrder,String procedure}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _labsService.getPatientLabOrdersResults(patientLabOrder: patientLabOrder,procedure: procedure); await _labsService.getPatientLabOrdersResults(patientLabOrder: patientLabOrder, procedure: procedure);
if (_labsService.hasError) { if (_labsService.hasError) {
error = _labsService.error; error = _labsService.error;
setState(ViewState.Error); setState(ViewState.Error);
} else { } else {
bool isShouldClear = false; /// commented out based on PAP-304
if(_labsService.labOrdersResultsList.length==1) // bool isShouldClear = false;
{ // if (_labsService.labOrdersResultsList.length == 1) {
labOrdersResultsList.forEach((element) { // labOrdersResultsList.forEach((element) {
if(element.resultValue.contains('/') ||element.resultValue.contains('*' )|| element.resultValue.isEmpty ) // if (element.resultValue.contains('/') || element.resultValue.contains('*') || element.resultValue.isEmpty)
isShouldClear = true; // isShouldClear = true;
});} // });
if(isShouldClear) // }
_labsService.labOrdersResultsList.clear(); // if (isShouldClear)
//
// _labsService.labOrdersResultsList.clear();
setState(ViewState.Idle); setState(ViewState.Idle);
} }
} }
sendLabReportEmail({PatientLabOrders patientLabOrder,String mes}) async { sendLabReportEmail({PatientLabOrders patientLabOrder, String mes}) async {
await _labsService.sendLabReportEmail(patientLabOrder: patientLabOrder); await _labsService.sendLabReportEmail(patientLabOrder: patientLabOrder);
if (_labsService.hasError) { if (_labsService.hasError) {
error = _labsService.error; error = _labsService.error;
}else } else
AppToast.showSuccessToast(message: mes); AppToast.showSuccessToast(message: mes);
} }
} }

@ -125,6 +125,7 @@ import 'core/viewModels/pharmacyModule/product_detail_view_model.dart';
import 'core/viewModels/pharmacyModule/review_view_model.dart'; import 'core/viewModels/pharmacyModule/review_view_model.dart';
import 'core/viewModels/pharmacyModule/wishlist_view_model.dart'; import 'core/viewModels/pharmacyModule/wishlist_view_model.dart';
import 'core/viewModels/qr_view_model.dart'; import 'core/viewModels/qr_view_model.dart';
import 'core/viewModels/er/rrt-view-model.dart';
import 'core/viewModels/vaccine_view_model.dart'; import 'core/viewModels/vaccine_view_model.dart';
import 'core/service/vaccine_service.dart'; import 'core/service/vaccine_service.dart';
import 'core/viewModels/weather/weather_view_model.dart'; import 'core/viewModels/weather/weather_view_model.dart';
@ -250,6 +251,7 @@ void setupLocator() {
locator.registerFactory(() => QrViewModel()); locator.registerFactory(() => QrViewModel());
locator.registerFactory(() => ReportsMonthlyViewModel()); locator.registerFactory(() => ReportsMonthlyViewModel());
locator.registerFactory(() => NearHospitalViewModel()); locator.registerFactory(() => NearHospitalViewModel());
locator.registerFactory(() => RRTViewModel());
locator.registerFactory(() => AmRequestViewModel()); locator.registerFactory(() => AmRequestViewModel());
locator.registerFactory(() => PatientSickLeaveViewMode()); locator.registerFactory(() => PatientSickLeaveViewMode());
locator.registerFactory(() => MyBalanceViewModel()); locator.registerFactory(() => MyBalanceViewModel());
@ -304,6 +306,7 @@ void setupLocator() {
locator.registerFactory(() => OfferCategoriesViewModel()); // Categories View Model locator.registerFactory(() => OfferCategoriesViewModel()); // Categories View Model
locator.registerFactory(() => PackagesViewModel()); // Products View Model locator.registerFactory(() => PackagesViewModel()); // Products View Model
//pharmacy //pharmacy
// locator.registerFactory(() => PharmacyCategoriseViewModel()); // locator.registerFactory(() => PharmacyCategoriseViewModel());
// locator.registerFactory(() => OffersCategoriseViewModel()); // locator.registerFactory(() => OffersCategoriseViewModel());

@ -1,30 +1,30 @@
import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/theme/theme_notifier.dart'; import 'package:diplomaticquarterapp/theme/theme_notifier.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/services/robo_search/search_provider.dart'; import 'package:diplomaticquarterapp/services/robo_search/search_provider.dart';
import 'package:diplomaticquarterapp/theme/theme_value.dart'; import 'package:diplomaticquarterapp/theme/theme_value.dart';
import 'package:diplomaticquarterapp/uitl/HMG_Geofence.dart';
import 'package:diplomaticquarterapp/uitl/LocalNotification.dart'; import 'package:diplomaticquarterapp/uitl/LocalNotification.dart';
import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart'; import 'package:diplomaticquarterapp/uitl/PlatformBridge.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:firebase_analytics/firebase_analytics.dart';
import 'package:firebase_analytics/observer.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'Constants.dart';
import 'config/shared_pref_kay.dart';
import 'config/size_config.dart'; import 'config/size_config.dart';
import 'core/model/geofencing/requests/GeoZonesRequestModel.dart';
import 'core/service/geofencing/GeofencingServices.dart';
import 'core/viewModels/project_view_model.dart'; import 'core/viewModels/project_view_model.dart';
import 'locator.dart'; import 'locator.dart';
import 'pages/pharmacies/compare-list.dart'; import 'pages/pharmacies/compare-list.dart';
import 'package:firebase_core/firebase_core.dart';
void main() async { void main() async {
WidgetsFlutterBinding.ensureInitialized();
FirebaseApp defaultApp = await Firebase.initializeApp();
setupLocator(); setupLocator();
runApp(MyApp()); runApp(MyApp());
} }
@ -35,6 +35,7 @@ class MyApp extends StatefulWidget {
} }
class _MyApp extends State<MyApp> { class _MyApp extends State<MyApp> {
@override @override
void initState() { void initState() {
// ProjectViewModel projectProvider; // ProjectViewModel projectProvider;
@ -51,6 +52,8 @@ class _MyApp extends State<MyApp> {
LocalNotification.getInstance() LocalNotification.getInstance()
.showNow(title: "Payload", subtitle: payload, payload: payload); .showNow(title: "Payload", subtitle: payload, payload: payload);
}); });
SystemChrome.setPreferredOrientations([ SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp, DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown, DeviceOrientation.portraitDown,
@ -85,6 +88,9 @@ class _MyApp extends State<MyApp> {
], ],
child: Consumer<ProjectViewModel>( child: Consumer<ProjectViewModel>(
builder: (context, projectProvider, child) => MaterialApp( builder: (context, projectProvider, child) => MaterialApp(
navigatorObservers: [
GAnalytics.shared.navObserver()
],
showSemanticsDebugger: false, showSemanticsDebugger: false,
title: 'Diplomatic Quarter App', title: 'Diplomatic Quarter App',
locale: projectProvider.appLocal, locale: projectProvider.appLocal,

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

@ -0,0 +1,32 @@
class CovidTestProceduresResponse {
String procedureID;
String procedureName;
String procedureNameN;
int projectID;
String setupID;
CovidTestProceduresResponse(
{this.procedureID,
this.procedureName,
this.procedureNameN,
this.projectID,
this.setupID});
CovidTestProceduresResponse.fromJson(Map<String, dynamic> json) {
procedureID = json['ProcedureID'];
procedureName = json['ProcedureName'];
procedureNameN = json['ProcedureNameN'];
projectID = json['ProjectID'];
setupID = json['SetupID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ProcedureID'] = this.procedureID;
data['ProcedureName'] = this.procedureName;
data['ProcedureNameN'] = this.procedureNameN;
data['ProjectID'] = this.projectID;
data['SetupID'] = this.setupID;
return data;
}
}

@ -17,6 +17,7 @@ import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart';
import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart'; import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart'; import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart'; import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart';
import 'package:diplomaticquarterapp/pages/symptom-checker/info.dart'; import 'package:diplomaticquarterapp/pages/symptom-checker/info.dart';
@ -263,13 +264,12 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
title: TranslationBase.of(context).childVaccine, title: TranslationBase.of(context).childVaccine,
), ),
ServicesContainer( ServicesContainer(
onTap: () => Navigator.push( onTap: (){
context, Navigator.pop(context);
FadePage( LandingPage.shared.switchToDoFromHMGServices();
page: ToDo(isShowAppBar: true), },
), imageLocation:
), 'assets/images/new-design/upcoming_icon_bottom_bar.png',
imageLocation: 'assets/images/new-design/upcoming_icon_bottom_bar.png',
title: TranslationBase.of(context).todoList, title: TranslationBase.of(context).todoList,
), ),
if (projectViewModel.havePrivilege(42)) if (projectViewModel.havePrivilege(42))

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_detail_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_detail_model.dart';
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/H2O_service.dart'; import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/H2O_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
@ -13,6 +14,8 @@ import 'package:flutter/material.dart';
import 'package:flutter/painting.dart'; import 'package:flutter/painting.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
import 'package:manage_calendar_events/manage_calendar_events.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'Dialog/setting_page_radio_button_list_dialog.dart'; import 'Dialog/setting_page_radio_button_list_dialog.dart';
@ -31,7 +34,7 @@ class _H2oSettingState extends State<H2oSetting> {
TextEditingController _nameController = TextEditingController(); TextEditingController _nameController = TextEditingController();
TextEditingController _heightController = TextEditingController(); TextEditingController _heightController = TextEditingController();
TextEditingController _weightController = TextEditingController(); TextEditingController _weightController = TextEditingController();
bool _isUnitML = false; bool _isUnitML = true;
bool _isGenderMale = false; bool _isGenderMale = false;
bool _isHeightCM = false; bool _isHeightCM = false;
bool _isWeightKG = false; bool _isWeightKG = false;
@ -51,16 +54,25 @@ class _H2oSettingState extends State<H2oSetting> {
void initState() { void initState() {
super.initState(); super.initState();
_userDetailModel = widget.userDetailModel; _userDetailModel = widget.userDetailModel;
_heightValue = _userDetailModel.height; _heightValue = _userDetailModel?.height ?? 100;
_weightValue = _userDetailModel.weight; _weightValue = _userDetailModel?.weight ?? 50;
_heightController.text = _heightValue.toStringAsFixed(0); _heightController.text = _heightValue.toStringAsFixed(0);
_weightController.text = _weightValue.toStringAsFixed(0); _weightController.text = _weightValue.toStringAsFixed(0);
_nameController.text = _userDetailModel.firstName; _nameController.text = _userDetailModel.firstName;
_isWeightKG = _userDetailModel.isWeightInKG; _isWeightKG = _userDetailModel?.isWeightInKG ?? true;
_isHeightCM = _userDetailModel.isHeightInCM; _isHeightCM = _userDetailModel?.isHeightInCM ?? true;
_isGenderMale = _userDetailModel.gender == "M" ? true : false; _isGenderMale = (_userDetailModel?.gender ?? "M") == "M" ? true : false;
_dobDate = DateUtil.convertStringToDate(_userDetailModel.dOB); _dobDate = DateUtil.convertStringToDate(_userDetailModel.dOB);
_selectedActiveLevel = _userDetailModel.activityID ?? 1; _selectedActiveLevel = _userDetailModel.activityID ?? 1;
readPrefs();
}
SharedPreferences prefs;
void readPrefs() async {
prefs = await SharedPreferences.getInstance();
_isUnitML = (prefs.getString(H2O_UNIT) ?? "ml") == "ml" ? true : false;
_selectedRemindedTime = prefs.getInt(H2O_REMINDER) ?? 0;
setState(() {});
} }
@override @override
@ -68,19 +80,9 @@ class _H2oSettingState extends State<H2oSetting> {
// TODO: implement didChangeDependencies // TODO: implement didChangeDependencies
super.didChangeDependencies(); super.didChangeDependencies();
_activityLevelListEng = [ _activityLevelListEng = [TranslationBase.of(context).notActive, TranslationBase.of(context).lightActive, TranslationBase.of(context).modActive, TranslationBase.of(context).active];
TranslationBase.of(context).notActive,
TranslationBase.of(context).lightActive,
TranslationBase.of(context).modActive,
TranslationBase.of(context).active
];
_remindedTimeListEng = [ _remindedTimeListEng = ["1 ${TranslationBase.of(context).time}", "2 ${TranslationBase.of(context).times}", "3 ${TranslationBase.of(context).times}", "4 ${TranslationBase.of(context).times}"];
"1 ${TranslationBase.of(context).time}",
"2 ${TranslationBase.of(context).times}",
"3 ${TranslationBase.of(context).times}",
"4 ${TranslationBase.of(context).times}"
];
} }
@override @override
@ -339,8 +341,7 @@ class _H2oSettingState extends State<H2oSetting> {
]); ]);
} }
Widget _commonSlidersRow( Widget _commonSlidersRow(_controller, double _minValue, double _maxValue, double _valueOrg, Function(String) onTextValueChange, Function(double) onValueChange) {
_controller, double _minValue, double _maxValue, double _valueOrg, Function(String) onTextValueChange, Function(double) onValueChange) {
return Container( return Container(
margin: EdgeInsets.only(top: 6), margin: EdgeInsets.only(top: 6),
padding: EdgeInsets.all(6), padding: EdgeInsets.all(6),
@ -451,13 +452,35 @@ class _H2oSettingState extends State<H2oSetting> {
_userDetailModel.dOB = tempDate; _userDetailModel.dOB = tempDate;
_userDetailModel.activityID = _selectedActiveLevel; _userDetailModel.activityID = _selectedActiveLevel;
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
await widget.viewModel.updateUserDetail(_userDetailModel, (tag) { await widget.viewModel.updateUserDetail(_userDetailModel, (tag) async {
if (tag) { if (tag) {
AppToast.showSuccessToast(message: TranslationBase.of(context).success); AppToast.showSuccessToast(message: TranslationBase.of(context).success);
await prefs.setString(H2O_UNIT, _isUnitML ? "ml" : "l");
int _tempRemindTime = prefs.getInt(H2O_REMINDER) ?? _selectedRemindedTime;
if (_tempRemindTime != _selectedRemindedTime) {
await prefs.setInt(H2O_REMINDER, _selectedRemindedTime);
_addReminderToCalender(_selectedRemindedTime);
}
} }
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
}); });
Navigator.pop(context); Navigator.pop(context);
} }
final CalendarPlugin _myPlugin = CalendarPlugin();
void _addReminderToCalender(int _selectedRemindedTime) async {
bool _calendarPermission = await _myPlugin.hasPermissions();
if (_calendarPermission) {
} else {
await _myPlugin.requestPermissions();
}
_myPlugin.hasPermissions().then((value) {
if (!value) {
_myPlugin.requestPermissions();
} else {
_myPlugin.getCalendars().then((value) => {print(value.length)});
}
});
}
} }

@ -1,12 +1,18 @@
import 'dart:ui'; import 'dart:ui';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/h20_setting.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/h20_setting.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/month_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/month_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/today_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/today_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/week_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/week_page.dart';
import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/bottom_navigation/bottom_nav_bar.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.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';
@ -18,14 +24,16 @@ class H2OPage extends StatefulWidget {
_H2OPageState createState() => _H2OPageState(); _H2OPageState createState() => _H2OPageState();
} }
class _H2OPageState extends State<H2OPage> class _H2OPageState extends State<H2OPage> with SingleTickerProviderStateMixin {
with SingleTickerProviderStateMixin {
TabController _tabController; TabController _tabController;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
_tabController = TabController(length: 3, vsync: this,); _tabController = TabController(
length: 3,
vsync: this,
);
} }
@override @override
@ -43,6 +51,7 @@ class _H2OPageState extends State<H2OPage>
appBarTitle: TranslationBase.of(context).waterTracker, appBarTitle: TranslationBase.of(context).waterTracker,
showHomeAppBarIcon: false, showHomeAppBarIcon: false,
baseViewModel: model, baseViewModel: model,
isHelp: true,
appBarIcons: [ appBarIcons: [
IconButton( IconButton(
icon: Image.asset("assets/images/new-design/setting_gear_icon.png"), icon: Image.asset("assets/images/new-design/setting_gear_icon.png"),
@ -129,6 +138,39 @@ class _H2OPageState extends State<H2OPage>
) )
], ],
), ),
bottomNavigationBar: BottomNavBar(
changeIndex: (index) {
if (index == 0) {
IS_VOICE_COMMAND_CLOSED = false;
} else if (index == 1) {
Navigator.push(
context,
FadePage(
page: AppScaffold(
appBarTitle: TranslationBase.of(context).medicalProfile,
isShowAppBar: true,
showHomeAppBarIcon: false,
appBarIcons: [
IconButton(
icon: Image.asset("assets/images/new-design/setting_gear_icon.png"),
color: Colors.white,
onPressed: () => Navigator.of(context).pushNamed(
SETTINGS,
),
),
],
body: MedicalProfilePage())));
} else if (index == 2) {
Navigator.of(context).pushNamedAndRemoveUntil(HOME, (Route<dynamic> route) => false);
} else if (index == 3) {
Navigator.of(context).pushNamed(MY_FAMILIY);
} else if (index == 4) {
Navigator.push(context, FadePage(page: ToDo(isShowAppBar: false)));
}
},
showHomeIcon: true,
index: 0,
),
), ),
), ),
); );

@ -3,12 +3,14 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/doctor_list.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.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:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -33,122 +35,99 @@ class _BariatricsPageState extends State<BariatricsPage> {
return BaseView<BariatricsViewModel>( return BaseView<BariatricsViewModel>(
onModelReady: (model) => model.getClinicCategory(), onModelReady: (model) => model.getClinicCategory(),
builder: (_, model, w) => builder: (_, model, w) => AppScaffold(
AppScaffold( isShowDecPage: false,
isShowAppBar: true, isShowAppBar: true,
appBarTitle: "${TranslationBase appBarTitle: "${TranslationBase.of(context).bariatrics}",
.of(context) baseViewModel: model,
.bariatrics}", body: Column(
baseViewModel: model, children: [
body: Column( Container(
children: [ margin: EdgeInsets.all(8.0),
Container( child: Center(
margin: EdgeInsets.all(8.0), child: Texts(TranslationBase.of(context).bariatricsHeaderMsg),
child: Center( ),
child: Texts(TranslationBase ),
.of(context) Expanded(
.bariatricsHeaderMsg), child: Container(
), margin: EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0),
), child: Row(
Expanded( children: [
child: Container( Expanded(
margin: EdgeInsets.symmetric( child: SingleChildScrollView(
horizontal: 16.0, vertical: 8.0), child: Column(
child: Row( children: [
children: [ ...model.diseasesList
Expanded( .map((item) => RadioListTile(
child: SingleChildScrollView(
child: Column(
children: [
...model.diseasesList
.map((item) =>
RadioListTile(
title: Texts("${item.diseases}"), title: Texts("${item.diseases}"),
activeColor: Colors.blue.shade700, activeColor: Colors.blue.shade700,
value: item.diseasesID, value: item.diseasesID,
groupValue: _selectedDisease != null groupValue: _selectedDisease != null ? _selectedDisease.diseasesID : -1,
? _selectedDisease.diseasesID selected: _selectedDisease != null
: -1, ? item.diseasesID == _selectedDisease.diseasesID
selected: _selectedDisease != null ? item : false,
.diseasesID ==
_selectedDisease.diseasesID : false,
onChanged: (val) { onChanged: (val) {
setState(() { setState(() {
_selectedDisease = item; _selectedDisease = item;
}); });
}, },
)) ))
.toList() .toList()
], ],
),
),
), ),
Image.asset( ),
_getImageName(widget.gender, widget.obeseResult,
projectProvider.isArabic),
fit: BoxFit.cover,
),
],
), ),
), Image.asset(
), _getImageName(widget.gender, widget.obeseResult, projectProvider.isArabic),
Container( fit: BoxFit.cover,
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16), ),
child: BorderedButton( ],
TranslationBase
.of(context)
.continues,
fontSize: SizeConfig.textMultiplier * 2.1,
textColor: Colors.white,
vPadding: 8,
hPadding: 8,
backgroundColor: Theme
.of(context)
.primaryColor,
radius: 8,
fontWeight: FontWeight.bold,
handler: () async {
await model.searchDoctorsByTime(_selectedDisease);
if(model.state == ViewState.ErrorLocal){
AppToast.showErrorToast(message: model.error);
}
// Navigator.push(
// context,
// MaterialPageRoute(builder: (context) => BariatricsPage()),
// );
},
),
),
Container(
margin: EdgeInsets.only(bottom: 16.0, left: 16, right: 16),
child: BorderedButton(
TranslationBase
.of(context)
.skip,
fontSize: SizeConfig.textMultiplier * 2.1,
textColor: Colors.blue,
vPadding: 8,
hPadding: 8,
backgroundColor: Color(0x00000000),
radius: 8,
hasBorder: true,
borderColor: Color(0x00000000),
fontWeight: FontWeight.bold,
handler: () async {
await model.searchDoctorsByTime(_selectedDisease);
if(model.state == ViewState.ErrorLocal){
AppToast.showErrorToast(message: model.error);
}
// Navigator.push(
// context,
// MaterialPageRoute(builder: (context) => BariatricsPage()),
// );
},
),
), ),
], ),
),
Container(
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
child: BorderedButton(
TranslationBase.of(context).continues,
fontSize: SizeConfig.textMultiplier * 2.1,
textColor: Colors.white,
vPadding: 8,
hPadding: 8,
backgroundColor: Theme.of(context).primaryColor,
radius: 8,
fontWeight: FontWeight.bold,
handler: () async {
Navigator.push(
context,
FadePage(page: DoctorList(diseaseByClinic: _selectedDisease,)),
);
},
),
),
Container(
margin: EdgeInsets.only(bottom: 16.0, left: 16, right: 16),
child: BorderedButton(
TranslationBase.of(context).skip,
fontSize: SizeConfig.textMultiplier * 2.1,
textColor: Colors.blue,
vPadding: 8,
hPadding: 8,
backgroundColor: Color(0x00000000),
radius: 8,
hasBorder: true,
borderColor: Color(0x00000000),
fontWeight: FontWeight.bold,
handler: () async {
Navigator.push(
context,
FadePage(page: DoctorList()),
);
},
),
), ),
), ],
),
),
); );
} }

@ -6,8 +6,10 @@ 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/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'dart:math'; import 'dart:math';
import '../health_calc_desc.dart';
import 'result_page.dart'; import 'result_page.dart';
const activeCardColor = Color(0xff70777A); const activeCardColor = Color(0xff70777A);
@ -121,6 +123,23 @@ class _BMICalculatorState extends State<BMICalculator> {
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false, isShowDecPage: false,
showHomeAppBarIcon: false,
appBarIcons: [
IconButton(
icon: Icon(Icons.info_outline),
color: Colors.white,
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => HealthDescPage(
"${TranslationBase.of(context).bmi} ${TranslationBase.of(context).calcHealth}",
TranslationBase.of(context).bmiCalcDesc,
"assets/images/AlHabibMedicalService/health_calculator/bmi.png")),
);
},
)
],
appBarTitle: appBarTitle:
"${TranslationBase.of(context).bmi} ${TranslationBase.of(context).calcHealth}", "${TranslationBase.of(context).bmi} ${TranslationBase.of(context).calcHealth}",
body: SingleChildScrollView( body: SingleChildScrollView(

@ -1,6 +1,8 @@
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/doctor_list.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.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:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:percent_indicator/circular_percent_indicator.dart'; import 'package:percent_indicator/circular_percent_indicator.dart';
@ -12,6 +14,7 @@ class BmrResultPage extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false,
appBarTitle: 'BMR Calculator', appBarTitle: 'BMR Calculator',
body: Column( body: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
@ -55,8 +58,13 @@ class BmrResultPage extends StatelessWidget {
Container( Container(
width: 350, width: 350,
child: Button( child: Button(
label: 'See List Of Doctors', label: 'See List Of Doctors',
), onTap: () {
Navigator.push(
context,
FadePage(page: DoctorList()),
);
}),
), ),
], ],
), ),

@ -148,18 +148,10 @@ class _BodyFatState extends State<BodyFat> {
void calculateBodyFat() { void calculateBodyFat() {
if (isMale == true) { if (isMale == true) {
bodyFat = 495 / bodyFat = 495 / (1.0324 - 0.19077 * (log(waist - neck) / ln10) + 0.15456 * (log(heightCm) / ln10)) - 450;
(1.0324 -
0.19077 * (log(waist - neck) / ln10) +
0.15456 * (log(heightCm) / ln10)) -
450;
fat = (bodyFat * 10) / 10.round(); fat = (bodyFat * 10) / 10.round();
} else if (isMale == false) { } else if (isMale == false) {
bodyFat = 495 / bodyFat = 495 / (1.29579 - 0.35004 * (log(waist + hip - neck) / ln10) + 0.22100 * (log(heightCm) / ln10)) - 450;
(1.29579 -
0.35004 * (log(waist + hip - neck) / ln10) +
0.22100 * (log(heightCm) / ln10)) -
450;
fat = (bodyFat * 10) / 10.round(); fat = (bodyFat * 10) / 10.round();
} }
if (fat <= 0) { if (fat <= 0) {
@ -180,11 +172,9 @@ class _BodyFatState extends State<BodyFat> {
} else if (bodyFat > 31 && bodyFat <= 60) { } else if (bodyFat > 31 && bodyFat <= 60) {
textResult = 'The category falls under obese'; textResult = 'The category falls under obese';
} else if (bodyFat > 60) { } else if (bodyFat > 60) {
textResult = textResult = 'Please check the value you have entered, since the body fat percentage has crosed the limits.';
'Please check the value you have entered, since the body fat percentage has crosed the limits.';
} else if (bodyFat <= 9) { } else if (bodyFat <= 9) {
textResult = textResult = 'Please check the value you have entered, since the body fat percentage cannot be this low.';
'Please check the value you have entered, since the body fat percentage cannot be this low.';
} }
} else { } else {
if (bodyFat > 5 && fat <= 13) { if (bodyFat > 5 && fat <= 13) {
@ -196,11 +186,9 @@ class _BodyFatState extends State<BodyFat> {
} else if (bodyFat > 24 && bodyFat <= 45) { } else if (bodyFat > 24 && bodyFat <= 45) {
textResult = 'The category falls under obese'; textResult = 'The category falls under obese';
} else if (bodyFat > 45) { } else if (bodyFat > 45) {
textResult = textResult = 'Please check the value you have entered, since the body fat percentage has crosed the limits.';
'Please check the value you have entered, since the body fat percentage has crosed the limits.';
} else if (bodyFat <= 5) { } else if (bodyFat <= 5) {
textResult = textResult = 'Please check the value you have entered, since the body fat percentage cannot be this low.';
'Please check the value you have entered, since the body fat percentage cannot be this low.';
} }
} }
} }
@ -229,8 +217,7 @@ class _BodyFatState extends State<BodyFat> {
children: [ children: [
Padding( Padding(
padding: EdgeInsets.all(10.0), padding: EdgeInsets.all(10.0),
child: child: Texts('Estimates the total body fat based on\n the size'),
Texts('Estimates the total body fat based on\n the size'),
), ),
Divider( Divider(
thickness: 2.0, thickness: 2.0,
@ -308,14 +295,12 @@ class _BodyFatState extends State<BodyFat> {
child: Row( child: Row(
children: [ children: [
Padding( Padding(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 8.0),
vertical: 10.0, horizontal: 8.0),
child: Center( child: Center(
child: Container( child: Container(
width: 60.0, width: 60.0,
foregroundDecoration: BoxDecoration( foregroundDecoration: BoxDecoration(
borderRadius: borderRadius: BorderRadius.circular(5.0),
BorderRadius.circular(5.0),
border: Border.all( border: Border.all(
color: Colors.blueGrey, color: Colors.blueGrey,
width: 2.0, width: 2.0,
@ -331,10 +316,8 @@ class _BodyFatState extends State<BodyFat> {
Container( Container(
height: 38.0, height: 38.0,
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.center,
CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
@ -351,8 +334,7 @@ class _BodyFatState extends State<BodyFat> {
), ),
onTap: () { onTap: () {
setState(() { setState(() {
if (heightCm < 250) if (heightCm < 250) heightCm++;
heightCm++;
}); });
}, },
), ),
@ -364,8 +346,7 @@ class _BodyFatState extends State<BodyFat> {
), ),
onTap: () { onTap: () {
setState(() { setState(() {
if (heightCm > 0) if (heightCm > 0) heightCm--;
heightCm--;
}); });
}, },
), ),
@ -420,16 +401,14 @@ class _BodyFatState extends State<BodyFat> {
color: Colors.grey.withOpacity(0.5), color: Colors.grey.withOpacity(0.5),
spreadRadius: 3, spreadRadius: 3,
blurRadius: 7, blurRadius: 7,
offset: Offset( offset: Offset(0, 3), // changes position of shadow
0, 3), // changes position of shadow
), ),
], ],
color: cmCard, color: cmCard,
borderRadius: BorderRadius.circular(3.0), borderRadius: BorderRadius.circular(3.0),
), ),
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(vertical: 0.0, horizontal: 18.0),
vertical: 0.0, horizontal: 18.0),
child: Center(child: Texts('CM')), child: Center(child: Texts('CM')),
), ),
), ),
@ -452,14 +431,12 @@ class _BodyFatState extends State<BodyFat> {
color: Colors.grey.withOpacity(0.5), color: Colors.grey.withOpacity(0.5),
spreadRadius: 3, spreadRadius: 3,
blurRadius: 7, blurRadius: 7,
offset: Offset( offset: Offset(0, 3), // changes position of shadow
0, 3), // changes position of shadow
), ),
], ],
), ),
child: Padding( child: Padding(
padding: padding: const EdgeInsets.symmetric(horizontal: 16.0),
const EdgeInsets.symmetric(horizontal: 16.0),
child: Center(child: Texts('Ft')), child: Center(child: Texts('Ft')),
), ),
), ),
@ -484,14 +461,12 @@ class _BodyFatState extends State<BodyFat> {
child: Row( child: Row(
children: [ children: [
Padding( Padding(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 8.0),
vertical: 10.0, horizontal: 8.0),
child: Center( child: Center(
child: Container( child: Container(
width: 60.0, width: 60.0,
foregroundDecoration: BoxDecoration( foregroundDecoration: BoxDecoration(
borderRadius: borderRadius: BorderRadius.circular(5.0),
BorderRadius.circular(5.0),
border: Border.all( border: Border.all(
color: Colors.blueGrey, color: Colors.blueGrey,
width: 2.0, width: 2.0,
@ -507,10 +482,8 @@ class _BodyFatState extends State<BodyFat> {
Container( Container(
height: 38.0, height: 38.0,
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.center,
CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
@ -594,16 +567,14 @@ class _BodyFatState extends State<BodyFat> {
color: Colors.grey.withOpacity(0.5), color: Colors.grey.withOpacity(0.5),
spreadRadius: 3, spreadRadius: 3,
blurRadius: 7, blurRadius: 7,
offset: Offset( offset: Offset(0, 3), // changes position of shadow
0, 3), // changes position of shadow
), ),
], ],
color: neckCmCard, color: neckCmCard,
borderRadius: BorderRadius.circular(3.0), borderRadius: BorderRadius.circular(3.0),
), ),
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(vertical: 0.0, horizontal: 18.0),
vertical: 0.0, horizontal: 18.0),
child: Center(child: Texts('CM')), child: Center(child: Texts('CM')),
), ),
), ),
@ -626,14 +597,12 @@ class _BodyFatState extends State<BodyFat> {
color: Colors.grey.withOpacity(0.5), color: Colors.grey.withOpacity(0.5),
spreadRadius: 3, spreadRadius: 3,
blurRadius: 7, blurRadius: 7,
offset: Offset( offset: Offset(0, 3), // changes position of shadow
0, 3), // changes position of shadow
), ),
], ],
), ),
child: Padding( child: Padding(
padding: padding: const EdgeInsets.symmetric(horizontal: 16.0),
const EdgeInsets.symmetric(horizontal: 16.0),
child: Center(child: Texts('Ft')), child: Center(child: Texts('Ft')),
), ),
), ),
@ -658,14 +627,12 @@ class _BodyFatState extends State<BodyFat> {
child: Row( child: Row(
children: [ children: [
Padding( Padding(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 8.0),
vertical: 10.0, horizontal: 8.0),
child: Center( child: Center(
child: Container( child: Container(
width: 60.0, width: 60.0,
foregroundDecoration: BoxDecoration( foregroundDecoration: BoxDecoration(
borderRadius: borderRadius: BorderRadius.circular(5.0),
BorderRadius.circular(5.0),
border: Border.all( border: Border.all(
color: Colors.blueGrey, color: Colors.blueGrey,
width: 2.0, width: 2.0,
@ -681,10 +648,8 @@ class _BodyFatState extends State<BodyFat> {
Container( Container(
height: 38.0, height: 38.0,
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.center,
CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
@ -701,8 +666,7 @@ class _BodyFatState extends State<BodyFat> {
), ),
onTap: () { onTap: () {
setState(() { setState(() {
if (waist < 200) if (waist < 200) waist++;
waist++;
}); });
}, },
), ),
@ -769,16 +733,14 @@ class _BodyFatState extends State<BodyFat> {
color: Colors.grey.withOpacity(0.5), color: Colors.grey.withOpacity(0.5),
spreadRadius: 3, spreadRadius: 3,
blurRadius: 7, blurRadius: 7,
offset: Offset( offset: Offset(0, 3), // changes position of shadow
0, 3), // changes position of shadow
), ),
], ],
color: waistCmCard, color: waistCmCard,
borderRadius: BorderRadius.circular(3.0), borderRadius: BorderRadius.circular(3.0),
), ),
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(vertical: 0.0, horizontal: 18.0),
vertical: 0.0, horizontal: 18.0),
child: Center(child: Texts('CM')), child: Center(child: Texts('CM')),
), ),
), ),
@ -801,14 +763,12 @@ class _BodyFatState extends State<BodyFat> {
color: Colors.grey.withOpacity(0.5), color: Colors.grey.withOpacity(0.5),
spreadRadius: 3, spreadRadius: 3,
blurRadius: 7, blurRadius: 7,
offset: Offset( offset: Offset(0, 3), // changes position of shadow
0, 3), // changes position of shadow
), ),
], ],
), ),
child: Padding( child: Padding(
padding: padding: const EdgeInsets.symmetric(horizontal: 16.0),
const EdgeInsets.symmetric(horizontal: 16.0),
child: Center(child: Texts('Ft')), child: Center(child: Texts('Ft')),
), ),
), ),
@ -833,14 +793,12 @@ class _BodyFatState extends State<BodyFat> {
child: Row( child: Row(
children: [ children: [
Padding( Padding(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 8.0),
vertical: 10.0, horizontal: 8.0),
child: Center( child: Center(
child: Container( child: Container(
width: 60.0, width: 60.0,
foregroundDecoration: BoxDecoration( foregroundDecoration: BoxDecoration(
borderRadius: borderRadius: BorderRadius.circular(5.0),
BorderRadius.circular(5.0),
border: Border.all( border: Border.all(
color: Colors.blueGrey, color: Colors.blueGrey,
width: 2.0, width: 2.0,
@ -856,10 +814,8 @@ class _BodyFatState extends State<BodyFat> {
Container( Container(
height: 38.0, height: 38.0,
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.center,
CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
@ -943,16 +899,14 @@ class _BodyFatState extends State<BodyFat> {
color: Colors.grey.withOpacity(0.5), color: Colors.grey.withOpacity(0.5),
spreadRadius: 3, spreadRadius: 3,
blurRadius: 7, blurRadius: 7,
offset: Offset( offset: Offset(0, 3), // changes position of shadow
0, 3), // changes position of shadow
), ),
], ],
color: hipCmCard, color: hipCmCard,
borderRadius: BorderRadius.circular(3.0), borderRadius: BorderRadius.circular(3.0),
), ),
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(vertical: 0.0, horizontal: 18.0),
vertical: 0.0, horizontal: 18.0),
child: Center(child: Texts('CM')), child: Center(child: Texts('CM')),
), ),
), ),
@ -975,14 +929,12 @@ class _BodyFatState extends State<BodyFat> {
color: Colors.grey.withOpacity(0.5), color: Colors.grey.withOpacity(0.5),
spreadRadius: 3, spreadRadius: 3,
blurRadius: 7, blurRadius: 7,
offset: Offset( offset: Offset(0, 3), // changes position of shadow
0, 3), // changes position of shadow
), ),
], ],
), ),
child: Padding( child: Padding(
padding: padding: const EdgeInsets.symmetric(horizontal: 16.0),
const EdgeInsets.symmetric(horizontal: 16.0),
child: Center(child: Texts('Ft')), child: Center(child: Texts('Ft')),
), ),
), ),
@ -995,7 +947,7 @@ class _BodyFatState extends State<BodyFat> {
], ],
), ),
Container( Container(
height: 100.0, height: MediaQuery.of(context).size.height * 0.084,
width: 350.0, width: 350.0,
child: SecondaryButton( child: SecondaryButton(
label: 'CALCULATE', label: 'CALCULATE',

@ -1,6 +1,8 @@
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/doctor_list.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.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:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:percent_indicator/circular_percent_indicator.dart'; import 'package:percent_indicator/circular_percent_indicator.dart';
@ -68,6 +70,12 @@ class FatResult extends StatelessWidget {
width: 350, width: 350,
child: Button( child: Button(
label: 'See List Of Doctors', label: 'See List Of Doctors',
onTap: () {
Navigator.push(
context,
FadePage(page: DoctorList()),
);
},
), ),
), ),
], ],

@ -1,7 +1,9 @@
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/doctor_list.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.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:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:percent_indicator/circular_percent_indicator.dart'; import 'package:percent_indicator/circular_percent_indicator.dart';
@ -45,13 +47,18 @@ class CalorieResultPage extends StatelessWidget {
), ),
), ),
Container( Container(
child: child: Texts('Daily intake is ${calorie.toStringAsFixed(1)} calories'),
Texts('Daily intake is ${calorie.toStringAsFixed(1)} calories'),
), ),
Container( Container(
width: 350, width: 350,
child: Button( child: Button(
label: 'See List Of Doctors', label: 'See List Of Doctors',
onTap: () {
Navigator.push(
context,
FadePage(page: DoctorList()),
);
},
), ),
), ),
], ],

@ -1,6 +1,8 @@
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/doctor_list.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.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:flutter/material.dart'; import 'package:flutter/material.dart';
import 'dart:math'; import 'dart:math';
@ -156,6 +158,12 @@ class CarbsResult extends StatelessWidget {
width: 350, width: 350,
child: Button( child: Button(
label: 'See List Of Doctors', label: 'See List Of Doctors',
onTap: () {
Navigator.push(
context,
FadePage(page: DoctorList()),
);
},
), ),
), ),
], ],

@ -70,9 +70,7 @@ class _DeliveryDueState extends State<DeliveryDue> {
onConfirm: (date) { onConfirm: (date) {
print('confirm $date'); print('confirm $date');
setState(() { setState(() {
bloodSugarDate == date bloodSugarDate = date;
? null
: bloodSugarDate = DateTime.now();
dateFrom = date.add(Duration(days: 10)); dateFrom = date.add(Duration(days: 10));
dateTo = date.add(Duration(days: 20)); dateTo = date.add(Duration(days: 20));
@ -90,9 +88,7 @@ class _DeliveryDueState extends State<DeliveryDue> {
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
width: double.infinity, width: double.infinity,
height: 65, height: 65,
decoration: BoxDecoration( decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white),
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
@ -124,14 +120,14 @@ class _DeliveryDueState extends State<DeliveryDue> {
context, context,
FadePage( FadePage(
page: DeliveryDueResult( page: DeliveryDueResult(
conceivedDate: conceivedDate, conceivedDate: conceivedDate,
dateFrom: dateFrom, dateFrom: dateFrom,
dateTo: dateTo, dateTo: dateTo,
deliveryDue: deliveryDue, deliveryDue: deliveryDue,
firstTrimester: firstTrimester, firstTrimester: firstTrimester,
secondTrimester: secondTrimester, secondTrimester: secondTrimester,
thirdTrimester: thirdTrimester, thirdTrimester: thirdTrimester,
)), )),
); );
} }
}); });

@ -1,6 +1,8 @@
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/doctor_list.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.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:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
@ -43,17 +45,13 @@ class DeliveryDueResult extends StatelessWidget {
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
), ),
Texts(DateFormat.yMMMEd().format(dateFrom), Texts(DateFormat.yMMMEd().format(dateFrom),
fontWeight: FontWeight.w800, fontWeight: FontWeight.w800, fontSize: 21.0, color: Color(0xffC5272D)),
fontSize: 21.0,
color: Color(0xffC5272D)),
Texts( Texts(
'To:', 'To:',
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
), ),
Texts(DateFormat.yMMMEd().format(dateTo), Texts(DateFormat.yMMMEd().format(dateTo),
fontWeight: FontWeight.w800, fontWeight: FontWeight.w800, fontSize: 21.0, color: Color(0xffC5272D)),
fontSize: 21.0,
color: Color(0xffC5272D)),
Texts( Texts(
'You have conceived on:', 'You have conceived on:',
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
@ -94,6 +92,12 @@ class DeliveryDueResult extends StatelessWidget {
width: 350, width: 350,
child: Button( child: Button(
label: 'See List Of Doctors', label: 'See List Of Doctors',
onTap: () {
Navigator.push(
context,
FadePage(page: DoctorList()),
);
},
), ),
), ),
], ],

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.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/uitl/translations_delegate_base.dart';
@ -8,13 +9,14 @@ import 'package:flutter/material.dart';
import 'package:rating_bar/rating_bar.dart'; import 'package:rating_bar/rating_bar.dart';
class DoctorList extends StatelessWidget { class DoctorList extends StatelessWidget {
const DoctorList({Key key}) : super(key: key); DiseasesByClinic diseaseByClinic;
DoctorList({Key key, this.diseaseByClinic}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<BariatricsViewModel>( return BaseView<BariatricsViewModel>(
allowAny: true, allowAny: true,
onModelReady: (model) => model.getDoctorList(), onModelReady: (model) => model.getDoctorList(disease: diseaseByClinic),
builder: (BuildContext context, BariatricsViewModel model, Widget child) => AppScaffold( builder: (BuildContext context, BariatricsViewModel model, Widget child) => AppScaffold(
isShowDecPage: false, isShowDecPage: false,
isShowAppBar: true, isShowAppBar: true,
@ -54,7 +56,8 @@ class DoctorList extends StatelessWidget {
flex: 1, flex: 1,
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.circular(100.0), borderRadius: BorderRadius.circular(100.0),
child: Image.network(doctor.doctorImageURL, fit: BoxFit.fill, height: 60.0, width: 60.0), child: Image.network(doctor.doctorImageURL,
fit: BoxFit.fill, height: 60.0, width: 60.0),
), ),
), ),
Expanded( Expanded(
@ -90,7 +93,8 @@ class DoctorList extends StatelessWidget {
emptyIcon: Icons.star, emptyIcon: Icons.star,
), ),
Container( Container(
child: Image.network(doctor.nationalityFlagURL, width: 25.0, height: 25.0), child: Image.network(doctor.nationalityFlagURL,
width: 25.0, height: 25.0),
), ),
], ],
), ),

@ -0,0 +1,40 @@
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
class HealthDescPage extends StatelessWidget {
final String title;
final String desc;
final String icon;
HealthDescPage(this.title, this.desc, this.icon);
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
isShowDecPage: false,
appBarTitle: title,
body: Container(
margin: EdgeInsets.all(8.0),
child: Row(
children: [
Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
child: Image.asset(
icon,
fit: BoxFit.cover,
height: 80,
),
),
Expanded(
child: Text(
desc,
style: TextStyle(fontSize: 18.0),
),
)
],
),
),
);
}
}

@ -1,6 +1,8 @@
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/doctor_list.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.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:flutter/material.dart'; import 'package:flutter/material.dart';
import 'dart:math'; import 'dart:math';
@ -11,12 +13,7 @@ class IdealBodyResult extends StatelessWidget {
final double overWeightBy; final double overWeightBy;
final String textResult; final String textResult;
IdealBodyResult( IdealBodyResult({this.idealBodyWeight, this.minRange, this.mixRange, this.overWeightBy, this.textResult});
{this.idealBodyWeight,
this.minRange,
this.mixRange,
this.overWeightBy,
this.textResult});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
@ -82,8 +79,7 @@ class IdealBodyResult extends StatelessWidget {
: overWeightBy > 10 && overWeightBy < 17 : overWeightBy > 10 && overWeightBy < 17
? Column( ? Column(
children: [ children: [
Texts( Texts('This means that the weight is a little bit more than ideal weight by'),
'This means that the weight is a little bit more than ideal weight by'),
Texts(overWeightBy.toStringAsFixed(1)), Texts(overWeightBy.toStringAsFixed(1)),
Texts( Texts(
'May wish to consult with the doctor for medical help. Click to view our list of Doctors'), 'May wish to consult with the doctor for medical help. Click to view our list of Doctors'),
@ -161,6 +157,12 @@ class IdealBodyResult extends StatelessWidget {
width: 350, width: 350,
child: Button( child: Button(
label: 'See List Of Doctors', label: 'See List Of Doctors',
onTap: () {
Navigator.push(
context,
FadePage(page: DoctorList()),
);
},
), ),
), ),
], ],

@ -42,6 +42,7 @@ class _BloodSugarState extends State<BloodSugar> {
} }
void calculateBloodSugar() { void calculateBloodSugar() {
if (textController.text.isEmpty) return;
if (cardMGColor == activeCardColor) { if (cardMGColor == activeCardColor) {
inputValue = double.parse(textController.text); inputValue = double.parse(textController.text);
inputValue = inputValue / 15; inputValue = inputValue / 15;
@ -60,10 +61,18 @@ class _BloodSugarState extends State<BloodSugar> {
double inputValue = 0; double inputValue = 0;
String unit; String unit;
@override
void initState() {
updateColor(1);
unit = 'mmol/l';
super.initState();
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false,
appBarTitle: TranslationBase.of(context).bloodSugarConversion, appBarTitle: TranslationBase.of(context).bloodSugarConversion,
body: Padding( body: Padding(
padding: const EdgeInsets.all(16.0), padding: const EdgeInsets.all(16.0),
@ -112,9 +121,11 @@ class _BloodSugarState extends State<BloodSugar> {
onTap: () { onTap: () {
setState(() { setState(() {
updateColor(1); updateColor(1);
inputValue = if (textController.text.isNotEmpty) {
double.parse(textController.text); inputValue =
inputValue = inputValue / 15; double.parse(textController.text);
inputValue = inputValue / 15;
}
unit = 'mmol/l'; unit = 'mmol/l';
}); });
}, },
@ -145,9 +156,11 @@ class _BloodSugarState extends State<BloodSugar> {
onTap: () { onTap: () {
setState(() { setState(() {
updateColor(2); updateColor(2);
inputValue = if (textController.text.isNotEmpty) {
double.parse(textController.text); inputValue =
inputValue = inputValue * 18; double.parse(textController.text);
inputValue = inputValue / 18;
}
unit = 'mg/dlt'; unit = 'mg/dlt';
}); });
}, },
@ -170,7 +183,7 @@ class _BloodSugarState extends State<BloodSugar> {
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(
horizontal: 16.0), horizontal: 16.0),
child: Texts('MG/DLt TO\n MMOL/L'), child: Texts('\nMMOL/L TO MG/DLt '),
), ),
), ),
), ),

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/model/blooddonation/blood_groub_details.dart'; import 'package:diplomaticquarterapp/core/model/blooddonation/blood_groub_details.dart';
import 'package:diplomaticquarterapp/core/model/blooddonation/get_all_cities.dart'; import 'package:diplomaticquarterapp/core/model/blooddonation/get_all_cities.dart';
@ -60,7 +61,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
AppSharedPreferences sharedPref = AppSharedPreferences(); AppSharedPreferences sharedPref = AppSharedPreferences();
AuthenticatedUser authUser; AuthenticatedUser authUser;
var checkedValue = false; var checkedValue = false;
List<ImagesInfo> imagesInfo = List();
@override @override
void initState() { void initState() {
super.initState(); super.initState();
@ -69,6 +70,13 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
imagesInfo.add(
ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/images-info-home/blood/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/images-info-home/blood/ar/0.png'),
);
ProjectViewModel projectProvider = Provider.of(context); ProjectViewModel projectProvider = Provider.of(context);
return BaseView<MyBalanceViewModel>( return BaseView<MyBalanceViewModel>(
@ -76,6 +84,8 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
baseViewModel: model, baseViewModel: model,
imagesInfo: imagesInfo,
description: TranslationBase.of(context).bloodDonationInfo,
appBarTitle: TranslationBase.of(context).bloodD, appBarTitle: TranslationBase.of(context).bloodD,
body: SingleChildScrollView( body: SingleChildScrollView(
physics: ScrollPhysics(), physics: ScrollPhysics(),

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart
import 'package:diplomaticquarterapp/models/Appointments/FreeSlot.dart'; import 'package:diplomaticquarterapp/models/Appointments/FreeSlot.dart';
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart'; import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
import 'package:diplomaticquarterapp/models/Appointments/timeSlot.dart'; import 'package:diplomaticquarterapp/models/Appointments/timeSlot.dart';
import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidTestProceduresResponse.dart';
import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-payment-alert.dart'; import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-payment-alert.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.dart'; import 'package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.dart';
@ -27,6 +28,7 @@ class CovidTimeSlots extends StatefulWidget {
static DateTime selectedAppoDateTime; static DateTime selectedAppoDateTime;
static String selectedDate; static String selectedDate;
static String selectedTime; static String selectedTime;
CovidTestProceduresResponse selectedProcedure;
int selectedClinicID; int selectedClinicID;
int selectedDoctorID; int selectedDoctorID;
@ -35,7 +37,7 @@ class CovidTimeSlots extends StatefulWidget {
PatientShareResponse patientShareResponse; PatientShareResponse patientShareResponse;
CovidTimeSlots({@required this.projectID}); CovidTimeSlots({@required this.projectID, @required this.selectedProcedure});
@override @override
_CovidTimeSlotsState createState() => _CovidTimeSlotsState(); _CovidTimeSlotsState createState() => _CovidTimeSlotsState();
@ -94,10 +96,12 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
super.dispose(); super.dispose();
} }
void _onDaySelected(DateTime day, List events, ProjectViewModel projectViewModel) { void _onDaySelected(
DateTime day, List events, ProjectViewModel projectViewModel) {
final DateFormat formatter = DateFormat('yyyy-MM-dd'); final DateFormat formatter = DateFormat('yyyy-MM-dd');
setState(() { setState(() {
this.selectedDate = DateUtil.getWeekDayMonthDayYearDateFormatted(day, projectViewModel.isArabic ? "ar" : "en"); this.selectedDate = DateUtil.getWeekDayMonthDayYearDateFormatted(
day, projectViewModel.isArabic ? "ar" : "en");
openTimeSlotsPickerForDate(day, docFreeSlots); openTimeSlotsPickerForDate(day, docFreeSlots);
CovidTimeSlots.selectedDate = formatter.format(day); CovidTimeSlots.selectedDate = formatter.format(day);
print(CovidTimeSlots.selectedDate); print(CovidTimeSlots.selectedDate);
@ -260,7 +264,8 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
onPressed: () { onPressed: () {
bookCovidTestAppointment(); bookCovidTestAppointment();
}, },
child: Text(TranslationBase.of(context).bookNow, style: TextStyle(fontSize: 18.0)), child: Text(TranslationBase.of(context).bookNow,
style: TextStyle(fontSize: 18.0)),
), ),
), ),
), ),
@ -355,11 +360,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
}, },
), ),
onDaySelected: (date, event, _) { onDaySelected: (date, event, _) {
_onDaySelected( _onDaySelected(date, event, projectViewModel);
date,
event,
projectViewModel
);
_animationController.forward(from: 0.0); _animationController.forward(from: 0.0);
}, },
onVisibleDaysChanged: _onVisibleDaysChanged, onVisibleDaysChanged: _onVisibleDaysChanged,
@ -494,7 +495,8 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
docObject.projectID, docObject.projectID,
CovidTimeSlots.selectedTime, CovidTimeSlots.selectedTime,
CovidTimeSlots.selectedDate, CovidTimeSlots.selectedDate,
context) context,
widget.selectedProcedure.procedureID)
.then((res) { .then((res) {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: "Appointment Booked Successfully"); AppToast.showSuccessToast(message: "Appointment Booked Successfully");

@ -1,5 +1,7 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidPaymentInfoResponse.dart'; import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidPaymentInfoResponse.dart';
import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidTestProceduresResponse.dart';
import 'package:diplomaticquarterapp/models/CovidDriveThru/DriveThroughTestingCenterModel.dart'; import 'package:diplomaticquarterapp/models/CovidDriveThru/DriveThroughTestingCenterModel.dart';
import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-payment-details.dart'; import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-payment-details.dart';
import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/routes.dart';
@ -21,6 +23,7 @@ class CovidDrivethruLocation extends StatefulWidget {
class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> { class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
String projectDropdownValue; String projectDropdownValue;
List<DriveThroughTestingCenterModel> projectsList = []; List<DriveThroughTestingCenterModel> projectsList = [];
List<CovidTestProceduresResponse> proceduresList = [];
bool isLocationSelected = false; bool isLocationSelected = false;
String projectLat = ""; String projectLat = "";
String projectLong = ""; String projectLong = "";
@ -29,23 +32,36 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
ProjectViewModel projectViewModel; ProjectViewModel projectViewModel;
List<ImagesInfo> imagesInfo = List();
@override @override
void initState() { void initState() {
WidgetsBinding.instance WidgetsBinding.instance.addPostFrameCallback((_) {
.addPostFrameCallback((_) => getProjectsList(context)); if (projectViewModel.isLogin) {
getProjectsList(context);
getTestProcedures(context);
}
});
super.initState(); super.initState();
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
imagesInfo.add(ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/covid/en/0.png',
imageAr: 'https://hmgwebservices.com/Images/MobileApp/covid/ar/0.png'));
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).covidTest, appBarTitle: TranslationBase.of(context).covidTest,
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: true,
description: TranslationBase.of(context).covidInfo,
imagesInfo: imagesInfo,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
margin: EdgeInsets.fromLTRB(15.0, 15.0, 15.0, 0.0), margin: EdgeInsets.fromLTRB(15.0, 15.0, 15.0, 0.0),
child: Column( child: Column(
mainAxisSize: MainAxisSize.max,
children: <Widget>[ children: <Widget>[
Container( Container(
alignment: projectViewModel.isArabic alignment: projectViewModel.isArabic
@ -136,94 +152,98 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
this.projectLong + this.projectLong +
"&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8"), "&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8"),
) )
: Container(), : SizedBox(
], height: MediaQuery.of(context).size.height * 0.35,
), ),
), Container(
), height: MediaQuery.of(context).size.height * 0.15,
bottomSheet: Container( width: double.infinity,
height: MediaQuery.of(context).size.height * 0.15, child: Column(
width: double.infinity, children: <Widget>[
child: Column( Container(
children: <Widget>[ margin: EdgeInsets.only(top: 10.0),
Container(
margin: EdgeInsets.only(top: 10.0),
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.91,
height: 45.0,
child: RaisedButton(
color: new Color(0xFFc5272d),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: Colors.red[300],
onPressed: () {
getDirections();
},
child: Text(TranslationBase.of(context).getDirections,
style: TextStyle(fontSize: 18.0)),
),
),
),
Container(
margin: EdgeInsets.fromLTRB(10.0, 5.0, 10.0, 5.0),
child: Flex(
direction: Axis.horizontal,
children: <Widget>[
Expanded(
flex: 1,
child: Container(
margin: EdgeInsets.fromLTRB(10.0, 0.0, 5.0, 0.0),
child: ButtonTheme( child: ButtonTheme(
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0), borderRadius: BorderRadius.circular(10.0),
), ),
minWidth: MediaQuery.of(context).size.width * 0.7, minWidth: MediaQuery.of(context).size.width * 0.91,
height: 45.0, height: 45.0,
child: RaisedButton( child: RaisedButton(
color: new Color(0xFF60686b), color: new Color(0xFFc5272d),
textColor: Colors.white, textColor: Colors.white,
disabledTextColor: Colors.white, disabledTextColor: Colors.white,
disabledColor: Colors.grey[500], disabledColor: Colors.red[300],
onPressed: () { onPressed: () {
back(); getDirections();
}, },
child: Text(TranslationBase.of(context).back, child: Text(TranslationBase.of(context).getDirections,
style: TextStyle(fontSize: 18.0)), style: TextStyle(fontSize: 18.0)),
), ),
), ),
), ),
), Container(
Expanded( margin: EdgeInsets.fromLTRB(10.0, 5.0, 10.0, 5.0),
flex: 1, child: Flex(
child: Container( direction: Axis.horizontal,
margin: EdgeInsets.fromLTRB(10.0, 0.0, 5.0, 0.0), children: <Widget>[
child: ButtonTheme( Expanded(
shape: RoundedRectangleBorder( flex: 1,
borderRadius: BorderRadius.circular(10.0), child: Container(
), margin: EdgeInsets.fromLTRB(10.0, 0.0, 5.0, 0.0),
minWidth: MediaQuery.of(context).size.width * 0.7, child: ButtonTheme(
height: 45.0, shape: RoundedRectangleBorder(
child: RaisedButton( borderRadius: BorderRadius.circular(10.0),
color: new Color(0xFF60686b), ),
textColor: Colors.white, minWidth:
disabledTextColor: Colors.white, MediaQuery.of(context).size.width * 0.7,
disabledColor: Colors.grey[500], height: 45.0,
onPressed: () { child: RaisedButton(
next(); color: new Color(0xFF60686b),
}, textColor: Colors.white,
child: Text(TranslationBase.of(context).next, disabledTextColor: Colors.white,
style: TextStyle(fontSize: 18.0)), disabledColor: Colors.grey[500],
), onPressed: () {
back();
},
child: Text(TranslationBase.of(context).back,
style: TextStyle(fontSize: 18.0)),
),
),
),
),
Expanded(
flex: 1,
child: Container(
margin: EdgeInsets.fromLTRB(10.0, 0.0, 5.0, 0.0),
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth:
MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: Colors.grey[500],
onPressed: () {
next();
},
child: Text(TranslationBase.of(context).next,
style: TextStyle(fontSize: 18.0)),
),
),
),
),
],
), ),
), ),
), ],
], ),
), ),
), ],
], ),
), ),
), ),
); );
@ -268,43 +288,63 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
getPaymentInfo(BuildContext context, String projectID) { getPaymentInfo(BuildContext context, String projectID) {
CovidDriveThruService service = new CovidDriveThruService(); CovidDriveThruService service = new CovidDriveThruService();
CovidPaymentInfoResponse covidPaymentInfoResponse = CovidPaymentInfoResponse covidPaymentInfoResponse =
new CovidPaymentInfoResponse(); new CovidPaymentInfoResponse();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
service service
.getCovidPaymentInformation(context, int.parse(projectID)) .getCovidPaymentInformation(
context, int.parse(projectID), proceduresList[0].procedureID)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
covidPaymentInfoResponse = CovidPaymentInfoResponse.fromJson( covidPaymentInfoResponse =
res['COVID19_PatientShare']); CovidPaymentInfoResponse.fromJson(res['COVID19_PatientShare']);
print(covidPaymentInfoResponse.procedureNameField); });
}); Navigator.push(
Navigator.push( context,
context, FadePage(
FadePage( page: CovidPaymentDetails(
page: CovidPaymentDetails( covidPaymentInfoResponse: covidPaymentInfoResponse,
covidPaymentInfoResponse: covidPaymentInfoResponse, projectID: int.parse(projectID),
projectID: int.parse(projectID), proceduresList: proceduresList,
))); )));
} else {} } else {}
}) }).catchError((err) {
.catchError((err) { print(err);
print(err); });
}
getTestProcedures(BuildContext context) {
CovidDriveThruService service = new CovidDriveThruService();
GifLoaderDialogUtils.showMyDialog(context);
CovidTestProceduresResponse covidTestProceduresResponse =
new CovidTestProceduresResponse();
service.getCovidTestProceduresList(context).then((res) {
if (res['MessageStatus'] == 1) {
print(res);
setState(() {
res['COVID19_TestProceduresList'].forEach((v) {
proceduresList.add(new CovidTestProceduresResponse.fromJson(v));
});
}); });
print(proceduresList.length);
print(proceduresList[0].procedureName);
GifLoaderDialogUtils.hideDialog(context);
} else {}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
});
} }
getProjectsList(BuildContext context) { getProjectsList(BuildContext context) {
CovidDriveThruService service = new CovidDriveThruService(); CovidDriveThruService service = new CovidDriveThruService();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
service.getCovidProjectsList(context).then((res) { service.getCovidProjectsList(context).then((res) {
print(res);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
print(res);
setState(() { setState(() {
res['List_COVID19_ProjectDriveThroughTestingCenter'].forEach((v) { res['List_COVID19_ProjectDriveThroughTestingCenter'].forEach((v) {
projectsList.add(new DriveThroughTestingCenterModel.fromJson(v)); projectsList.add(new DriveThroughTestingCenterModel.fromJson(v));

@ -1,5 +1,8 @@
import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidPaymentInfoResponse.dart'; import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidPaymentInfoResponse.dart';
import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidTestProceduresResponse.dart';
import 'package:diplomaticquarterapp/pages/Covid-DriveThru/Covid-TimeSlots.dart'; import 'package:diplomaticquarterapp/pages/Covid-DriveThru/Covid-TimeSlots.dart';
import 'package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
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:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -10,9 +13,13 @@ import 'package:flutter_svg/flutter_svg.dart';
class CovidPaymentDetails extends StatefulWidget { class CovidPaymentDetails extends StatefulWidget {
CovidPaymentInfoResponse covidPaymentInfoResponse; CovidPaymentInfoResponse covidPaymentInfoResponse;
int projectID; int projectID;
List<CovidTestProceduresResponse> proceduresList;
CovidTestProceduresResponse selectedProcedure;
CovidPaymentDetails( CovidPaymentDetails(
{@required this.covidPaymentInfoResponse, @required this.projectID}); {@required this.covidPaymentInfoResponse,
@required this.projectID,
@required this.proceduresList});
@override @override
_CovidPaymentDetailsState createState() => _CovidPaymentDetailsState(); _CovidPaymentDetailsState createState() => _CovidPaymentDetailsState();
@ -21,6 +28,13 @@ class CovidPaymentDetails extends StatefulWidget {
class _CovidPaymentDetailsState extends State<CovidPaymentDetails> { class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
bool isAgree = false; bool isAgree = false;
@override
void initState() {
print(widget.proceduresList[0].procedureName);
widget.selectedProcedure = widget.proceduresList[0];
super.initState();
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
@ -28,7 +42,7 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
isShowAppBar: true, isShowAppBar: true,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
margin: EdgeInsets.fromLTRB(15.0, 15.0, 15.0, 0.0), margin: EdgeInsets.fromLTRB(15.0, 15.0, 15.0, 100.0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
@ -82,13 +96,75 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
borderRadius: BorderRadius.circular(10.0), borderRadius: BorderRadius.circular(10.0),
color: Colors.white), color: Colors.white),
margin: EdgeInsets.fromLTRB(0.0, 30.0, 0.0, 5.0), margin: EdgeInsets.fromLTRB(0.0, 30.0, 0.0, 5.0),
padding: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 20.0), padding: EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 20.0),
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Container( Container(
alignment: Alignment.center, alignment: Alignment.center,
margin: margin:
EdgeInsets.only(left: 0.0, right: 20.0, top: 30.0), EdgeInsets.only(left: 0.0, right: 20.0, top: 10.0),
child: Text(
TranslationBase.of(context).covidSelectProcedure,
style: TextStyle(
color: Colors.black,
fontSize: 20.0,
fontWeight: FontWeight.bold)),
),
...List.generate(
widget.proceduresList.length,
(index) => Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 1,
),
Row(
children: <Widget>[
Expanded(
flex: 1,
child: InkWell(
onTap: () {
setState(() {
widget.selectedProcedure =
widget.proceduresList[index];
});
},
child: ListTile(
title: Text(
widget.proceduresList[index]
.procedureName,
style: TextStyle(fontSize: 14.0)),
leading: Radio(
value: widget.proceduresList[index],
groupValue: widget.selectedProcedure,
activeColor: Colors.red[800],
toggleable: true,
onChanged: (value) {
setState(() {
widget.selectedProcedure = value;
print(widget
.selectedProcedure.procedureName);
getPaymentInfo(
context,
widget.projectID.toString(),
widget.selectedProcedure
.procedureID);
});
},
),
),
),
)
],
),
],
),
),
Divider(),
Container(
alignment: Alignment.center,
margin:
EdgeInsets.only(left: 0.0, right: 20.0, top: 10.0),
child: Text(TranslationBase.of(context).testFee, child: Text(TranslationBase.of(context).testFee,
style: TextStyle( style: TextStyle(
color: Colors.black, color: Colors.black,
@ -144,7 +220,7 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
isAgree = !isAgree; isAgree = !isAgree;
}); });
}, },
activeColor: Colors.blue, activeColor: Color(0xffB8382C),
), ),
Texts(TranslationBase.of(context) Texts(TranslationBase.of(context)
.iAgreeToTheTermsAndConditions), .iAgreeToTheTermsAndConditions),
@ -238,6 +314,7 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
FadePage( FadePage(
page: CovidTimeSlots( page: CovidTimeSlots(
projectID: widget.projectID, projectID: widget.projectID,
selectedProcedure: widget.selectedProcedure,
))); )));
} }
@ -245,6 +322,34 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
Navigator.pop(context); Navigator.pop(context);
} }
getPaymentInfo(
BuildContext context, String projectID, String selectedProcedureID) {
CovidDriveThruService service = new CovidDriveThruService();
GifLoaderDialogUtils.showMyDialog(context);
service
.getCovidPaymentInformation(
context, int.parse(projectID), selectedProcedureID)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {
widget.covidPaymentInfoResponse =
CovidPaymentInfoResponse.fromJson(res['COVID19_PatientShare']);
});
// Navigator.push(
// context,
// FadePage(
// page: CovidPaymentDetails(
// covidPaymentInfoResponse: covidPaymentInfoResponse,
// projectID: int.parse(projectID),
// proceduresList: proceduresList,
// )));
} else {}
}).catchError((err) {
print(err);
});
}
_getNormalText(text) { _getNormalText(text) {
return Container( return Container(
margin: EdgeInsets.only(top: 20.0, right: 10.0), margin: EdgeInsets.only(top: 20.0, right: 10.0),

@ -75,7 +75,7 @@ class AddFamilyMemberType extends StatelessWidget {
), ),
AppText( AppText(
TranslationBase.of(context) TranslationBase.of(context)
.nationalID, .idNo,
fontSize: SizeConfig fontSize: SizeConfig
.textMultiplier * .textMultiplier *
2, 2,

@ -1,8 +1,13 @@
import 'dart:convert';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-main-screen.dart';
import 'package:diplomaticquarterapp/uitl/location_util.dart'; import 'package:diplomaticquarterapp/uitl/location_util.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/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../../uitl/translations_delegate_base.dart'; import '../../uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/pages/ErService/widgets/card_common.dart'; import 'package:diplomaticquarterapp/pages/ErService/widgets/card_common.dart';
@ -23,6 +28,7 @@ class ErOptions extends StatefulWidget {
class _ErOptionsState extends State<ErOptions> { class _ErOptionsState extends State<ErOptions> {
LocationUtils locationUtils; LocationUtils locationUtils;
ProjectViewModel projectViewModel;
@override @override
void initState() { void initState() {
@ -35,9 +41,13 @@ class _ErOptionsState extends State<ErOptions> {
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of<ProjectViewModel>(context);
final rrtLocked = !projectViewModel.havePrivilege(68);
return AppScaffold( return AppScaffold(
isShowAppBar: widget.isAppbar, isShowAppBar: widget.isAppbar,
appBarTitle: TranslationBase.of(context).bookAppo, appBarTitle: TranslationBase.of(context).bookAppo,
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),
child: Column( child: Column(
@ -45,6 +55,7 @@ class _ErOptionsState extends State<ErOptions> {
children: <Widget>[ children: <Widget>[
Container( Container(
height: 170,
margin: EdgeInsets.fromLTRB(0.0, 10.0, 0.0, 10.0), margin: EdgeInsets.fromLTRB(0.0, 10.0, 0.0, 10.0),
child: Row( child: Row(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
@ -82,6 +93,7 @@ class _ErOptionsState extends State<ErOptions> {
), ),
Container( Container(
margin: EdgeInsets.fromLTRB(0.0, 10.0, 0.0, 10.0), margin: EdgeInsets.fromLTRB(0.0, 10.0, 0.0, 10.0),
height: 170,
child: Row( child: Row(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
@ -94,14 +106,24 @@ class _ErOptionsState extends State<ErOptions> {
onTap: (){ onTap: (){
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(page: DdServicesPage())
page: DdServicesPage())); );
}, },
), ),
), ),
Expanded( Expanded(
child: Container(), child: CardCommonEr(
locked: rrtLocked,
image: 'assets/images/new-design/AM.PNG',
text: TranslationBase.of(context).rrtService,
subText: TranslationBase.of(context).RapidResponseTeam,
onTap:(){
Navigator.push(
context,
FadePage(
page: RRTMainScreen()));
}),
) )
], ],
), ),

@ -10,51 +10,72 @@ class CardCommonEr extends StatelessWidget {
final image; final image;
final text; final text;
final subText; final subText;
final bool locked;
final Function onTap; final Function onTap;
const CardCommonEr( const CardCommonEr(
{@required this.image, {
@required this.text, this.locked = false,
@required this.subText, @required this.image,
@required this.onTap}); @required this.text,
@required this.subText,
@required this.onTap,
});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return GestureDetector( return GestureDetector(
onTap: () => onTap(), onTap: locked ? null : onTap,
child: Container( child: Opacity(
margin: EdgeInsets.fromLTRB(9.0, 9.0, 9.0, 9.0), opacity: locked ? 0.25 : 1.0,
decoration: BoxDecoration(boxShadow: [ child: Stack(
BoxShadow(color: Colors.grey[400], blurRadius: 2.0, spreadRadius: 0.0) children: [
], borderRadius: BorderRadius.circular(10), color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container( Container(
margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0), margin: EdgeInsets.fromLTRB(9.0, 9.0, 9.0, 9.0),
child: Text(this.text, decoration: BoxDecoration(boxShadow: [
overflow: TextOverflow.clip, BoxShadow(color: Colors.grey[400], blurRadius: 2.0, spreadRadius: 0.0)
style: TextStyle( ], borderRadius: BorderRadius.circular(10), color: Colors.white),
color: new Color(0xFFc5272d), child: Column(
letterSpacing: 1.0, crossAxisAlignment: CrossAxisAlignment.start,
fontSize: 20.0)), children: <Widget>[
Container(
margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0),
child: Text(this.text,
overflow: TextOverflow.clip,
style: TextStyle(
color: new Color(0xFFc5272d),
letterSpacing: 1.0,
fontSize: 20.0)),
),
Container(
margin: EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 0.0),
child: Text(this.subText,
overflow: TextOverflow.clip,
style: TextStyle(
color: Colors.black, letterSpacing: 1.0, fontSize: 15.0)),
),
Spacer(),
Container(
alignment: Alignment.bottomRight,
margin: EdgeInsets.fromLTRB(0.0, 0.0, 10.0, 8.0),
child: Image.asset(this.image, width: 60.0, height: 60.0),
),
],
), ),
Container( ),
margin: EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 0.0), if(locked)
child: Text(this.subText, Align(
overflow: TextOverflow.clip, alignment: Alignment.center,
style: TextStyle( child: lock()
color: Colors.black, letterSpacing: 1.0, fontSize: 15.0)), )
), ] ,
Container(
alignment: Alignment.bottomRight,
margin: EdgeInsets.fromLTRB(0.0, 0.0, 10.0, 8.0),
child: Image.asset(this.image, width: 60.0, height: 60.0),
),
],
), ),
), ),
); );
} }
Widget lock(){
return Container(child: Icon(Icons.lock_rounded, size: 80),);
}
} }

@ -195,7 +195,7 @@ class _ApointmentCardState extends State<AppointmentCard> {
widgetBuilder: (_, CurrentRemainingTime time) { widgetBuilder: (_, CurrentRemainingTime time) {
return time != null return time != null
? Text( ? Text(
'${time.days}:${time.hours}:${time.min}:${time.sec} ' + '${time.days != null ? time.days : "0"}:${time.hours != null ? time.hours : "0"}:${time.min}:${time.sec} ' +
TranslationBase.of(context) TranslationBase.of(context)
.upcomingTimeLeft, .upcomingTimeLeft,
style: TextStyle( style: TextStyle(

@ -24,23 +24,13 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
imagesInfo.add(ImagesInfo( imagesInfo
imageEn: .add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/ar/0.png'));
'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/en/0.png', imagesInfo
imageAr: .add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/ar/1.png'));
'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/ar/0.png'));
imagesInfo.add(ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/en/1.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/ar/1.png'));
return BaseView<InsuranceViewModel>( return BaseView<InsuranceViewModel>(
onModelReady: widget.appointmentNo != null onModelReady: widget.appointmentNo != null ? (model) => model.getInsuranceApproval(appointmentNo: widget.appointmentNo) : (model) => model.getInsuranceApproval(),
? (model) => builder: (BuildContext context, InsuranceViewModel model, Widget child) => AppScaffold(
model.getInsuranceApproval(appointmentNo: widget.appointmentNo)
: (model) => model.getInsuranceApproval(),
builder: (BuildContext context, InsuranceViewModel model, Widget child) =>
AppScaffold(
isShowAppBar: true, isShowAppBar: true,
baseViewModel: model, baseViewModel: model,
appBarTitle: TranslationBase.of(context).approvals, appBarTitle: TranslationBase.of(context).approvals,
@ -65,153 +55,121 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
children: <Widget>[ children: <Widget>[
Texts( Texts(
TranslationBase.of(context).totalApproval, TranslationBase.of(context).totalApproval,
color: Color(0xff60688B), color: Color(0xff60688B),
fontSize: 19.0, fontSize: 19.0,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
if (model.insuranceApproval.length > 0) if (model.insuranceApproval.length > 0)
Container( Container(
width: 60, width: 60,
height: 40, height: 40,
decoration: BoxDecoration( decoration: BoxDecoration(color: Theme.of(context).primaryColor, borderRadius: BorderRadius.circular(19.0)),
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.circular(19.0)),
child: Center( child: Center(
child: Texts( child: Texts(
model.insuranceApproval[0].unUsedCount model.insuranceApproval[0].unUsedCount.toString(),
.toString(), color: Colors.white,
color: Colors.white, fontSize: 17.0, fontSize: 17.0,
), ),
)) ))
], ],
)), )),
...List.generate( ...List.generate(model.insuranceApproval.length, (index) {
model.insuranceApproval.length, print(model.insuranceApproval[index].isLiveCareAppointment);
(index) => RoundedContainer( return RoundedContainer(
backgroundColor: Colors.white, backgroundColor: Colors.white,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
ExpansionTile( ExpansionTile(
title: Container( title: Container(
//height: 120.0, //height: 120.0,
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start, children: <Widget>[
children: <Widget>[ model.insuranceApproval[index].isLiveCareAppointment
model.insuranceApproval[index].patientDescription == "In Patient" ? sideBadge(TranslationBase.of(context).liveCare, 0xffA9A089)
? Container( : model.insuranceApproval[index].isInOutPatient
decoration: BoxDecoration( ? sideBadge(TranslationBase.of(context).outpatient, 0xff505a5d)
color: Theme.of(context).primaryColor, : sideBadge(TranslationBase.of(context).inPatient, 0xffb8372c),
borderRadius: Padding(
BorderRadius.circular( padding: EdgeInsets.symmetric(vertical: 10.0),
16.0)), child: Texts(
width: 115.0, model.insuranceApproval[index].clinicName,
padding: fontSize: 20.0,
EdgeInsets.only(left: 11.5), color: Color(0xff60686B),
child: Center( fontWeight: FontWeight.w600,
child: Texts( ),
TranslationBase.of(context).inPatient, ),
color: Colors.white, Texts(
), model.insuranceApproval[index].doctorName,
), fontSize: 17.0,
) ),
: Container( ],
decoration: BoxDecoration( ),
color: Color(0xff505A5D), ),
borderRadius: children: <Widget>[
BorderRadius.circular( Padding(
16.0)), padding: EdgeInsets.symmetric(vertical: 12.0, horizontal: 12.0),
width: 115.0, child: Column(
padding: crossAxisAlignment: CrossAxisAlignment.start,
EdgeInsets.only(left: 11.5), children: <Widget>[
child: Center( Row(
child: Texts( children: [
TranslationBase.of(context).outpatient, Texts(
color: Colors.white, TranslationBase.of(context).approvalNo,
), fontSize: 18.0,
),
),
Padding(
padding: EdgeInsets.symmetric(
vertical: 10.0),
child: Texts(
model.insuranceApproval[index]
.clinicName,
fontSize: 20.0,
color: Color(0xff60686B),
fontWeight: FontWeight.w600,
),
), ),
Texts( Texts(
model.insuranceApproval[index] model.insuranceApproval[index].approvalNo.toString(),
.doctorName, fontSize: 18.0,
fontSize: 17.0, fontWeight: FontWeight.w600,
), ),
], ],
), ),
), Divider(
children: <Widget>[ color: Colors.black,
Padding( height: 25.0,
padding: EdgeInsets.symmetric( thickness: 1.0,
vertical: 12.0, horizontal: 12.0), ),
child: Column( Row(
crossAxisAlignment: children: [
CrossAxisAlignment.start, Texts(
children: <Widget>[ TranslationBase.of(context).procedureStatus,
Row( fontSize: 17.5,
children: [ ),
Texts( SizedBox(
TranslationBase.of(context).approvalNo, width: 12,
fontSize: 18.0, ),
), Texts(
Texts(model.insuranceApproval[index].approvalNo.toString(), model.insuranceApproval[index].approvalStatusDescption,
fontSize: 18.0, fontWeight: FontWeight.w600,
fontWeight: FontWeight.w600,), fontSize: 17.5,
], ),
), ],
Divider( ),
color: Colors.black, Divider(
height: 25.0, color: Colors.black,
thickness: 1.0, height: 25.0,
), thickness: 1.0,
Row( ),
children: [ Row(
Texts( children: [
TranslationBase.of(context).procedureStatus , Texts(
fontSize: 17.5, TranslationBase.of(context).unusedCount,
), fontSize: 17.5,
SizedBox(width: 12,), ),
Texts( Texts(
model.insuranceApproval[index].approvalStatusDescption, model.insuranceApproval[index].unUsedCount.toString(),
fontWeight: FontWeight.w600, fontSize: 17.5,
fontSize: 17.5, fontWeight: FontWeight.w600,
), ),
], ],
), ),
Divider( Divider(
color: Colors.black, color: Colors.black,
height: 25.0, height: 25.0,
thickness: 1.0, thickness: 1.0,
), ),
Row(
children: [
Texts(
TranslationBase.of(context).unusedCount,
fontSize: 17.5,
),
Texts(
model.insuranceApproval[index].unUsedCount.toString(),
fontSize: 17.5,
fontWeight: FontWeight.w600,
),
],
),
Divider(
color: Colors.black,
height: 25.0,
thickness: 1.0,
),
// Text( // Text(
// 'Company Name: ' + // 'Company Name: ' +
// model.insuranceApproval[index] // model.insuranceApproval[index]
@ -224,190 +182,131 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
// fontSize: 17.5, // fontSize: 17.5,
// fontWeight: FontWeight.w600), // fontWeight: FontWeight.w600),
// ), // ),
Texts( Texts(
TranslationBase.of(context).companyName, TranslationBase.of(context).companyName,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 17.5, fontSize: 17.5,
), ),
Divider(
color: Colors.black,
height: 25.0,
thickness: 1.0,
),
Row(
children: [
Texts(
TranslationBase.of(context).receiptOn ,
fontSize: 17.5,
fontWeight: FontWeight.w600,
),
Texts(
convertDateFormat(model.insuranceApproval[index].rceiptOn),
fontSize: 17.5,
fontWeight: FontWeight.w600,
), Divider(
], color: Colors.black,
height: 25.0,
thickness: 1.0,
),
Row(
children: [
Texts(
TranslationBase.of(context).receiptOn,
fontSize: 17.5,
fontWeight: FontWeight.w600,
),
Texts(
convertDateFormat(model.insuranceApproval[index].receiptOn),
fontSize: 17.5,
fontWeight: FontWeight.w600,
),
],
),
Divider(
color: Colors.black,
height: 25.0,
thickness: 1.0,
),
Row(
children: [
Texts(
TranslationBase.of(context).expiryDate,
fontSize: 17.5,
fontWeight: FontWeight.w600,
),
Texts(
convertDateFormat(model.insuranceApproval[index].expiryDate),
fontSize: 17.5,
fontWeight: FontWeight.w600,
),
],
),
Divider(
color: Colors.black,
height: 55.0,
thickness: 1.2,
),
IntrinsicHeight(
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Expanded(
flex: 1,
child: Column(
children: <Widget>[
Text(TranslationBase.of(context).procedureName),
Padding(
padding: EdgeInsets.only(top: SizeConfig.heightMultiplier * 3.0),
child: Text(
model.insuranceApproval[index].apporvalDetails?.procedureName ?? '',
style: TextStyle(fontWeight: FontWeight.w600, fontSize: 15.5),
),
),
],
),
), ),
Divider( VerticalDivider(
width: 10.0,
thickness: 1.2,
color: Colors.black, color: Colors.black,
height: 25.0,
thickness: 1.0,
), ),
Row( Expanded(
children: [ flex: 1,
Texts( child: Column(
TranslationBase.of(context).expiryDate, children: <Widget>[
fontSize: 17.5, Text(TranslationBase.of(context).procedureStatus),
fontWeight: FontWeight.w600, Padding(
padding: EdgeInsets.only(top: SizeConfig.heightMultiplier * 3.0),
), child: Text(
Texts( model.insuranceApproval[index].apporvalDetails?.status ?? '',
convertDateFormat(model.insuranceApproval[index].expiryDate), style: TextStyle(fontSize: 17.5, fontWeight: FontWeight.w600),
fontSize: 17.5, ),
fontWeight: FontWeight.w600, ),
],
), ),
],
), ),
Divider( VerticalDivider(
color: Colors.black, width: 2.3,
height: 55.0,
thickness: 1.2, thickness: 1.2,
color: Colors.black,
), ),
IntrinsicHeight( Expanded(
child: Row( flex: 1,
crossAxisAlignment: child: Column(
CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Expanded( Text(TranslationBase.of(context).usageStatus),
flex: 1, Padding(
child: Column( padding: EdgeInsets.only(top: SizeConfig.heightMultiplier * 3.0),
children: <Widget>[ child: Text(
Text(TranslationBase.of( model.insuranceApproval[index].apporvalDetails?.isInvoicedDesc ?? '',
context) style: TextStyle(fontWeight: FontWeight.w600, fontSize: 17.5),
.procedureName),
Padding(
padding: EdgeInsets.only(
top: SizeConfig
.heightMultiplier *
3.0),
child: Text(
model
.insuranceApproval[
index]
.approvalDetails ==
null
? ''
: model
.insuranceApproval[
index]
.approvalDetails
.procedureName,
style: TextStyle(
fontWeight:
FontWeight.w600,
fontSize: 15.5),
),
),
],
),
),
VerticalDivider(
width: 10.0,
thickness: 1.2,
color: Colors.black,
),
Expanded(
flex: 1,
child: Column(
children: <Widget>[
Text(TranslationBase.of(
context)
.procedureStatus),
Padding(
padding: EdgeInsets.only(
top: SizeConfig
.heightMultiplier *
3.0),
child: Text(
model
.insuranceApproval[
index]
.approvalDetails ==
null
? ''
: model
.insuranceApproval[
index]
.approvalDetails
.status,
style: TextStyle(
fontSize: 17.5,
fontWeight:
FontWeight
.w600),
),
),
],
),
),
VerticalDivider(
width: 2.3,
thickness: 1.2,
color: Colors.black,
),
Expanded(
flex: 1,
child: Column(
children: <Widget>[
Text(TranslationBase.of(
context)
.usageStatus),
Padding(
padding: EdgeInsets.only(
top: SizeConfig
.heightMultiplier *
3.0),
child: Text(
model
.insuranceApproval[
index]
.approvalDetails ==
null
? ''
: model
.insuranceApproval[
index]
.approvalDetails
.isInvoicedDesc,
style: TextStyle(
fontWeight:
FontWeight.w600,
fontSize: 17.5),
),
),
],
), ),
), ),
], ],
), ),
), ),
Divider(
color: Colors.black,
height: 25.0,
thickness: 1.0,
),
], ],
), ),
), ),
Divider(
color: Colors.black,
height: 25.0,
thickness: 1.0,
),
], ],
), ),
], ),
), ],
)), ),
],
),
);
}),
], ],
), ),
), ),
@ -416,6 +315,22 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
); );
} }
Widget sideBadge(String title, int color) {
return Container(
decoration: BoxDecoration(
color: Color(color),
borderRadius: BorderRadius.circular(16.0),
),
width: 115.0,
padding: EdgeInsets.only(top: 1, bottom: 1),
alignment: Alignment.center,
child: Texts(
title,
color: Colors.white,
),
);
}
convertDateFormat(String Date) { convertDateFormat(String Date) {
const start = "/Date("; const start = "/Date(";
const end = "+0300)"; const end = "+0300)";
@ -423,13 +338,8 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
final startIndex = Date.indexOf(start); final startIndex = Date.indexOf(start);
final endIndex = Date.indexOf(end, startIndex + start.length); final endIndex = Date.indexOf(end, startIndex + start.length);
var date = new DateTime.fromMillisecondsSinceEpoch( var date = new DateTime.fromMillisecondsSinceEpoch(int.parse(Date.substring(startIndex + start.length, endIndex)));
int.parse(Date.substring(startIndex + start.length, endIndex))); String newDate = date.year.toString() + "-" + date.month.toString().padLeft(2, '0') + "-" + date.day.toString().padLeft(2, '0');
String newDate = date.year.toString() +
"-" +
date.month.toString().padLeft(2, '0') +
"-" +
date.day.toString().padLeft(2, '0');
return newDate.toString(); return newDate.toString();
} }

@ -6,7 +6,7 @@ import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_details.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_details.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.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';
@ -33,26 +33,41 @@ class _InsuranceCardState extends State<InsuranceCard> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
imagesInfo.add(ImagesInfo( imagesInfo.add(ImagesInfo(
imageEn: imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/insurance-card/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/insurance-card/ar/0.png'));
'https://hmgwebservices.com/Images/MobileApp/imges-info/insurance-card/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/imges-info/insurance-card/ar/0.png'));
return BaseView<InsuranceViewModel>( return BaseView<InsuranceViewModel>(
onModelReady: (model) => model.getInsurance(), onModelReady: (model) => model.getInsurance(),
builder: (BuildContext context, InsuranceViewModel model, Widget child) => builder: (BuildContext context, InsuranceViewModel model, Widget child) => AppScaffold(
AppScaffold(
isShowAppBar: true, isShowAppBar: true,
baseViewModel: model, baseViewModel: model,
showHomeAppBarIcon: false,
appBarTitle: TranslationBase.of(context).insuranceCards, appBarTitle: TranslationBase.of(context).insuranceCards,
description: TranslationBase.of(context).infoInsuranceCards, description: TranslationBase.of(context).infoInsuranceCards,
infoList: TranslationBase.of(context).infoInsuranceCardsPoints, infoList: TranslationBase.of(context).infoInsuranceCardsPoints,
imagesInfo: imagesInfo, imagesInfo: imagesInfo,
appBarIcons: [
IconButton(
padding: EdgeInsets.zero,
icon: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8),
),
margin: EdgeInsets.only(right: 8),
padding: EdgeInsets.only(right: 4, left: 4),
child: Image.asset(
'assets/images/medical/insurance_update_icon_.png',
height: SizeConfig.heightMultiplier * 5,
width: SizeConfig.heightMultiplier * 5,
),
),
onPressed: () {
Navigator.push(context, FadePage(page: InsuranceUpdate()));
},
),
],
body: Container( body: Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(left: SizeConfig.screenWidth * 0.004, right: SizeConfig.screenWidth * 0.004, top: SizeConfig.screenWidth * 0.04),
left: SizeConfig.screenWidth * 0.004,
right: SizeConfig.screenWidth * 0.004,
top: SizeConfig.screenWidth * 0.04),
child: ListView.builder( child: ListView.builder(
itemCount: model.insurance == null ? 0 : model.insurance.length, itemCount: model.insurance == null ? 0 : model.insurance.length,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
@ -82,23 +97,16 @@ class _InsuranceCardState extends State<InsuranceCard> {
Container( Container(
padding: EdgeInsets.all(14), padding: EdgeInsets.all(14),
width: double.infinity, width: double.infinity,
decoration: BoxDecoration( decoration: BoxDecoration(shape: BoxShape.rectangle, border: Border.all(color: Colors.grey, width: 0.2), borderRadius: BorderRadius.all(Radius.circular(2)), boxShadow: [
shape: BoxShape.rectangle, BoxShadow(
border: Border.all( color: Colors.white70,
color: Colors.grey, width: 0.2), ),
borderRadius: ]),
BorderRadius.all(Radius.circular(2)),
boxShadow: [
BoxShadow(
color: Colors.white70,
),
]),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Texts( Texts(
TranslationBase.of(context).companyName + TranslationBase.of(context).companyName + model.insurance[index].companyName,
model.insurance[index].companyName,
fontSize: 20.0, fontSize: 20.0,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
@ -108,93 +116,46 @@ class _InsuranceCardState extends State<InsuranceCard> {
thickness: 0.5, thickness: 0.5,
), ),
Column( Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Row( Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.spaceBetween,
MainAxisAlignment.spaceBetween, children: [Texts(TranslationBase.of(context).category, fontSize: 18.5), Texts(model.insurance[index].subCategoryDesc, fontSize: 18.5)],
children: [
Texts(
TranslationBase.of(context)
.category,
fontSize: 18.5),
Texts(
model.insurance[index]
.subCategoryDesc,
fontSize: 18.5)
],
), ),
Row( Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.spaceBetween,
MainAxisAlignment.spaceBetween,
children: [ children: [
Texts( Texts(TranslationBase.of(context).expirationDate, fontSize: 18.5),
TranslationBase.of(context)
.expirationDate,
fontSize: 18.5),
Texts( Texts(
convertDateFormat( convertDateFormat(
model.insurance[index] model.insurance[index].cardValidTo,
.cardValidTo,
), ),
fontSize: 18.5), fontSize: 18.5),
], ],
), ),
Row( Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.spaceBetween,
MainAxisAlignment.spaceBetween,
children: [ children: [
Texts( Texts(TranslationBase.of(context).status + ": ", fontSize: 18.5),
TranslationBase.of(context) model.insurance[index].isActive == true
.status + ? Texts(TranslationBase.of(context).activeInsurence, color: Colors.green, fontWeight: FontWeight.w900, fontSize: 17.9)
": ", : Texts(TranslationBase.of(context).notActive, color: Colors.red, fontWeight: FontWeight.w900, fontSize: 17.9)
fontSize: 18.5),
model.insurance[index].isActive ==
true
? Texts(
TranslationBase.of(context)
.activeInsurence,
color: Colors.green,
fontWeight: FontWeight.w900,
fontSize: 17.9)
: Texts(
TranslationBase.of(context)
.notActive,
color: Colors.red,
fontWeight: FontWeight.w900,
fontSize: 17.9)
], ],
), ),
Row( Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.spaceBetween,
MainAxisAlignment.spaceBetween, children: [Texts(TranslationBase.of(context).patientCard, fontSize: 18.5), Texts(model.insurance[index].patientCardID, fontSize: 18.5)],
children: [
Texts(
TranslationBase.of(context)
.patientCard,
fontSize: 18.5),
Texts(
model.insurance[index]
.patientCardID,
fontSize: 18.5)
],
), ),
Row( Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
mainAxisAlignment: Texts(
MainAxisAlignment.spaceBetween, TranslationBase.of(context).policyNumber,
children: [ fontSize: 18.5,
Texts( ),
TranslationBase.of(context) Texts(
.policyNumber, model.insurance[index].insurancePolicyNumber,
fontSize: 18.5, fontSize: 18.5,
), )
Texts( ]),
model.insurance[index]
.insurancePolicyNumber,
fontSize: 18.5,
)
]),
], ],
), ),
SizedBox( SizedBox(
@ -204,11 +165,8 @@ class _InsuranceCardState extends State<InsuranceCard> {
Container( Container(
color: Colors.transparent, color: Colors.transparent,
child: SecondaryButton( child: SecondaryButton(
onTap: () => { onTap: () => {getDetails(model.insurance[index])},
getDetails(model.insurance[index]) label: TranslationBase.of(context).seeDetails,
},
label: TranslationBase.of(context)
.seeDetails,
textColor: Colors.white, textColor: Colors.white,
), ),
width: double.infinity, width: double.infinity,
@ -235,23 +193,16 @@ class _InsuranceCardState extends State<InsuranceCard> {
final startIndex = exDate.indexOf(start); final startIndex = exDate.indexOf(start);
final endIndex = exDate.indexOf(end, startIndex + start.length); final endIndex = exDate.indexOf(end, startIndex + start.length);
var date = new DateTime.fromMillisecondsSinceEpoch( var date = new DateTime.fromMillisecondsSinceEpoch(int.parse(exDate.substring(startIndex + start.length, endIndex)));
int.parse(exDate.substring(startIndex + start.length, endIndex))); String newDate = date.year.toString() + "-" + date.month.toString().padLeft(2, '0') + "-" + date.day.toString().padLeft(2, '0');
String newDate = date.year.toString() +
"-" +
date.month.toString().padLeft(2, '0') +
"-" +
date.day.toString().padLeft(2, '0');
return newDate.toString(); return newDate.toString();
} }
getDetails(data) { getDetails(data) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
_insuranceCardService.getInsuranceDetails(data).then((value) => { _insuranceCardService
GifLoaderDialogUtils.hideDialog(context), .getInsuranceDetails(data)
Navigator.push(context, .then((value) => {GifLoaderDialogUtils.hideDialog(context), Navigator.push(context, FadePage(page: InsuranceCardDetails(data: value[0]['CheckList'])))});
FadePage(page: InsuranceCardDetails(data: value[0]['CheckList'])))
});
} }
} }

@ -1,3 +1,5 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart';
@ -19,6 +21,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.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:feather_icons_flutter/feather_icons_flutter.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
@ -43,7 +46,10 @@ class _HomePageState extends State<HomePage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<DashboardViewModel>( return BaseView<DashboardViewModel>(
onModelReady: (model) => model.getPatientRadOrders(), onModelReady: (model) => () async {
model.getPatientRadOrders();
var user = await sharedPref.getObject(USER_PROFILE);
},
builder: (_, model, wi) => AppScaffold( builder: (_, model, wi) => AppScaffold(
isShowDecPage: false, isShowDecPage: false,
isHelp: true, isHelp: true,
@ -61,7 +67,8 @@ class _HomePageState extends State<HomePage> {
width: double.infinity, width: double.infinity,
height: 210, height: 210,
decoration: BoxDecoration( decoration: BoxDecoration(
image: DecorationImage(image: ExactAssetImage('assets/images/dashboard_top_bg.png'), fit: BoxFit.cover), image: DecorationImage(
image: ExactAssetImage('assets/images/dashboard_top_bg.png'), fit: BoxFit.cover),
), ),
child: Stack( child: Stack(
children: <Widget>[ children: <Widget>[
@ -100,7 +107,10 @@ class _HomePageState extends State<HomePage> {
margin: EdgeInsets.only( margin: EdgeInsets.only(
top: 15.0, top: 15.0,
), ),
child: SvgPicture.asset('assets/images/new-design/covid-19-car.svg', width: 45.0, height: 45.0), child: SvgPicture.asset(
'assets/images/new-design/covid-19-car.svg',
width: 45.0,
height: 45.0),
), ),
Container( Container(
margin: EdgeInsets.only(top: 5.0), margin: EdgeInsets.only(top: 5.0),
@ -157,9 +167,13 @@ class _HomePageState extends State<HomePage> {
height: 125, height: 125,
padding: EdgeInsets.all(15), padding: EdgeInsets.all(15),
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
decoration: BoxDecoration(color: Colors.white.withOpacity(0.3), borderRadius: BorderRadius.all(Radius.circular(5))), decoration: BoxDecoration(
color: Colors.white.withOpacity(0.3),
borderRadius: BorderRadius.all(Radius.circular(5))),
child: SvgPicture.asset( child: SvgPicture.asset(
projectViewModel.isArabic ? 'assets/images/new-design/livecare_arabic_logo.svg' : 'assets/images/new-design/liveCare_white_logo.svg', projectViewModel.isArabic
? 'assets/images/new-design/livecare_arabic_logo.svg'
: 'assets/images/new-design/liveCare_white_logo.svg',
), ),
), ),
), ),
@ -176,8 +190,10 @@ class _HomePageState extends State<HomePage> {
), ),
Positioned( Positioned(
top: 155, top: 155,
left: MediaQuery.of(context).size.width * (MediaQuery.of(context).orientation == Orientation.landscape ? 0.02 : 0.03), left: MediaQuery.of(context).size.width *
right: MediaQuery.of(context).size.width * (MediaQuery.of(context).orientation == Orientation.landscape ? 0.02 : 0.03), (MediaQuery.of(context).orientation == Orientation.landscape ? 0.02 : 0.03),
right: MediaQuery.of(context).size.width *
(MediaQuery.of(context).orientation == Orientation.landscape ? 0.02 : 0.03),
child: (!model.isLogin) child: (!model.isLogin)
? Container( ? Container(
width: double.infinity, width: double.infinity,
@ -187,7 +203,8 @@ class _HomePageState extends State<HomePage> {
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border.all(color: Colors.transparent, width: 0.5), border: Border.all(color: Colors.transparent, width: 0.5),
borderRadius: BorderRadius.all(Radius.circular(9)), borderRadius: BorderRadius.all(Radius.circular(9)),
image: DecorationImage(image: ExactAssetImage('assets/images/bg_graphic.png'), fit: BoxFit.cover)), image: DecorationImage(
image: ExactAssetImage('assets/images/bg_graphic.png'), fit: BoxFit.cover)),
child: Container( child: Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
child: Column( child: Column(
@ -208,7 +225,8 @@ class _HomePageState extends State<HomePage> {
fontSize: 16, fontSize: 16,
), ),
Align( Align(
alignment: projectViewModel.isArabic ? Alignment.bottomLeft : Alignment.bottomRight, alignment:
projectViewModel.isArabic ? Alignment.bottomLeft : Alignment.bottomRight,
child: InkWell( child: InkWell(
onTap: () { onTap: () {
widget.goToMyProfile(); widget.goToMyProfile();
@ -246,7 +264,8 @@ class _HomePageState extends State<HomePage> {
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border.all(color: Colors.transparent, width: 0.5), border: Border.all(color: Colors.transparent, width: 0.5),
borderRadius: BorderRadius.all(Radius.circular(9)), borderRadius: BorderRadius.all(Radius.circular(9)),
image: DecorationImage(image: ExactAssetImage('assets/images/bg_graphic.png'), fit: BoxFit.cover), image: DecorationImage(
image: ExactAssetImage('assets/images/bg_graphic.png'), fit: BoxFit.cover),
), ),
child: Container( child: Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
@ -262,20 +281,48 @@ class _HomePageState extends State<HomePage> {
SizedBox( SizedBox(
height: 8, height: 8,
), ),
Row( model.user.cRSVerificationStatus == 2
children: [ ? Row(
Texts( children: [
model.user.firstName + " " + model.user.lastName, Texts(
color: Colors.grey[100], model.user.firstName + " " + model.user.lastName,
bold: true, color: Colors.grey[100],
fontSize: 15, bold: true,
), fontSize: 15,
Container( ),
margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 0.0), Container(
child: SvgPicture.asset("assets/images/new-design/verification_check.svg"), margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 0.0),
), child: SvgPicture.asset(
], "assets/images/new-design/verification_check.svg"),
), ),
],
)
: model.user.cRSVerificationStatus == 3
? Row(
children: [
Texts(
model.user.firstName + " " + model.user.lastName,
color: Colors.grey[100],
bold: true,
fontSize: 15,
),
Container(
margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 0.0),
child: SvgPicture.asset(
"assets/images/new-design/pending.svg"),
),
],
)
: Row(
children: [
Texts(
model.user.firstName + " " + model.user.lastName,
color: Colors.grey[100],
bold: true,
fontSize: 15,
),
],
),
Texts( Texts(
'${model.user.patientID}', '${model.user.patientID}',
color: Colors.white, color: Colors.white,
@ -332,7 +379,7 @@ class _HomePageState extends State<HomePage> {
height: 40, height: 40,
), ),
Texts( Texts(
"${model.heightCm}", "${model.heightCm} ${TranslationBase.of(context).cm}",
color: Colors.white, color: Colors.white,
fontSize: 17, fontSize: 17,
) )
@ -350,7 +397,8 @@ class _HomePageState extends State<HomePage> {
width: 25, width: 25,
height: 40, height: 40,
), ),
Texts('${model.weightKg}', color: Colors.white, fontSize: 17) Texts('${model.weightKg} ${TranslationBase.of(context).kg}',
color: Colors.white, fontSize: 17)
], ],
), ),
), ),
@ -359,17 +407,13 @@ class _HomePageState extends State<HomePage> {
), ),
Expanded( Expanded(
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
Image.asset( Image.asset(
'assets/images/blood_icon.png', 'assets/images/blood_icon.png',
width: 35, width: 35,
height: 40, height: 40,
), ),
Texts( Texts('${model.booldType}', color: Colors.white, fontSize: 17)
'${model.booldType}',
color: Colors.white,
)
], ],
), ),
), ),
@ -411,7 +455,9 @@ class _HomePageState extends State<HomePage> {
), ),
), ),
), ),
if (projectViewModel.havePrivilege(64) || projectViewModel.havePrivilege(65) || projectViewModel.havePrivilege(67)) if (projectViewModel.havePrivilege(64) ||
projectViewModel.havePrivilege(65) ||
projectViewModel.havePrivilege(67))
Container( Container(
margin: EdgeInsets.only(left: 15, right: 15), margin: EdgeInsets.only(left: 15, right: 15),
child: Row( child: Row(
@ -419,37 +465,48 @@ class _HomePageState extends State<HomePage> {
children: <Widget>[ children: <Widget>[
if (projectViewModel.havePrivilege(64)) if (projectViewModel.havePrivilege(64))
DashboardItem( DashboardItem(
onTap: () { onTap: (model.user != null && model.user.outSA == 1)
Navigator.push( ? () {}
context, : () {
FadePage( Navigator.push(
page: HomeHealthCarePage(), context,
), FadePage(
); page: HomeHealthCarePage(),
}, ),
);
},
child: Center( child: Center(
child: Padding( child: Padding(
padding: const EdgeInsets.all(15.0), padding: const EdgeInsets.all(15.0),
child: Column( child: (model.user != null && model.user.outSA == 1)
children: <Widget>[ ? Container(
Image.asset( width: double.infinity,
'assets/images/home_health_care_icon.png', height: double.infinity,
width: 50, color: Colors.grey.withOpacity(0.7),
height: 50, child: Icon(
), Icons.lock_outline,
SizedBox( size: 40,
height: 10, ),
), )
Texts( : Column(
TranslationBase.of(context).homeHealthCare, children: <Widget>[
textAlign: TextAlign.center, Image.asset(
color: Colors.white, 'assets/images/home_health_care_icon.png',
fontWeight: FontWeight.w700, width: 50,
fontSize: SizeConfig.textMultiplier * 1.55, height: 50,
) ),
], SizedBox(
), height: 10,
), ),
Texts(
TranslationBase.of(context).homeHealthCare,
textAlign: TextAlign.center,
color: Colors.white,
fontWeight: FontWeight.w700,
fontSize: SizeConfig.textMultiplier * 1.55,
)
],
)),
), ),
height: MediaQuery.of(context).size.width * 0.4, height: MediaQuery.of(context).size.width * 0.4,
imageName: 'home_healthcare_service_bg.png', imageName: 'home_healthcare_service_bg.png',
@ -457,29 +514,46 @@ class _HomePageState extends State<HomePage> {
), ),
if (projectViewModel.havePrivilege(65)) if (projectViewModel.havePrivilege(65))
DashboardItem( DashboardItem(
onTap: () => getPharmacyToken(model), onTap: () =>
(model.user != null && model.user.outSA == 1) ? () {} : getPharmacyToken(model),
child: Center( child: Center(
child: Padding( child: Padding(
padding: const EdgeInsets.all(15.0), padding: const EdgeInsets.all(15.0),
child: Column( child: (model.user != null && model.user.outSA == 1)
children: <Widget>[ ? Container(
Image.asset( width: double.infinity,
'assets/images/pharmacy_logo.png', height: double.infinity,
width: 40, color: Colors.grey.withOpacity(0.7),
height: 40, child: Icon(
), Icons.lock_outline,
SizedBox( size: 40,
height: 20, ),
), )
Texts( : Column(
TranslationBase.of(context).onlinePharmacy, children: <Widget>[
textAlign: TextAlign.center, // if (projectViewModel.user != null && model.isLogin && model.user.outSA == 1)
color: Colors.white, // Image.asset(
fontWeight: FontWeight.w700, // 'assets/images/lock_icon.png',
fontSize: SizeConfig.textMultiplier * 1.55, // width: 50,
) // height: 50,
], // ),
), Image.asset(
'assets/images/pharmacy_logo.png',
width: 40,
height: 40,
),
SizedBox(
height: 20,
),
Texts(
TranslationBase.of(context).onlinePharmacy,
textAlign: TextAlign.center,
color: Colors.white,
fontWeight: FontWeight.w700,
fontSize: SizeConfig.textMultiplier * 1.55,
)
],
),
), ),
), ),
height: MediaQuery.of(context).size.width * 0.4, height: MediaQuery.of(context).size.width * 0.4,
@ -487,37 +561,48 @@ class _HomePageState extends State<HomePage> {
), ),
if (projectViewModel.havePrivilege(67)) if (projectViewModel.havePrivilege(67))
DashboardItem( DashboardItem(
onTap: () { onTap: (model.user != null && model.user.outSA == 1)
Navigator.push( ? () {}
context, : () {
FadePage( Navigator.push(
page: CMCPage(), context,
), FadePage(
); page: CMCPage(),
}, ),
);
},
child: Center( child: Center(
child: Padding( child: Padding(
padding: const EdgeInsets.all(15.0), padding: const EdgeInsets.all(15.0),
child: Column( child: (model.user != null && model.user.outSA == 1)
children: <Widget>[ ? Container(
Image.asset( width: double.infinity,
'assets/images/comprehensive_medical_checkup_logo.png', height: double.infinity,
width: 50, color: Colors.grey.withOpacity(0.7),
height: 50, child: Icon(
), Icons.lock_outline,
SizedBox( size: 40,
height: 10, ),
), )
Texts( : Column(
TranslationBase.of(context).cmcHeading, children: <Widget>[
textAlign: TextAlign.center, Image.asset(
color: Colors.white, 'assets/images/comprehensive_medical_checkup_logo.png',
fontWeight: FontWeight.w700, width: 50,
fontSize: SizeConfig.textMultiplier * 1.55, height: 50,
) ),
], SizedBox(
), height: 10,
), ),
Texts(
TranslationBase.of(context).cmcHeading,
textAlign: TextAlign.center,
color: Colors.white,
fontWeight: FontWeight.w700,
fontSize: SizeConfig.textMultiplier * 1.55,
)
],
)),
), ),
height: MediaQuery.of(context).size.width * 0.4, height: MediaQuery.of(context).size.width * 0.4,
color: HexColor("#747C80"), color: HexColor("#747C80"),
@ -766,7 +851,17 @@ class _HomePageState extends State<HomePage> {
} }
class DashboardItem extends StatelessWidget { class DashboardItem extends StatelessWidget {
const DashboardItem({this.hasBorder = false, this.imageName, @required this.child, this.onTap, Key key, this.width, this.height, this.color, this.opacity = 0.4, this.hasColorFilter = true}) const DashboardItem(
{this.hasBorder = false,
this.imageName,
@required this.child,
this.onTap,
Key key,
this.width,
this.height,
this.color,
this.opacity = 0.4,
this.hasColorFilter = true})
: super(key: key); : super(key: key);
final bool hasBorder; final bool hasBorder;
final String imageName; final String imageName;
@ -796,12 +891,15 @@ class DashboardItem extends StatelessWidget {
: HexColor('#050705').withOpacity(opacity) : HexColor('#050705').withOpacity(opacity)
: Colors.white, : Colors.white,
borderRadius: BorderRadius.circular(6.0), borderRadius: BorderRadius.circular(6.0),
border: hasBorder ? Border.all(width: 1.0, color: const Color(0xffcccccc)) : Border.all(width: 0.0, color: Colors.transparent), border: hasBorder
? Border.all(width: 1.0, color: const Color(0xffcccccc))
: Border.all(width: 0.0, color: Colors.transparent),
image: imageName != null image: imageName != null
? DecorationImage( ? DecorationImage(
image: ExactAssetImage('assets/images/$imageName'), image: ExactAssetImage('assets/images/$imageName'),
fit: BoxFit.cover, fit: BoxFit.cover,
colorFilter: hasColorFilter ? new ColorFilter.mode(Colors.black.withOpacity(0.2), BlendMode.dstIn) : null, colorFilter:
hasColorFilter ? new ColorFilter.mode(Colors.black.withOpacity(0.2), BlendMode.dstIn) : null,
) )
: null, : null,
), ),

@ -1,5 +1,6 @@
import 'dart:io'; import 'dart:io';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
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/geofencing/requests/GeoZonesRequestModel.dart'; import 'package:diplomaticquarterapp/core/model/geofencing/requests/GeoZonesRequestModel.dart';
@ -18,7 +19,6 @@ import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page_new.dart'; import 'package:diplomaticquarterapp/pages/medical/medical_profile_page_new.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.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/family_files/family_files_provider.dart' as family;
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/uitl/CalendarUtils.dart'; import 'package:diplomaticquarterapp/uitl/CalendarUtils.dart';
import 'package:diplomaticquarterapp/uitl/HMGNetworkConnectivity.dart'; import 'package:diplomaticquarterapp/uitl/HMGNetworkConnectivity.dart';
@ -33,10 +33,12 @@ import 'package:diplomaticquarterapp/widgets/buttons/floatingActionButton.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/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/drawer/app_drawer_widget.dart'; import 'package:diplomaticquarterapp/widgets/drawer/app_drawer_widget.dart';
import 'package:firebase_analytics/observer.dart';
import 'package:diplomaticquarterapp/widgets/others/not_auh_page.dart'; import 'package:diplomaticquarterapp/widgets/others/not_auh_page.dart';
import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.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 'package:provider/provider.dart';
@ -46,12 +48,22 @@ import '../../routes.dart';
import 'home_page.dart'; import 'home_page.dart';
class LandingPage extends StatefulWidget { class LandingPage extends StatefulWidget {
static LandingPage shared;
_LandingPageState state;
LandingPage() {
LandingPage.shared = this;
}
static bool isOpenCallPage = false; static bool isOpenCallPage = false;
static IncomingCallData incomingCallData = new IncomingCallData(); static IncomingCallData incomingCallData = new IncomingCallData();
@override @override
_LandingPageState createState() => _LandingPageState(); _LandingPageState createState() => state = _LandingPageState();
switchToDoFromHMGServices() {
state.changeCurrentTab(4);
}
} }
class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver { class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
@ -63,11 +75,14 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
var notificationCount = ''; var notificationCount = '';
var themeNotifier; var themeNotifier;
bool _showBottomNavigationBar = true;
///inject the user data ///inject the user data
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>(); AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
final FirebaseMessaging _firebaseMessaging = FirebaseMessaging(); final FirebaseMessaging _firebaseMessaging = FirebaseMessaging();
final authService = new AuthProvider(); final authService = new AuthProvider();
var event = RobotProvider(); var event = RobotProvider();
var familyFileProvider = family.FamilyFilesProvider(); var familyFileProvider = family.FamilyFilesProvider();
@ -82,33 +97,66 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
bool isPageNavigated = false; bool isPageNavigated = false;
LocationUtils locationUtils; LocationUtils locationUtils;
_changeCurrentTab(int tab) { changeCurrentTab(int tab) {
if (tab == 3) { print(tab);
// if (!projectViewModel.isLogin) { if (!projectViewModel.isLogin) {
// Navigator.push( if (tab == 3) {
// context, List<ImagesInfo> imagesInfo = [];
// MaterialPageRoute( imagesInfo.add(
// builder: (cxt) => NotAutPage( ImagesInfo(
// title: TranslationBase.of(context).myFamilyFiles, imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/en/0.png',
// description: TranslationBase.of(context).familyInfo, imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/ar/0.png'),
// infoList: [], );
// imagesInfo: [],
// icon: "assets/images/new/bottom_nav/family_files.svg", imagesInfo.add(
// ), ImagesInfo(
// ), imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/en/1.png',
// ); imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/ar/1.png'),
// return Container(); );
// } Navigator.push(
// return; context,
MaterialPageRoute(
builder: (cxt) => NotAutPage(
title: TranslationBase.of(context).myFamilyFiles,
description: TranslationBase.of(context).familyInfo,
infoList: [],
imagesInfo: imagesInfo,
icon: "assets/images/new/bottom_nav/family_files.svg",
),
),
);
return;
}
if (tab == 4) {
List<ImagesInfo> imagesInfo = [];
imagesInfo.add(
ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/todo/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/todo/ar/0.png'));
Navigator.push(
context,
MaterialPageRoute(
builder: (cxt) => NotAutPage(
title: TranslationBase.of(context).todoList,
description: TranslationBase.of(context).infoTodo,
infoList: [],
imagesInfo: imagesInfo,
icon: "assets/images/new/bottom_nav/todo.svg",
),
),
);
return;
}
} }
setState(() { setState(() {
currentTab = tab; if (currentTab > 0 && tab == 2)
if (tab != 0) pageController.jumpToPage(0);
else if (tab != 0)
pageController.jumpToPage(tab); pageController.jumpToPage(tab);
else { else {
IS_VOICE_COMMAND_CLOSED = false; IS_VOICE_COMMAND_CLOSED = false;
pageController.jumpToPage(tab); pageController.jumpToPage(tab);
} }
currentTab = tab;
}); });
} }
@ -197,6 +245,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
}); });
requestPermissions(); requestPermissions();
// }); // });
// //
// //_firebase Background message handler // //_firebase Background message handler
@ -369,7 +418,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
checkValue(projectProvider) { checkValue(projectProvider) {
if (projectProvider.searchValue != null) { if (projectProvider.searchValue != null) {
_changeCurrentTab(2); changeCurrentTab(2);
} }
} }
@ -401,6 +450,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
} else { } else {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
authService.selectDeviceImei(DEVICE_TOKEN).then((SelectDeviceIMEIRES value) { authService.selectDeviceImei(DEVICE_TOKEN).then((SelectDeviceIMEIRES value) {
this.getNotificationCount(DEVICE_TOKEN);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (value != null) { if (value != null) {
setUserValues(value); setUserValues(value);
@ -529,7 +579,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
children: [ children: [
HomePage2( HomePage2(
goToMyProfile: () { goToMyProfile: () {
_changeCurrentTab(1); changeCurrentTab(1);
}, },
onLoginClick: () { onLoginClick: () {
login(); login();
@ -542,7 +592,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
], // Please do not remove the BookingOptions from this array ], // Please do not remove the BookingOptions from this array
), ),
bottomNavigationBar: BottomNavBar( bottomNavigationBar: BottomNavBar(
changeIndex: _changeCurrentTab, changeIndex: changeCurrentTab,
index: currentTab, index: currentTab,
), ),
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
@ -550,7 +600,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
? FloatingButton( ? FloatingButton(
elevation: true, elevation: true,
onTap: () { onTap: () {
_changeCurrentTab(2); changeCurrentTab(2);
}) })
: null); : null);
} }

@ -9,7 +9,9 @@ class LiveCarePaymentDialog extends StatefulWidget {
String clinicName; String clinicName;
LiveCarePaymentDialog( LiveCarePaymentDialog(
{@required this.getERAppointmentFeesList, @required this.waitingTime, @required this.clinicName}); {@required this.getERAppointmentFeesList,
@required this.waitingTime,
@required this.clinicName});
@override @override
_LiveCarePaymentDialogState createState() => _LiveCarePaymentDialogState(); _LiveCarePaymentDialogState createState() => _LiveCarePaymentDialogState();
@ -32,14 +34,15 @@ class _LiveCarePaymentDialogState extends State<LiveCarePaymentDialog> {
height: MediaQuery.of(context).size.height * 0.691, height: MediaQuery.of(context).size.height * 0.691,
margin: EdgeInsets.all(20.0), margin: EdgeInsets.all(20.0),
width: 450.0, width: 450.0,
child: Column( child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: <Widget>[ children: <Widget>[
Container( Container(
alignment: Alignment.center, alignment: Alignment.center,
margin: EdgeInsets.only(bottom: 10.0), margin: EdgeInsets.only(bottom: 10.0),
child: Text("Online Consultation", child: Text(TranslationBase.of(context).onlineConsultation,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: style:
TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)), TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)),
@ -52,7 +55,7 @@ class _LiveCarePaymentDialogState extends State<LiveCarePaymentDialog> {
direction: Axis.horizontal, direction: Axis.horizontal,
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: Text("Waiting time to start LiveCare consultation", child: Text(TranslationBase.of(context).expectedWaiting,
textAlign: TextAlign.end, textAlign: TextAlign.end,
style: TextStyle(fontSize: 13.0)), style: TextStyle(fontSize: 13.0)),
), ),
@ -92,7 +95,7 @@ class _LiveCarePaymentDialogState extends State<LiveCarePaymentDialog> {
alignment: Alignment.center, alignment: Alignment.center,
margin: EdgeInsets.only(top: 5.0), margin: EdgeInsets.only(top: 5.0),
padding: EdgeInsets.all(5.0), padding: EdgeInsets.all(5.0),
child: Text("Consultation fee", child: Text(TranslationBase.of(context).erConsultFee,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: 14.0, fontSize: 14.0,
@ -155,8 +158,7 @@ class _LiveCarePaymentDialogState extends State<LiveCarePaymentDialog> {
Container( Container(
margin: EdgeInsets.only(left: 10.0), margin: EdgeInsets.only(left: 10.0),
width: MediaQuery.of(context).size.width * 0.55, width: MediaQuery.of(context).size.width * 0.55,
child: Text( child: Text(TranslationBase.of(context).insuredPatient,
"If you're Insurance patient, you have only have to pay the co-payment",
style: TextStyle(fontSize: 13.0)), style: TextStyle(fontSize: 13.0)),
), ),
], ],
@ -175,7 +177,7 @@ class _LiveCarePaymentDialogState extends State<LiveCarePaymentDialog> {
), ),
Container( Container(
child: new Text( child: new Text(
'I Accept the Terms And Conditions', TranslationBase.of(context).iAcceptTerms,
style: new TextStyle(fontSize: 14.0), style: new TextStyle(fontSize: 14.0),
), ),
), ),
@ -198,7 +200,7 @@ class _LiveCarePaymentDialogState extends State<LiveCarePaymentDialog> {
alignment: Alignment.center, alignment: Alignment.center,
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: new Text( child: new Text(
'You can pay by the following Options:', TranslationBase.of(context).upComingPayOption,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: new TextStyle(fontSize: 14.0), style: new TextStyle(fontSize: 14.0),
), ),
@ -236,8 +238,10 @@ class _LiveCarePaymentDialogState extends State<LiveCarePaymentDialog> {
Expanded( Expanded(
child: InkWell( child: InkWell(
onTap: () { onTap: () {
if(_selected == 0) { if (_selected == 0) {
AppToast.showErrorToast(message: "Please accept terms & conditions to continue"); AppToast.showErrorToast(
message: TranslationBase.of(context)
.pleaseAcceptTerms);
} else { } else {
Navigator.pop(context, true); Navigator.pop(context, true);
} }
@ -255,7 +259,7 @@ class _LiveCarePaymentDialogState extends State<LiveCarePaymentDialog> {
), ),
), ),
], ],
), )),
), ),
), ),
); );

@ -535,7 +535,8 @@ class _clinic_listState extends State<ClinicList> {
isDataLoaded isDataLoaded
? Container( ? Container(
height: MediaQuery.of(context).size.height * 0.7, height: MediaQuery.of(context).size.height * 0.7,
child: Column( child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Container( Container(
@ -575,7 +576,7 @@ class _clinic_listState extends State<ClinicList> {
height: 10.0, height: 10.0,
), ),
], ],
), )),
) )
: Container(), : Container(),
isDataLoaded isDataLoaded
@ -584,7 +585,7 @@ class _clinic_listState extends State<ClinicList> {
child: Container( child: Container(
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
height: 50.0, height: 50.0,
margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 20.0),
child: ButtonTheme( child: ButtonTheme(
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0), borderRadius: BorderRadius.circular(10.0),

@ -629,6 +629,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
// sharedPref.setString( // sharedPref.setString(
// BLOOD_TYPE, result['PatientBloodType']), // BLOOD_TYPE, result['PatientBloodType']),
authenticatedUserObject.user = result.list, authenticatedUserObject.user = result.list,
sharedPref.setObject(MAIN_USER, result.list), sharedPref.setObject(MAIN_USER, result.list),
sharedPref.setObject(USER_PROFILE, result.list), sharedPref.setObject(USER_PROFILE, result.list),
loginTokenID = result.logInTokenID, loginTokenID = result.logInTokenID,

@ -1,3 +1,4 @@
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/config/size_config.dart'; import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
@ -42,6 +43,7 @@ class Login extends StatefulWidget {
class _Login extends State<Login> { class _Login extends State<Login> {
final util = Utils(); final util = Utils();
final nationalIDorFile = TextEditingController(); final nationalIDorFile = TextEditingController();
final mobileNumberController = TextEditingController();
final int loginType = LoginType.loginType; final int loginType = LoginType.loginType;
String mobileNo; String mobileNo;
String countryCode = '966'; String countryCode = '966';
@ -63,6 +65,11 @@ class _Login extends State<Login> {
void initState() { void initState() {
// getDeviceToken(); // getDeviceToken();
super.initState(); super.initState();
if (BASE_URL.contains("uat.")) {
nationalIDorFile.text = "1231755";
mobileNumberController.text = mobileNo = "537503378";
}
} }
getDeviceToken() async { getDeviceToken() async {
@ -115,15 +122,17 @@ class _Login extends State<Login> {
height: 43, height: 43,
width: double.infinity, width: double.infinity,
child: FlatButton( child: FlatButton(
onPressed: () { onPressed: isButtonDisabled
this.startLogin(); ? null
}, : () {
this.startLogin();
},
child: Text( child: Text(
TranslationBase.of(context).login, TranslationBase.of(context).login,
style: TextStyle(fontSize: 16, fontFamily: "Poppins", fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.48), style: TextStyle(fontSize: 16, fontFamily: "Poppins", fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.48),
), ),
// color: Color(0xffD02127), disabledColor: Color(0xff575757),
color: isButtonDisabled == true ? Color(0xff575757) : Color(0xffD02127), color: Color(0xffD02127),
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(6), borderRadius: BorderRadius.circular(6),
), ),
@ -156,7 +165,9 @@ class _Login extends State<Login> {
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[ children: <Widget>[
Directionality(textDirection: TextDirection.ltr, child: MobileNo(onNumberChange: (value) => {mobileNo = value, validateForm()}, onCountryChange: (value) => countryCode = value)), Directionality(
textDirection: TextDirection.ltr,
child: MobileNo(controller: mobileNumberController, onNumberChange: (value) => {mobileNo = value, validateForm()}, onCountryChange: (value) => countryCode = value)),
Directionality( Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: Container( child: Container(
@ -396,6 +407,8 @@ class _Login extends State<Login> {
appointmentRateViewModel.isLogin = true; appointmentRateViewModel.isLogin = true;
projectViewModel.isLogin = true; projectViewModel.isLogin = true;
authenticatedUserObject.user = result.list; authenticatedUserObject.user = result.list;
// authenticatedUserObject.user.cRSVerificationStatus =
// result['CRSVerificationStatus'];
projectViewModel.user = authenticatedUserObject.user; projectViewModel.user = authenticatedUserObject.user;
await familyFileProvider.getSharedRecordByStatus(); await familyFileProvider.getSharedRecordByStatus();

@ -49,7 +49,8 @@ class ActiveMedicationsPage extends StatelessWidget {
height: 5, height: 5,
), ),
Texts( Texts(
TranslationBase.of(context).expDate+' :' + TranslationBase.of(context).expDate +
' :' +
DateUtil.getDayMonthYearDateFormatted(model DateUtil.getDayMonthYearDateFormatted(model
.activePrescriptionReport[index].orderDate), .activePrescriptionReport[index].orderDate),
), ),
@ -57,21 +58,24 @@ class ActiveMedicationsPage extends StatelessWidget {
height: 5, height: 5,
), ),
Texts( Texts(
TranslationBase.of(context).route+ ' :' + TranslationBase.of(context).route +
' :' +
model.activePrescriptionReport[index].route, model.activePrescriptionReport[index].route,
), ),
SizedBox( SizedBox(
height: 5, height: 5,
), ),
Texts( Texts(
TranslationBase.of(context).frequency+ ' :' + TranslationBase.of(context).frequency +
' :' +
model.activePrescriptionReport[index].frequency, model.activePrescriptionReport[index].frequency,
), ),
SizedBox( SizedBox(
height: 5, height: 5,
), ),
Texts( Texts(
TranslationBase.of(context).dailyQuantity + ' :${model.activePrescriptionReport[index].doseDailyQuantity}', TranslationBase.of(context).dailyQuantity +
' :${model.activePrescriptionReport[index].doseDailyQuantity}',
), ),
], ],
), ),
@ -86,16 +90,20 @@ class ActiveMedicationsPage extends StatelessWidget {
color: Colors.red, color: Colors.red,
size: 28, size: 28,
), ),
SizedBox(height: 25,), SizedBox(
height: 25,
),
InkWell( InkWell(
onTap: (){ onTap: () {
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
page: ReminderPage( page: ReminderPage(
frequency: model.activePrescriptionReport[index] frequency: model
.activePrescriptionReport[index]
.frequencyNumber, .frequencyNumber,
days: model.activePrescriptionReport[index].days, days: model
.activePrescriptionReport[index].days,
itemDescription: model itemDescription: model
.activePrescriptionReport[index] .activePrescriptionReport[index]
.itemDescription, .itemDescription,

@ -27,13 +27,13 @@ class AddWeightPage extends StatefulWidget {
AddWeightPage( AddWeightPage(
{Key key, {Key key,
this.model, this.model,
this.isUpdate = false, this.isUpdate = false,
this.dayWeightDate, this.dayWeightDate,
this.lineItemNo, this.lineItemNo,
this.weightValue, this.weightValue,
this.measureTimeSelectedType, this.measureTimeSelectedType,
this.weightUnit}) this.weightUnit})
: super(key: key); : super(key: key);
@override @override
@ -79,39 +79,39 @@ class _AddWeightPageState extends State<AddWeightPage> {
? TranslationBase.of(context).update ? TranslationBase.of(context).update
: TranslationBase.of(context).add, : TranslationBase.of(context).add,
appBarIcons: widget.isUpdate appBarIcons: widget.isUpdate
? [ ? [
IconButton( IconButton(
icon: Icon(Icons.delete), icon: Icon(Icons.delete),
color: Colors.white, color: Colors.white,
onPressed: () { onPressed: () {
ConfirmDialog dialog = new ConfirmDialog( ConfirmDialog dialog = new ConfirmDialog(
context: context, context: context,
confirmMessage: 'Remove this measure', confirmMessage: 'Remove this measure',
okText: TranslationBase.of(context).ok, okText: TranslationBase.of(context).ok,
cancelText: TranslationBase.of(context).cancel, cancelText: TranslationBase.of(context).cancel,
okFunction: () async { okFunction: () async {
ConfirmDialog.closeAlertDialog(context); ConfirmDialog.closeAlertDialog(context);
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
widget.model widget.model
.deleteWeightResult(lineItemNo: widget.lineItemNo) .deleteWeightResult(lineItemNo: widget.lineItemNo)
.then((value) { .then((value) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (widget.model.state == ViewState.ErrorLocal) if (widget.model.state == ViewState.ErrorLocal)
AppToast.showErrorToast( AppToast.showErrorToast(
message: widget.model.error); message: widget.model.error);
else else
Navigator.pop(context); Navigator.pop(context);
}).catchError((e) { }).catchError((e) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: widget.model.error); AppToast.showErrorToast(message: widget.model.error);
}); });
}, },
cancelFunction: () => {}); cancelFunction: () => {});
dialog.showAlertDialog(context); dialog.showAlertDialog(context);
}, },
) )
] ]
: null, : null,
body: SingleChildScrollView( body: SingleChildScrollView(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
@ -246,12 +246,12 @@ class _AddWeightPageState extends State<AddWeightPage> {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
widget.model widget.model
.updateWeightResult( .updateWeightResult(
weightDate: weightDate:
'${dayWeightDate.year}-${dayWeightDate.month}-${dayWeightDate.day} ${timeWeightDate.hour}:${timeWeightDate.minute}:00', '${dayWeightDate.year}-${dayWeightDate.month}-${dayWeightDate.day} ${timeWeightDate.hour}:${timeWeightDate.minute}:00',
weightMeasured: weightMeasured:
_weightValueController.text.toString(), _weightValueController.text.toString(),
weightUnit: weightUnit, weightUnit: weightUnit,
lineItemNo: widget.lineItemNo) lineItemNo: widget.lineItemNo)
.then((value) { .then((value) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (widget.model.state == ViewState.Error) if (widget.model.state == ViewState.Error)
@ -263,7 +263,7 @@ class _AddWeightPageState extends State<AddWeightPage> {
widget.model widget.model
.addWeightResult( .addWeightResult(
weightDate: weightDate:
'${dayWeightDate.year}-${dayWeightDate.month}-${dayWeightDate.day} ${timeWeightDate.hour}:${timeWeightDate.minute}:00', '${dayWeightDate.year}-${dayWeightDate.month}-${dayWeightDate.day} ${timeWeightDate.hour}:${timeWeightDate.minute}:00',
weightMeasured: _weightValueController.text.toString(), weightMeasured: _weightValueController.text.toString(),
weightUnit: weightUnit, weightUnit: weightUnit,
) )

@ -42,15 +42,14 @@ class AddBloodPressurePage extends StatefulWidget {
class _AddBloodPressurePageState extends State<AddBloodPressurePage> { class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
TextEditingController _bloodSystolicValueController = TextEditingController(); TextEditingController _bloodSystolicValueController = TextEditingController();
TextEditingController _bloodDiastolicValueController = TextEditingController _bloodDiastolicValueController = TextEditingController();
TextEditingController();
DateTime bloodSugarDate = DateTime.now(); DateTime bloodSugarDate = DateTime.now();
DateTime timeSugarDate = DateTime.now(); DateTime timeSugarDate = DateTime.now();
int measuredArm = 1; int measuredArm = 1;
bool isButtonDisabled = false; bool isButtonDisabled = false;
final List<String> measureTimeEnList = [ final List<String> measureTimeEnList = [
'Left', 'Left arm ',
'Right', 'Right arm',
]; ];
final List<String> measureTimeArList = [ final List<String> measureTimeArList = [
'الذراع الأيسر', 'الذراع الأيسر',
@ -81,9 +80,7 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: widget.isUpdate appBarTitle: widget.isUpdate ? TranslationBase.of(context).update : TranslationBase.of(context).add,
? TranslationBase.of(context).update
: TranslationBase.of(context).add,
appBarIcons: widget.isUpdate appBarIcons: widget.isUpdate
? [ ? [
IconButton( IconButton(
@ -99,14 +96,10 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
ConfirmDialog.closeAlertDialog(context); ConfirmDialog.closeAlertDialog(context);
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
widget.model widget.model.deactivateDiabeticStatus(lineItemNo: widget.lineItemNo).then((value) {
.deactivateDiabeticStatus(
lineItemNo: widget.lineItemNo)
.then((value) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (widget.model.state == ViewState.ErrorLocal) if (widget.model.state == ViewState.ErrorLocal)
AppToast.showErrorToast( AppToast.showErrorToast(message: widget.model.error);
message: widget.model.error);
else else
Navigator.pop(context); Navigator.pop(context);
}).catchError((e) { }).catchError((e) {
@ -151,17 +144,13 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
), ),
InkWell( InkWell(
onTap: () { onTap: () {
confirmSelectMeasureTimeDialog(projectViewModel.isArabic confirmSelectMeasureTimeDialog(!projectViewModel.isArabic ? measureTimeArList : measureTimeEnList);
? measureTimeEnList
: measureTimeArList);
}, },
child: Container( child: Container(
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
width: double.infinity, width: double.infinity,
height: 65, height: 65,
decoration: BoxDecoration( decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white),
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
@ -188,17 +177,13 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
bloodSugarDate = date; bloodSugarDate = date;
}, },
); );
}, }, currentTime: bloodSugarDate, locale: projectViewModel.localeType);
currentTime: bloodSugarDate,
locale: projectViewModel.localeType);
}, },
child: Container( child: Container(
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
width: double.infinity, width: double.infinity,
height: 65, height: 65,
decoration: BoxDecoration( decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white),
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
@ -213,30 +198,22 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
), ),
InkWell( InkWell(
onTap: () { onTap: () {
DatePicker.showTimePicker(context, showTitleActions: true, DatePicker.showTimePicker(context, showTitleActions: true, onConfirm: (date) {
onConfirm: (date) {
setState( setState(
() { () {
timeSugarDate = date; timeSugarDate = date;
}, },
); );
}, }, currentTime: timeSugarDate, locale: projectViewModel.localeType);
currentTime: timeSugarDate,
locale: projectViewModel.localeType);
}, },
child: Container( child: Container(
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
width: double.infinity, width: double.infinity,
height: 65, height: 65,
decoration: BoxDecoration( decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white),
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [Texts(TranslationBase.of(context).time), Texts(getTime())],
Texts(TranslationBase.of(context).time),
Texts(getTime())
],
), ),
), ),
), ),
@ -254,12 +231,9 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
loading: widget.model.state == ViewState.BusyLocal, loading: widget.model.state == ViewState.BusyLocal,
label: TranslationBase.of(context).save.toUpperCase(), label: TranslationBase.of(context).save.toUpperCase(),
textColor: Colors.white, textColor: Colors.white,
color: isButtonDisabled color: isButtonDisabled ? Colors.grey[900] : Colors.grey,
? Colors.grey[900]
: Colors.grey,
onTap: () async { onTap: () async {
if (_bloodSystolicValueController.text.isNotEmpty && if (_bloodSystolicValueController.text.isNotEmpty && _bloodDiastolicValueController.text.isNotEmpty) {
_bloodDiastolicValueController.text.isNotEmpty) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
widget.model widget.model
@ -267,10 +241,8 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
isUpdate: widget.isUpdate, isUpdate: widget.isUpdate,
bloodPressureDate: bloodPressureDate:
'${bloodSugarDate.year}-${bloodSugarDate.month}-${bloodSugarDate.day} ${timeSugarDate.hour}:${timeSugarDate.minute}:00', '${bloodSugarDate.year}-${bloodSugarDate.month}-${bloodSugarDate.day} ${timeSugarDate.hour}:${timeSugarDate.minute}:00',
diastolicPressure: diastolicPressure: _bloodDiastolicValueController.text.toString(),
_bloodDiastolicValueController.text.toString(), systolicePressure: _bloodSystolicValueController.text.toString(),
systolicePressure:
_bloodSystolicValueController.text.toString(),
measuredArm: measuredArm, measuredArm: measuredArm,
) )
.then((value) { .then((value) {
@ -318,7 +290,7 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
} }
void validateForm() { void validateForm() {
print("_bloodSystolicValueController "+_bloodSystolicValueController.text.length.toString()); print("_bloodSystolicValueController " + _bloodSystolicValueController.text.length.toString());
if (measureTimeSelectedType != 'Left Arm' && if (measureTimeSelectedType != 'Left Arm' &&
_bloodSystolicValueController.text.length > 0 && _bloodSystolicValueController.text.length > 0 &&
_bloodDiastolicValueController.text.length > 0) { _bloodDiastolicValueController.text.length > 0) {
@ -348,5 +320,4 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
// }); // });
// } // }
} }
} }

@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/MonthCurvedChartBloodPressure.dart'; import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/MonthCurvedChartBloodPressure.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; 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: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:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -21,7 +22,7 @@ class BloodPressureMonthlyPage extends StatelessWidget {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
body: model.weighMonthTimeSeriesDataTop.isEmpty? Container(child: Center(child: Texts(TranslationBase.of(context).noDataAvailable),),):ListView( body: ListView(
children: [ children: [
Container( Container(
margin: EdgeInsets.only(top: 12, left: 8, right: 8), margin: EdgeInsets.only(top: 12, left: 8, right: 8),
@ -29,8 +30,8 @@ class BloodPressureMonthlyPage extends StatelessWidget {
child: MonthCurvedChartBloodPressure( child: MonthCurvedChartBloodPressure(
horizontalInterval: 20.0, horizontalInterval: 20.0,
title: TranslationBase.of(context).bloodPressure, title: TranslationBase.of(context).bloodPressure,
timeSeries1: model.weighMonthTimeSeriesDataTop, timeSeries1: model.weighMonthTimeSeriesDataTop.isEmpty?[TimeSeriesSales3(0,0.0)]:model.weighMonthTimeSeriesDataTop,
timeSeries2: model.weighMonthTimeSeriesDataLow, timeSeries2: model.weighMonthTimeSeriesDataLow.isEmpty?[TimeSeriesSales3(0,0.0)]:model.weighMonthTimeSeriesDataLow,
indexes: model.weightWeekTimeSeriesDataLow.length ~/ 5.5, indexes: model.weightWeekTimeSeriesDataLow.length ~/ 5.5,
), ),
), ),
@ -47,7 +48,7 @@ class BloodPressureMonthlyPage extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Table( model.weighMonthTimeSeriesDataTop.isEmpty? Container(child: Center(child: Texts(TranslationBase.of(context).noDataAvailable),),):Table(
border: TableBorder.symmetric( border: TableBorder.symmetric(
inside: BorderSide(width: 2.0, color: Colors.grey[300]), inside: BorderSide(width: 2.0, color: Colors.grey[300]),
), ),

@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/CurvedChartBloodPressure.dart'; import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/CurvedChartBloodPressure.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; 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: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:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -18,7 +19,7 @@ class BloodPressureYearPage extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
body: model.weightYearTimeSeriesDataTop.isEmpty? Container(child: Center(child: Texts(TranslationBase.of(context).noDataAvailable),),):ListView( body:ListView(
children: [ children: [
Container( Container(
margin: EdgeInsets.only(top: 12, left: 8, right: 8), margin: EdgeInsets.only(top: 12, left: 8, right: 8),
@ -26,8 +27,8 @@ class BloodPressureYearPage extends StatelessWidget {
child: CurvedChartBloodPressure( child: CurvedChartBloodPressure(
horizontalInterval: 3.0,// model.weightWeekTimeSeriesDataLow.length==1 ?1 :20.0, horizontalInterval: 3.0,// model.weightWeekTimeSeriesDataLow.length==1 ?1 :20.0,
title: TranslationBase.of(context).bloodPressure, title: TranslationBase.of(context).bloodPressure,
timeSeries1: model.weightYearTimeSeriesDataTop, timeSeries1: model.weightYearTimeSeriesDataTop.isEmpty?[TimeSeriesSales2(DateTime.now(),0.0)]:model.weightYearTimeSeriesDataTop,
timeSeries2: model.weightYearTimeSeriesDataLow, timeSeries2: model.weightYearTimeSeriesDataLow.isEmpty?[TimeSeriesSales2(DateTime.now(),0.0)]:model.weightYearTimeSeriesDataLow,
indexes: model.weightWeekTimeSeriesDataLow.length ~/ 5.5, indexes: model.weightWeekTimeSeriesDataLow.length ~/ 5.5,
), ),
), ),
@ -44,7 +45,7 @@ class BloodPressureYearPage extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Table( model.weightYearTimeSeriesDataTop.isEmpty? Container(child: Center(child: Texts(TranslationBase.of(context).noDataAvailable),),):Table(
border: TableBorder.symmetric( border: TableBorder.symmetric(
inside: BorderSide(width: 2.0, color: Colors.grey[300]), inside: BorderSide(width: 2.0, color: Colors.grey[300]),
), ),

@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/CurvedChartBloodPressure.dart'; import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/CurvedChartBloodPressure.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; 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: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';
@ -21,7 +22,7 @@ class BloodPressureWeeklyPage extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
body: model.weightWeekTimeSeriesDataTop.isEmpty? Container(child: Center(child: Texts(TranslationBase.of(context).noDataAvailable),),): ListView( body: ListView(
children: [ children: [
Container( Container(
margin: EdgeInsets.only(top: 12, left: 8, right: 8), margin: EdgeInsets.only(top: 12, left: 8, right: 8),
@ -29,8 +30,8 @@ class BloodPressureWeeklyPage extends StatelessWidget {
child: CurvedChartBloodPressure( child: CurvedChartBloodPressure(
horizontalInterval:3.0, horizontalInterval:3.0,
title: TranslationBase.of(context).bloodPressure, title: TranslationBase.of(context).bloodPressure,
timeSeries1: model.weightWeekTimeSeriesDataTop, timeSeries1: model.weightWeekTimeSeriesDataTop.isEmpty?[TimeSeriesSales2(DateTime.now(),0.0)]:model.weightWeekTimeSeriesDataTop,
timeSeries2: model.weightWeekTimeSeriesDataLow, timeSeries2: model.weightWeekTimeSeriesDataLow.isEmpty?[TimeSeriesSales2(DateTime.now(),0.0)]:model.weightWeekTimeSeriesDataLow,
indexes: model.weightWeekTimeSeriesDataLow.length ~/ 5.5, indexes: model.weightWeekTimeSeriesDataLow.length ~/ 5.5,
), ),
), ),
@ -47,7 +48,7 @@ class BloodPressureWeeklyPage extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Table( model.weightWeekTimeSeriesDataTop.isEmpty? Container(child: Center(child: Texts(TranslationBase.of(context).noDataAvailable),),): Table(
border: TableBorder.symmetric( border: TableBorder.symmetric(
inside: BorderSide(width: 2.0, color: Colors.grey[300]), inside: BorderSide(width: 2.0, color: Colors.grey[300]),
), ),

@ -27,13 +27,13 @@ class AddBloodSugarPage extends StatefulWidget {
AddBloodSugarPage( AddBloodSugarPage(
{Key key, {Key key,
this.bloodSugarDate, this.bloodSugarDate,
this.measureUnitSelectedType, this.measureUnitSelectedType,
this.isUpdate = false, this.isUpdate = false,
this.measuredTime, this.measuredTime,
this.bloodSugarValue, this.bloodSugarValue,
this.lineItemNo, this.lineItemNo,
this.bloodSugarViewMode}) this.bloodSugarViewMode})
: super(key: key); : super(key: key);
@override @override
@ -99,42 +99,42 @@ class _AddBloodSugarPageState extends State<AddBloodSugarPage> {
? TranslationBase.of(context).update ? TranslationBase.of(context).update
: TranslationBase.of(context).add, : TranslationBase.of(context).add,
appBarIcons: widget.isUpdate appBarIcons: widget.isUpdate
? [ ? [
IconButton( IconButton(
icon: Icon(Icons.delete), icon: Icon(Icons.delete),
color: Colors.white, color: Colors.white,
onPressed: () { onPressed: () {
ConfirmDialog dialog = new ConfirmDialog( ConfirmDialog dialog = new ConfirmDialog(
context: context, context: context,
confirmMessage: 'Remove this measure', confirmMessage: 'Remove this measure',
okText: TranslationBase.of(context).ok, okText: TranslationBase.of(context).ok,
cancelText: TranslationBase.of(context).cancel, cancelText: TranslationBase.of(context).cancel,
okFunction: () async { okFunction: () async {
ConfirmDialog.closeAlertDialog(context); ConfirmDialog.closeAlertDialog(context);
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
widget.bloodSugarViewMode widget.bloodSugarViewMode
.deactivateDiabeticStatus( .deactivateDiabeticStatus(
lineItemNo: widget.lineItemNo) lineItemNo: widget.lineItemNo)
.then((value) { .then((value) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (widget.bloodSugarViewMode.state == if (widget.bloodSugarViewMode.state ==
ViewState.ErrorLocal) ViewState.ErrorLocal)
AppToast.showErrorToast( AppToast.showErrorToast(
message: widget.bloodSugarViewMode.error); message: widget.bloodSugarViewMode.error);
else else
Navigator.pop(context); Navigator.pop(context);
}).catchError((e) { }).catchError((e) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast( AppToast.showErrorToast(
message: widget.bloodSugarViewMode.error); message: widget.bloodSugarViewMode.error);
}); });
}, },
cancelFunction: () => {}); cancelFunction: () => {});
dialog.showAlertDialog(context); dialog.showAlertDialog(context);
}, },
) )
] ]
: null, : null,
body: SingleChildScrollView( body: SingleChildScrollView(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
@ -186,10 +186,10 @@ class _AddBloodSugarPageState extends State<AddBloodSugarPage> {
showTitleActions: true, showTitleActions: true,
minTime: DateTime(DateTime.now().year - 1, 1, 1), minTime: DateTime(DateTime.now().year - 1, 1, 1),
maxTime: DateTime.now(), onConfirm: (date) { maxTime: DateTime.now(), onConfirm: (date) {
setState(() { setState(() {
bloodSugarDate = date; bloodSugarDate = date;
}); });
}, },
currentTime: bloodSugarDate, currentTime: bloodSugarDate,
locale: projectViewModel.localeType); locale: projectViewModel.localeType);
}, },
@ -216,10 +216,10 @@ class _AddBloodSugarPageState extends State<AddBloodSugarPage> {
onTap: () { onTap: () {
DatePicker.showTimePicker(context, showTitleActions: true, DatePicker.showTimePicker(context, showTitleActions: true,
onConfirm: (date) { onConfirm: (date) {
setState(() { setState(() {
timeSugarDate = date; timeSugarDate = date;
}); });
}, },
currentTime: timeSugarDate, currentTime: timeSugarDate,
locale: projectViewModel.localeType); locale: projectViewModel.localeType);
}, },
@ -282,20 +282,20 @@ class _AddBloodSugarPageState extends State<AddBloodSugarPage> {
label: TranslationBase.of(context).save.toUpperCase(), label: TranslationBase.of(context).save.toUpperCase(),
textColor: Colors.white, textColor: Colors.white,
color: isButtonDisabled ? Colors.grey[900] : Colors.grey, color: isButtonDisabled ? Colors.grey[900] : Colors.grey,
onTap: () { onTap: () async {
if (_bloodSugarValueController.text.isNotEmpty) { if (_bloodSugarValueController.text.isNotEmpty) {
if (widget.isUpdate) { if (widget.isUpdate) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
widget.bloodSugarViewMode await widget.bloodSugarViewMode
.updateDiabtecResult( .updateDiabtecResult(
month: bloodSugarDate, month: bloodSugarDate,
hour: timeSugarDate, hour: timeSugarDate,
diabtecUnit: measureUnitSelectedType, diabtecUnit: measureUnitSelectedType,
measuredTime: measuredTime, measuredTime: measuredTime,
lineItemNo: widget.lineItemNo, lineItemNo: widget.lineItemNo,
bloodSugerResult: bloodSugerResult:
_bloodSugarValueController.text.toString()) _bloodSugarValueController.text.toString());
.then((value) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (widget.bloodSugarViewMode.state == if (widget.bloodSugarViewMode.state ==
ViewState.ErrorLocal) ViewState.ErrorLocal)
@ -303,25 +303,28 @@ class _AddBloodSugarPageState extends State<AddBloodSugarPage> {
message: widget.bloodSugarViewMode.error); message: widget.bloodSugarViewMode.error);
else else
Navigator.pop(context); Navigator.pop(context);
});
} else } else {
widget.bloodSugarViewMode GifLoaderDialogUtils.showMyDialog(context);
await widget.bloodSugarViewMode
.addDiabtecResult( .addDiabtecResult(
diabtecUnit: measureUnitSelectedType, diabtecUnit: measureUnitSelectedType,
measuredTime: measuredTime, measuredTime: measuredTime,
bloodSugerResult: bloodSugerResult:
_bloodSugarValueController.text.toString(), _bloodSugarValueController.text.toString(),
bloodSugerDateChart: bloodSugerDateChart:
'${bloodSugarDate.year}-${bloodSugarDate.month}-${bloodSugarDate.day} ${timeSugarDate.hour}:${timeSugarDate.minute}:00', '${bloodSugarDate.year}-${bloodSugarDate.month}-${bloodSugarDate.day} ${timeSugarDate.hour}:${timeSugarDate.minute}:00',
) );
.then((value) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (widget.bloodSugarViewMode.state == ViewState.Error) if (widget.bloodSugarViewMode.state == ViewState.Error)
AppToast.showErrorToast( AppToast.showErrorToast(
message: widget.bloodSugarViewMode.error); message: widget.bloodSugarViewMode.error);
else else
Navigator.pop(context); Navigator.pop(context);
});
}
} }
}), }),
), ),

@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart'; import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/chartData/WeekChartDate.dart'; import 'package:diplomaticquarterapp/core/model/my_trakers/chartData/WeekChartDate.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/chartData/YearMonthlyChartDate.dart'; import 'package:diplomaticquarterapp/core/model/my_trakers/chartData/YearMonthlyChartDate.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/blood_sugar_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/LineChartCurved.dart'; import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/LineChartCurved.dart';
import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/MonthLineChartCurved.dart'; import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/MonthLineChartCurved.dart';
@ -17,25 +18,32 @@ import 'package:provider/provider.dart';
class BloodMonthlyPage extends StatelessWidget { class BloodMonthlyPage extends StatelessWidget {
final List<DiabtecPatientResult> diabtecPatientResult; final List<DiabtecPatientResult> diabtecPatientResult;
final List<TimeSeriesSales3> timeSeriesData ; final List<TimeSeriesSales3> timeSeriesData;
final BloodSugarViewMode bloodSugarViewMode;
const BloodMonthlyPage({Key key, this.diabtecPatientResult, this.timeSeriesData})
const BloodMonthlyPage(
{Key key, this.diabtecPatientResult, this.timeSeriesData, this.bloodSugarViewMode})
: super(key: key); : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
body: timeSeriesData.isEmpty?Container(child: Center(child: Texts(TranslationBase.of(context).noDataAvailable),),): ListView( baseViewModel: bloodSugarViewMode,
body: ListView(
children: [ children: [
Container( Container(
margin: EdgeInsets.only(top: 12, left: 8, right: 8),
width: double.maxFinite, width: double.maxFinite,
color: Colors.white, color: Colors.white,
child: MonthLineChartCurved( child: MonthLineChartCurved(
title: 'Sugar', title: '${TranslationBase.of(context).bloodSugar}',
timeSeries: timeSeriesData, timeSeries: timeSeriesData.isEmpty
? [TimeSeriesSales3(0, 0.0)]
: timeSeriesData,
indexes: timeSeriesData.length ~/ 5.5, indexes: timeSeriesData.length ~/ 5.5,
) )),
),
SizedBox( SizedBox(
height: 12, height: 12,
), ),
@ -49,12 +57,20 @@ class BloodMonthlyPage extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Table( timeSeriesData.isEmpty
border: TableBorder.symmetric( ? Container(
inside: BorderSide(width: 2.0, color: Colors.grey[300]), child: Center(
), child: Texts(
children: fullData(context,projectViewModel), TranslationBase.of(context).noDataAvailable),
), ),
)
: Table(
border: TableBorder.symmetric(
inside:
BorderSide(width: 2.0, color: Colors.grey[300]),
),
children: fullData(context, projectViewModel),
),
], ],
), ),
) )
@ -63,7 +79,8 @@ class BloodMonthlyPage extends StatelessWidget {
); );
} }
List<TableRow> fullData(BuildContext context,ProjectViewModel projectViewModel) { List<TableRow> fullData(
BuildContext context, ProjectViewModel projectViewModel) {
List<TableRow> tableRow = []; List<TableRow> tableRow = [];
tableRow.add( tableRow.add(
TableRow( TableRow(
@ -73,8 +90,12 @@ class BloodMonthlyPage extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0), topLeft: projectViewModel.isArabic
topRight: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0), ? Radius.circular(0.0)
: Radius.circular(10.0),
topRight: projectViewModel.isArabic
? Radius.circular(10.0)
: Radius.circular(0.0),
), ),
), ),
child: Center( child: Center(
@ -120,8 +141,12 @@ class BloodMonthlyPage extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0), topLeft: projectViewModel.isArabic
topRight: projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0), ? Radius.circular(10.0)
: Radius.circular(0.0),
topRight: projectViewModel.isArabic
? Radius.circular(0.0)
: Radius.circular(10.0),
), ),
), ),
child: Center( child: Center(
@ -133,7 +158,6 @@ class BloodMonthlyPage extends StatelessWidget {
), ),
height: 40), height: 40),
), ),
], ],
), ),
); );
@ -149,7 +173,7 @@ class BloodMonthlyPage extends StatelessWidget {
color: Colors.white, color: Colors.white,
child: Center( child: Center(
child: Texts( child: Texts(
'${projectViewModel.isArabic ? DateUtil.getMonthDayYearDateFormattedAr(diabtec.dateChart):DateUtil.getMonthDayYearDateFormatted(diabtec.dateChart)} ', '${projectViewModel.isArabic ? DateUtil.getMonthDayYearDateFormattedAr(diabtec.dateChart) : DateUtil.getMonthDayYearDateFormatted(diabtec.dateChart)} ',
textAlign: TextAlign.center, textAlign: TextAlign.center,
fontSize: 12, fontSize: 12,
), ),

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart'; import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/chartData/WeekChartDate.dart'; import 'package:diplomaticquarterapp/core/model/my_trakers/chartData/WeekChartDate.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/blood_sugar_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/LineChartCurved.dart'; import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/LineChartCurved.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
@ -16,29 +17,25 @@ import 'package:provider/provider.dart';
class BloodYearPage extends StatelessWidget { class BloodYearPage extends StatelessWidget {
final List<DiabtecPatientResult> diabtecPatientResult; final List<DiabtecPatientResult> diabtecPatientResult;
final List<TimeSeriesSales2> timeSeriesData; final List<TimeSeriesSales2> timeSeriesData;
final BloodSugarViewMode bloodSugarViewMode;
const BloodYearPage({Key key, this.diabtecPatientResult, this.timeSeriesData}) const BloodYearPage({Key key, this.diabtecPatientResult, this.timeSeriesData, this.bloodSugarViewMode}) : super(key: key);
: super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
body: timeSeriesData.isEmpty baseViewModel: bloodSugarViewMode,
? Container( body: ListView(
child: Center(
child: Texts(TranslationBase.of(context).noDataAvailable),
),
)
: ListView(
children: [ children: [
Container( Container(
margin: EdgeInsets.only(top: 12, left: 8, right: 8),
width: double.maxFinite, width: double.maxFinite,
color: Colors.white, color: Colors.white,
child: LineChartCurved( child: LineChartCurved(
title: 'Sugar', title: '${TranslationBase.of(context).bloodSugar}',
timeSeries: timeSeriesData, timeSeries: timeSeriesData.isEmpty?[TimeSeriesSales2(DateTime.now(),0.0)]:timeSeriesData,
indexes: timeSeriesData.length ~/ 5.5, indexes: timeSeriesData.length ~/ 5.5 ?? 0,
)), )),
SizedBox( SizedBox(
height: 12, height: 12,
@ -53,10 +50,15 @@ class BloodYearPage extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Table( timeSeriesData.isEmpty
? Container(
child: Center(
child: Texts(TranslationBase.of(context).noDataAvailable),
),
)
:Table(
border: TableBorder.symmetric( border: TableBorder.symmetric(
inside: inside: BorderSide(width: 2.0, color: Colors.grey[300]),
BorderSide(width: 2.0, color: Colors.grey[300]),
), ),
children: fullData(context, projectViewModel), children: fullData(context, projectViewModel),
), ),
@ -68,8 +70,7 @@ class BloodYearPage extends StatelessWidget {
); );
} }
List<TableRow> fullData( List<TableRow> fullData(BuildContext context, ProjectViewModel projectViewModel) {
BuildContext context, ProjectViewModel projectViewModel) {
List<TableRow> tableRow = []; List<TableRow> tableRow = [];
tableRow.add( tableRow.add(
TableRow( TableRow(
@ -79,12 +80,8 @@ class BloodYearPage extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic topLeft: projectViewModel.isArabic ? Radius.circular(0.0) : Radius.circular(10.0),
? Radius.circular(0.0) topRight: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0.0),
: Radius.circular(10.0),
topRight: projectViewModel.isArabic
? Radius.circular(10.0)
: Radius.circular(0.0),
), ),
), ),
child: Center( child: Center(
@ -130,12 +127,8 @@ class BloodYearPage extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0.0),
? Radius.circular(10.0) topRight: projectViewModel.isArabic ? Radius.circular(0.0) : Radius.circular(10.0),
: Radius.circular(0.0),
topRight: projectViewModel.isArabic
? Radius.circular(0.0)
: Radius.circular(10.0),
), ),
), ),
child: Center( child: Center(

@ -75,7 +75,7 @@ class _BloodSugarHomePageState extends State<BloodSugarHomePage>
),], ),],
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).bloodSugar, appBarTitle: TranslationBase.of(context).bloodSugar,
baseViewModel: model, // baseViewModel: model,
body: Scaffold( body: Scaffold(
extendBodyBehindAppBar: true, extendBodyBehindAppBar: true,
appBar: TabBarWidget(tabController: _tabController,), appBar: TabBarWidget(tabController: _tabController,),
@ -93,11 +93,12 @@ class _BloodSugarHomePageState extends State<BloodSugarHomePage>
), ),
BloodMonthlyPage( BloodMonthlyPage(
timeSeriesData: model.monthTimeSeriesData, timeSeriesData: model.monthTimeSeriesData,
diabtecPatientResult: model.monthDiabtecPatientResult, diabtecPatientResult: model.monthDiabtecPatientResult, bloodSugarViewMode: model,
), ),
BloodYearPage( BloodYearPage(
timeSeriesData: model.yearTimeSeriesData, timeSeriesData: model.yearTimeSeriesData,
diabtecPatientResult: model.yearDiabtecPatientResult, diabtecPatientResult: model.yearDiabtecPatientResult,
bloodSugarViewMode: model,
) )
], ],
), ),

@ -31,42 +31,48 @@ class BloodSugarWeeklyPage extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
body:timeSeriesData.isEmpty?Container(child: Center(child: Texts(TranslationBase.of(context).noDataAvailable),),): ListView( baseViewModel: bloodSugarViewMode,
children: [ body: ListView(
Container( children: [
margin: EdgeInsets.only(top: 12, left: 8, right: 8), Container(
color: Colors.white, margin: EdgeInsets.only(top: 12, left: 8, right: 8),
child: LineChartCurved( color: Colors.white,
title: 'Sugar', child: LineChartCurved(
timeSeries: timeSeriesData, title: '${TranslationBase.of(context).bloodSugar}',
indexes: timeSeriesData.length ~/ 5.5, timeSeries: timeSeriesData.isEmpty?[TimeSeriesSales2(DateTime.now(),0.0)]:timeSeriesData,
), indexes: timeSeriesData.length ~/ 5.5,
),
SizedBox(
height: 12,
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(TranslationBase.of(context).details),
),
Container(
padding: EdgeInsets.all(10),
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(context, projectViewModel, bloodSugarViewMode),
), ),
SizedBox(
height: 12,
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(TranslationBase.of(context).details),
),
Container(
padding: EdgeInsets.all(10),
color: Colors.transparent,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
timeSeriesData.isEmpty
? Container(
child: Center(
child: Texts(TranslationBase.of(context).noDataAvailable),
),
)
:Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 2.0, color: Colors.grey[300]),
),
children: fullData(context, projectViewModel, bloodSugarViewMode),
),
],
),
)
], ],
), ),
)
],
),
); );
} }

@ -158,19 +158,13 @@ class CurvedChartBloodPressure extends StatelessWidget {
), ),
leftTitles: SideTitles( leftTitles: SideTitles(
showTitles: true, showTitles: true,
interval:getMaxY() - getMinY() <=500?50:getMaxY() - getMinY() <=1000?100:200,
getTextStyles: (value) => const TextStyle( getTextStyles: (value) => const TextStyle(
color: Colors.black, color: Colors.black,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 10, fontSize: 10,
), ),
getTitles: (value) {
if (value.toInt() == 0)
return '${value.toInt()}';
else if (value.toInt() % horizontalInterval == 0)
return '${value.toInt()}';
else
return '';
},
margin: 12, margin: 12,
), ),
), ),

@ -10,11 +10,7 @@ class LineChartCurved extends StatelessWidget {
final int indexes; final int indexes;
final double horizontalInterval; final double horizontalInterval;
LineChartCurved( LineChartCurved({this.title, this.timeSeries, this.indexes, this.horizontalInterval = 20.0});
{this.title,
this.timeSeries,
this.indexes,
this.horizontalInterval = 20.0});
List<int> xAxixs = List(); List<int> xAxixs = List();
List<double> yAxixs = List(); List<double> yAxixs = List();
@ -24,7 +20,7 @@ class LineChartCurved extends StatelessWidget {
getXaxix(); getXaxix();
getYaxix(); getYaxix();
return AspectRatio( return AspectRatio(
aspectRatio: 1.1, aspectRatio: 1.0,
child: Container( child: Container(
decoration: const BoxDecoration( decoration: const BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(18)), borderRadius: BorderRadius.all(Radius.circular(18)),
@ -40,8 +36,7 @@ class LineChartCurved extends StatelessWidget {
), ),
Text( Text(
title, title,
style: TextStyle( style: TextStyle(color: Colors.black, fontSize: 15, letterSpacing: 2),
color: Colors.black, fontSize: 15, letterSpacing: 2),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
SizedBox( SizedBox(
@ -49,8 +44,7 @@ class LineChartCurved extends StatelessWidget {
), ),
Expanded( Expanded(
child: Padding( child: Padding(
padding: const EdgeInsets.only( padding: const EdgeInsets.only(right: 18.0, left: 16.0, top: 15, bottom: 15),
right: 18.0, left: 16.0, top: 15, bottom: 15),
child: LineChart( child: LineChart(
sampleData1(context), sampleData1(context),
swapAnimationDuration: const Duration(milliseconds: 250), swapAnimationDuration: const Duration(milliseconds: 250),
@ -86,7 +80,6 @@ class LineChartCurved extends StatelessWidget {
} }
} }
} }
LineChartData sampleData1(context) { LineChartData sampleData1(context) {
return LineChartData( return LineChartData(
lineTouchData: LineTouchData( lineTouchData: LineTouchData(
@ -97,10 +90,7 @@ class LineChartCurved extends StatelessWidget {
handleBuiltInTouches: true, handleBuiltInTouches: true,
), ),
gridData: FlGridData( gridData: FlGridData(
horizontalInterval: horizontalInterval, horizontalInterval: horizontalInterval, show: true, drawVerticalLine: true, drawHorizontalLine: true),
show: true,
drawVerticalLine: true,
drawHorizontalLine: true),
titlesData: FlTitlesData( titlesData: FlTitlesData(
bottomTitles: SideTitles( bottomTitles: SideTitles(
showTitles: true, showTitles: true,
@ -131,19 +121,13 @@ class LineChartCurved extends StatelessWidget {
), ),
leftTitles: SideTitles( leftTitles: SideTitles(
showTitles: true, showTitles: true,
interval:getMaxY() - getMinY() <=500?50:getMaxY() - getMinY() <=1000?100:200,
getTextStyles: (value) => const TextStyle( getTextStyles: (value) => const TextStyle(
color: Colors.black, color: Colors.black,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 10, fontSize: 10,
), ),
getTitles: (value) {
if (value.toInt() == 0)
return '${value.toInt()}';
else if (value.toInt() % horizontalInterval == 0)
return '${value.toInt()}';
else
return '';
},
margin: 12, margin: 12,
), ),
), ),
@ -168,7 +152,7 @@ class LineChartCurved extends StatelessWidget {
minX: 0, minX: 0,
maxX: (timeSeries.length - 1).toDouble(), maxX: (timeSeries.length - 1).toDouble(),
maxY: getMaxY() + 0.3, maxY: getMaxY() + 0.3,
minY: getMinY(), minY: 0,//getMinY(),
lineBarsData: getData(context), lineBarsData: getData(context),
); );
} }
@ -184,7 +168,7 @@ class LineChartCurved extends StatelessWidget {
} }
double getMinY() { double getMinY() {
double min = timeSeries[0].sales; double min = timeSeries.isEmpty ? 0 : timeSeries.first.sales;
timeSeries.forEach((element) { timeSeries.forEach((element) {
double resultValueDouble = element.sales; double resultValueDouble = element.sales;
if (resultValueDouble < min) min = resultValueDouble; if (resultValueDouble < min) min = resultValueDouble;
@ -196,6 +180,9 @@ class LineChartCurved extends StatelessWidget {
List<LineChartBarData> getData(context) { List<LineChartBarData> getData(context) {
List<FlSpot> spots = List(); List<FlSpot> spots = List();
if (timeSeries.length == 0) {
spots.add(FlSpot(0, 0));
}
for (int index = 0; index < timeSeries.length; index++) { for (int index = 0; index < timeSeries.length; index++) {
spots.add(FlSpot(index.toDouble(), timeSeries[index].sales)); spots.add(FlSpot(index.toDouble(), timeSeries[index].sales));
} }

@ -27,7 +27,7 @@ class LineChartCurved extends StatelessWidget {
getYaxix(); getYaxix();
calculateMaxAndMin(); calculateMaxAndMin();
return AspectRatio( return AspectRatio(
aspectRatio: 1.1, aspectRatio: 1.0,
child: Container( child: Container(
decoration: const BoxDecoration( decoration: const BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(18)), borderRadius: BorderRadius.all(Radius.circular(18)),
@ -80,14 +80,6 @@ class LineChartCurved extends StatelessWidget {
} }
getYaxix() { getYaxix() {
// int indexess= (timeSeries.length*0.30).toInt();
// for (int index = 0; index < timeSeries.length; index++) {
// int mIndex = indexess * index;
// if (mIndex < timeSeries.length) {
// yAxixs.add(timeSeries[mIndex].sales);
// }
// }
for (int index = 0; index < timeSeries.length; index++) { for (int index = 0; index < timeSeries.length; index++) {
int mIndex = indexes * index; int mIndex = indexes * index;
if (mIndex < timeSeries.length) { if (mIndex < timeSeries.length) {
@ -142,21 +134,8 @@ class LineChartCurved extends StatelessWidget {
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 10, fontSize: 10,
), ),
getTitles: (value) { interval:getMaxY() - getMinY() <=500?getMaxY() - getMinY() <=50?10:50:getMaxY() - getMinY() <=1000?100:getMaxY() - getMinY()>=10000?5000:200,
if (timeSeries.length < 15) {
return '${value.toInt()}';
} else {
if (value == minY)
return '${value.toInt()}';
if (value == getMaxY())
return '${value.toInt()}';
//if (yAxixs.contains(value)) {
return '${value.toInt()}';
return '';
}
return '${value.toInt()}';
},
margin: 12, margin: 12,
), ),
), ),
@ -181,7 +160,7 @@ class LineChartCurved extends StatelessWidget {
minX: minX, minX: minX,
maxX: maxX, maxX: maxX,
maxY: maxY, maxY: maxY,
minY: minY, minY: 0,
lineBarsData: getData(context), lineBarsData: getData(context),
); );
} }

@ -151,9 +151,8 @@ class LineChartCurvedBloodPressure extends StatelessWidget {
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 10, fontSize: 10,
), ),
getTitles: (value) { interval:getMaxY() - getMinY() <=500?50:getMaxY() - getMinY() <=1000?100:200,
return '${value.toInt()}';
},
margin: 12, margin: 12,
), ),
), ),

@ -9,6 +9,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:geolocator/geolocator.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:screen/screen.dart'; import 'package:screen/screen.dart';
@ -27,10 +28,11 @@ class _GeneralSettings extends State<GeneralSettings>
bool location = false; bool location = false;
var sharedPref = new AppSharedPreferences(); var sharedPref = new AppSharedPreferences();
var permission = new PermissionService(); var permission = new PermissionService();
LocationPermission locationPermission;
var mediaQueryData; var mediaQueryData;
@override @override
void initState() { void initState() {
getValues(); this.getValues();
super.initState(); super.initState();
} }
@ -80,7 +82,6 @@ class _GeneralSettings extends State<GeneralSettings>
setState(() { setState(() {
accsibility = value; accsibility = value;
}); });
//setAccisibility(value);
}, },
activeTrackColor: Colors.lightGreenAccent, activeTrackColor: Colors.lightGreenAccent,
activeColor: Colors.green, activeColor: Colors.green,
@ -199,6 +200,7 @@ class _GeneralSettings extends State<GeneralSettings>
setState(() { setState(() {
camera = value; camera = value;
}); });
this.permission.openSettings();
}, },
activeTrackColor: Colors.lightGreenAccent, activeTrackColor: Colors.lightGreenAccent,
activeColor: Colors.green, activeColor: Colors.green,
@ -215,9 +217,12 @@ class _GeneralSettings extends State<GeneralSettings>
Switch( Switch(
value: location, value: location,
onChanged: (value) { onChanged: (value) {
setState(() { if (value == true) {
location = value; Navigator.pop(context);
}); this.setLocationPermission();
} else {
Geolocator.openLocationSettings();
}
}, },
activeTrackColor: Colors.lightGreenAccent, activeTrackColor: Colors.lightGreenAccent,
activeColor: Colors.green, activeColor: Colors.green,
@ -227,6 +232,23 @@ class _GeneralSettings extends State<GeneralSettings>
])); ]));
} }
setLocationPermission() async {
locationPermission = await Geolocator.checkPermission();
if (locationPermission == LocationPermission.denied) {
locationPermission = await Geolocator.requestPermission();
if (locationPermission != LocationPermission.denied) {
setState(() {
location = true;
});
} else {
this.location = false;
}
} else {
Geolocator.openLocationSettings();
this.location = true;
}
}
setTheme(value) async { setTheme(value) async {
switch (value) { switch (value) {
case 0: case 0:
@ -277,9 +299,15 @@ class _GeneralSettings extends State<GeneralSettings>
vibration = permission.isVibrationEnabled() == null vibration = permission.isVibrationEnabled() == null
? false ? false
: permission.isVibrationEnabled(); : permission.isVibrationEnabled();
accsibility = mediaQueryData.accessibleNavigation; // accsibility = mediaQueryData.accessibleNavigation;
setTheme(blindValue); //setTheme(blindValue);
} }
var camera = await this.permission.isCameraEnabled();
var location = await this.permission.isLocationEnabled();
setState(() {
this.camera = camera;
this.location = location;
});
} }
getTheme(value) async { getTheme(value) async {

@ -321,7 +321,7 @@ class DoctorsListService extends BaseService {
} }
Future<Map> insertAppointment(int docID, int clinicID, int projectID, Future<Map> insertAppointment(int docID, int clinicID, int projectID,
String selectedTime, String selectedDate, BuildContext context) async { String selectedTime, String selectedDate, BuildContext context, [String procedureID]) async {
Map<String, dynamic> request; Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) { if (await this.sharedPref.getObject(USER_PROFILE) != null) {
@ -341,6 +341,7 @@ class DoctorsListService extends BaseService {
"StartTime": selectedTime, "StartTime": selectedTime,
"SelectedTime": selectedTime, "SelectedTime": selectedTime,
"EndTime": selectedTime, "EndTime": selectedTime,
"ProcedureID": procedureID,
"InitialSlotDuration": 0, "InitialSlotDuration": 0,
"StrAppointmentDate": selectedDate, "StrAppointmentDate": selectedDate,
"IsVirtual": false, "IsVirtual": false,
@ -1447,4 +1448,24 @@ class DoctorsListService extends BaseService {
}, body: request); }, body: request);
return Future.value(localRes); return Future.value(localRes);
} }
Future<Map> sendCheckinNfcRequest(
int appointmentNo, String nfcCode,int projectId, BuildContext context) async {
Map<String, dynamic> request;
Request req = appGlobal.getPublicRequest();
request = {
"AppointmentNo":appointmentNo,
"NFC_Code": nfcCode,
"ProjectID": projectId,
};
dynamic localRes;
await baseAppClient.post(SEND_CHECK_IN_NFC_REQUEST,
onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
} }

@ -117,8 +117,8 @@ class AuthProvider with ChangeNotifier {
var imei = await sharedPref.getString(PUSH_TOKEN); var imei = await sharedPref.getString(PUSH_TOKEN);
// if (!request.) { // if (!request.) {
newRequest.iMEI = imei; //imei!=null ? imei : ''; newRequest.iMEI = imei; //imei!=null ? imei : '';
newRequest.firstName = request.firstName + " " + request.lastName; newRequest.firstName = request.firstName??"" + " " + request.lastName??"";
newRequest.firstNameN = request.firstNameN + " " + request.lastNameN; newRequest.firstNameN = request.firstNameN??"" + " " + request.lastNameN??"";
newRequest.lastNameN = request.lastNameN ?? ""; newRequest.lastNameN = request.lastNameN ?? "";
newRequest.outSA = request.outSA == 1 ? true : false; newRequest.outSA = request.outSA == 1 ? true : false;
newRequest.biometricEnabled = false; newRequest.biometricEnabled = false;

@ -35,8 +35,7 @@ class ClinicListService extends BaseService {
dynamic localRes; dynamic localRes;
await baseAppClient.post(GET_CLINICS_LIST_URL, await baseAppClient.post(GET_CLINICS_LIST_URL, onSuccess: (response, statusCode) async {
onSuccess: (response, statusCode) async {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error; throw error;
@ -54,7 +53,7 @@ class ClinicListService extends BaseService {
"VersionID": req.VersionID, "VersionID": req.VersionID,
"Channel": req.Channel, "Channel": req.Channel,
"generalid": 'Cs2020@2016\$2958', "generalid": 'Cs2020@2016\$2958',
"PatientOutSA": 0, "PatientOutSA": user.outSA,
"TokenID": "", "TokenID": "",
"IsActiveAppointment": true, "IsActiveAppointment": true,
"DeviceTypeID": req.DeviceTypeID, "DeviceTypeID": req.DeviceTypeID,
@ -65,12 +64,11 @@ class ClinicListService extends BaseService {
dynamic localRes; dynamic localRes;
await baseAppClient.post(GET_ACTIVE_APPOINTMENTS_LIST_URL, await baseAppClient.post(GET_ACTIVE_APPOINTMENTS_LIST_URL, onSuccess: (response, statusCode) async {
onSuccess: (response, statusCode) async { localRes = response;
localRes = response; }, onFailure: (String error, int statusCode) {
}, onFailure: (String error, int statusCode) { throw error;
throw error; }, body: request);
}, body: request);
return Future.value(localRes); return Future.value(localRes);
} }
@ -92,8 +90,7 @@ class ClinicListService extends BaseService {
dynamic localRes; dynamic localRes;
await baseAppClient.post(GET_PROJECTS_LIST, await baseAppClient.post(GET_PROJECTS_LIST, onSuccess: (response, statusCode) async {
onSuccess: (response, statusCode) async {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error; throw error;
@ -101,15 +98,12 @@ class ClinicListService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
Future<Map> getChiefComplaintsList( Future<Map> getChiefComplaintsList(int clinicID, int projectID, BuildContext context, {doctorId}) async {
int clinicID, int projectID, BuildContext context,
{doctorId}) async {
//Utils.showProgressDialog(context); //Utils.showProgressDialog(context);
Map<String, dynamic> request; Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) { if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson( var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
await this.sharedPref.getObject(USER_PROFILE));
authUser = data; authUser = data;
} }
@ -137,8 +131,7 @@ class ClinicListService extends BaseService {
dynamic localRes; dynamic localRes;
await baseAppClient.post(GET_DOCTORS_LIST_URL, await baseAppClient.post(GET_DOCTORS_LIST_URL, onSuccess: (response, statusCode) async {
onSuccess: (response, statusCode) async {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error; throw error;
@ -146,19 +139,15 @@ class ClinicListService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
Future<Map> getChiefComplaintDoctorList( Future<Map> getChiefComplaintDoctorList(int chiefComplaintID, int projectID, BuildContext context, {doctorId}) async {
int chiefComplaintID, int projectID, BuildContext context,
{doctorId}) async {
Map<String, dynamic> request; Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) { if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson( var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
await this.sharedPref.getObject(USER_PROFILE));
authUser = data; authUser = data;
} }
if (await this.sharedPref.getDouble(USER_LAT) != null && if (await this.sharedPref.getDouble(USER_LAT) != null && await this.sharedPref.getDouble(USER_LONG) != null) {
await this.sharedPref.getDouble(USER_LONG) != null) {
lat = await this.sharedPref.getDouble(USER_LAT); lat = await this.sharedPref.getDouble(USER_LAT);
long = await this.sharedPref.getDouble(USER_LONG); long = await this.sharedPref.getDouble(USER_LONG);
} }
@ -179,13 +168,12 @@ class ClinicListService extends BaseService {
"Latitude": lat.toString(), "Latitude": lat.toString(),
"Longitude": long.toString(), "Longitude": long.toString(),
"DeviceTypeID": req.DeviceTypeID, "DeviceTypeID": req.DeviceTypeID,
"IsPublicRequest" : true "IsPublicRequest": true
}; };
dynamic localRes; dynamic localRes;
await baseAppClient.post(GET_DENTAL_DOCTORS_LIST_URL, await baseAppClient.post(GET_DENTAL_DOCTORS_LIST_URL, onSuccess: (response, statusCode) async {
onSuccess: (response, statusCode) async {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error; throw error;

@ -50,7 +50,43 @@ class CovidDriveThruService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
Future<Map> getCovidPaymentInformation(BuildContext context, int projectID) async { Future<Map> getCovidTestProceduresList(BuildContext context) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(
await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20",
"VersionID": req.VersionID,
"Channel": req.Channel,
"generalid": 'Cs2020@2016\$2958',
"PatientOutSA": authUser.outSA,
"TokenID": "",
"DeviceTypeID": req.DeviceTypeID,
"SessionID": "YckwoXhUmWBsnHKEKig",
"PatientID": authUser.patientID != null ? authUser.patientID : 0,
"License": true
};
dynamic localRes;
await baseAppClient.post(GET_COVID_DRIVETHRU_PROCEDURES_LIST,
onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
Future<Map> getCovidPaymentInformation(BuildContext context, int projectID, String procedureID) async {
Map<String, dynamic> request; Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) { if (await this.sharedPref.getObject(USER_PROFILE) != null) {
@ -65,6 +101,7 @@ class CovidDriveThruService extends BaseService {
"LanguageID": languageID == 'ar' ? 1 : 2, "LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20", "IPAdress": "10.20.10.20",
"ProjectID": projectID, "ProjectID": projectID,
"ProcedureId": procedureID,
"VersionID": req.VersionID, "VersionID": req.VersionID,
"Channel": req.Channel, "Channel": req.Channel,
"generalid": 'Cs2020@2016\$2958', "generalid": 'Cs2020@2016\$2958',

@ -259,7 +259,7 @@ class FamilyFilesProvider with ChangeNotifier {
var currentUser = var currentUser =
AuthenticatedUser.fromJson(await sharedPref.getObject(MAIN_USER)); AuthenticatedUser.fromJson(await sharedPref.getObject(MAIN_USER));
//const request = new SwitchUserRequest(); //const request = new SwitchUserRequest();
request['LogInTokenID'] = ''; // request['LogInTokenID'] = '';
request['PatientOutSA'] = currentUser.outSA; //? 1 : 0; request['PatientOutSA'] = currentUser.outSA; //? 1 : 0;
request['PatientMobileNumber'] = request['PatientMobileNumber'] =
currentUser.mobileNumber; //['MobileNumber']; currentUser.mobileNumber; //['MobileNumber'];
@ -276,7 +276,7 @@ class FamilyFilesProvider with ChangeNotifier {
AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE)); AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
//const request = new SwitchUserRequest(); //const request = new SwitchUserRequest();
request['LogInTokenID'] = ''; // request['LogInTokenID'] = '';
request['PatientOutSA'] = currentUser.outSA; //? 1 : 0; request['PatientOutSA'] = currentUser.outSA; //? 1 : 0;
request['PatientMobileNumber'] = request['PatientMobileNumber'] =
switchUser.mobileNumber; //['MobileNumber']; switchUser.mobileNumber; //['MobileNumber'];

@ -4,7 +4,8 @@ import 'package:intl/intl.dart';
class DateUtil { class DateUtil {
/// convert String To Date function /// convert String To Date function
/// [date] String we want to convert /// [date] String we want to convert
static DateTime convertStringToDate(String date) { // /Date(1585774800000+0300)/ static DateTime convertStringToDate(String date) {
// /Date(1585774800000+0300)/
if (date != null) { if (date != null) {
const start = "/Date("; const start = "/Date(";
const end = "+0300)"; const end = "+0300)";
@ -241,6 +242,25 @@ class DateUtil {
} }
} }
static getWeekDayEnglish(int weekDay) {
switch (weekDay) {
case 1:
return "Monday";
case 2:
return "Tuesday";
case 3:
return "Wednesday";
case 4:
return "Thursday";
case 5:
return "Friday";
case 6:
return "Saturday ";
case 7:
return "Sunday";
}
}
/// get data formatted like Apr 26,2020 /// get data formatted like Apr 26,2020
/// [dateTime] convert DateTime to data formatted /// [dateTime] convert DateTime to data formatted
static String getMonthDayYearDateFormatted(DateTime dateTime) { static String getMonthDayYearDateFormatted(DateTime dateTime) {
@ -253,6 +273,7 @@ class DateUtil {
else else
return ""; return "";
} }
/// get data formatted like Apr 26,2020 /// get data formatted like Apr 26,2020
/// [dateTime] convert DateTime to data formatted Arabic /// [dateTime] convert DateTime to data formatted Arabic
static String getMonthDayYearDateFormattedAr(DateTime dateTime) { static String getMonthDayYearDateFormattedAr(DateTime dateTime) {
@ -270,9 +291,12 @@ class DateUtil {
/// [dateTime] convert DateTime to date formatted /// [dateTime] convert DateTime to date formatted
static String getWeekDayMonthDayYearDateFormatted( static String getWeekDayMonthDayYearDateFormatted(
DateTime dateTime, String lang) { DateTime dateTime, String lang) {
// print(dateTime);
// print(dateTime.weekday);
// print(dateTime.weekday.getDayOfWeekEnumValue.value);
if (dateTime != null) if (dateTime != null)
return lang == 'en' return lang == 'en'
? getDay(dateTime.weekday.getDayOfWeekEnumValue) + ? getWeekDayEnglish(dateTime.weekday) +
", " + ", " +
getMonth(dateTime.month) + getMonth(dateTime.month) +
" " + " " +
@ -377,9 +401,8 @@ class DateUtil {
return ""; return "";
} }
static String getFormattedDate(DateTime dateTime, String formattedString){ static String getFormattedDate(DateTime dateTime, String formattedString) {
return DateFormat(formattedString) return DateFormat(formattedString).format(dateTime);
.format(dateTime);
} }
static convertISODateToJsonDate(String isoDate) { static convertISODateToJsonDate(String isoDate) {

@ -21,7 +21,8 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
class BottomNavBar extends StatefulWidget { class BottomNavBar extends StatefulWidget {
final ValueChanged<int> changeIndex; final ValueChanged<int> changeIndex;
final int index; final int index;
BottomNavBar({Key key, this.changeIndex, this.index}) : super(key: key); final bool showHomeIcon;
BottomNavBar({Key key, this.changeIndex, this.index, this.showHomeIcon = false}) : super(key: key);
@override @override
_BottomNavBarState createState() => _BottomNavBarState(); _BottomNavBarState createState() => _BottomNavBarState();
@ -33,7 +34,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
var event = RobotProvider(); var event = RobotProvider();
_changeIndex(int index) async { _changeIndex(int index) async {
widget.changeIndex(index); widget.changeIndex(index);
if (_index == 0) { if (index == 0) {
event.setValue({'isRobotVisible': 'true'}); event.setValue({'isRobotVisible': 'true'});
} }
} }
@ -72,27 +73,46 @@ class _BottomNavBarState extends State<BottomNavBar> {
), ),
if (widget.index == 0) if (widget.index == 0)
Expanded( Expanded(
child: SizedBox( child: (widget.showHomeIcon)
height: 50, ? SizedBox(
child: Column( child: BottomNavigationItem(
mainAxisSize: MainAxisSize.min, icon: Icons.home_outlined,
mainAxisAlignment: MainAxisAlignment.center, activeIcon: Icons.home_outlined,
children: <Widget>[ changeIndex: _changeIndex,
SizedBox(height: 22), index: widget.index,
], currentIndex: 2,
), name: TranslationBase.of(context).home,
), ),
)
: SizedBox(
height: 50,
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
SizedBox(height: 22),
],
),
),
), ),
if (widget.index != 0 && projectViewModel.havePrivilege(34)) if (widget.index != 0 && projectViewModel.havePrivilege(34))
BottomNavigationItem( BottomNavigationItem(
icon: EvaIcons.calendar, icon: Icons.home_outlined,
activeIcon: EvaIcons.calendar, activeIcon: Icons.home_outlined,
changeIndex: _changeIndex, changeIndex: _changeIndex,
index: _index, index: widget.index,
currentIndex: 2, currentIndex: 0,
name: TranslationBase.of(context).bookAppo, name: TranslationBase.of(context).home,
), ),
if (widget.index == 0 && projectViewModel.havePrivilege(34)) // BottomNavigationItem(
// icon: EvaIcons.calendar,
// activeIcon: EvaIcons.calendar,
// changeIndex: _changeIndex,
// index: _index,
// currentIndex: 2,
// name: TranslationBase.of(context).bookAppo,
// ),
if (/*widget.index == 0 && */projectViewModel.havePrivilege(34))
BottomNavigationItem( BottomNavigationItem(
icon: EvaIcons.calendar, icon: EvaIcons.calendar,
activeIcon: EvaIcons.calendar, activeIcon: EvaIcons.calendar,

@ -4,10 +4,12 @@ import 'package:charts_flutter/flutter.dart' as charts;
class AppBarChart extends StatelessWidget { class AppBarChart extends StatelessWidget {
const AppBarChart({ const AppBarChart({
Key key, Key key,
@required this.isArabic,
@required this.seriesList, @required this.seriesList,
}) : super(key: key); }) : super(key: key);
final List<charts.Series> seriesList; final List<charts.Series> seriesList;
final bool isArabic;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -19,7 +21,7 @@ class AppBarChart extends StatelessWidget {
// animate: animate, // animate: animate,
domainAxis: charts.OrdinalAxisSpec( domainAxis: charts.OrdinalAxisSpec(
renderSpec: charts.GridlineRendererSpec( renderSpec: charts.GridlineRendererSpec(
labelAnchor: charts.TickLabelAnchor.after, labelAnchor: isArabic ? charts.TickLabelAnchor.before : charts.TickLabelAnchor.after,
labelRotation: -30, labelRotation: -30,
labelOffsetFromAxisPx: 30, labelOffsetFromAxisPx: 30,
labelOffsetFromTickPx: 15, labelOffsetFromTickPx: 15,

@ -103,7 +103,7 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
color: Colors.white, color: Colors.white,
), ),
Texts( Texts(
TranslationBase.of(context).sendCopy, TranslationBase.of(context).sendEmail,
color: Colors.white, color: Colors.white,
) )
], ],

@ -309,7 +309,7 @@ class _AppDrawerState extends State<AppDrawer> {
padding: EdgeInsets.only(left: 5, right: 5), padding: EdgeInsets.only(left: 5, right: 5),
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[ child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
AppText(result.patientName, color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black), AppText(result.patientName, color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black),
AppText(TranslationBase.of(context).fileno + ": " + result.patientID.toString(), color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black), AppText(TranslationBase.of(context).fileno + ": " + result.responseID.toString(), color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black),
]))), ]))),
], ],
))) )))
@ -564,6 +564,7 @@ class _AppDrawerState extends State<AppDrawer> {
if (mainUser["PatientID"] != result.list.patientID) { if (mainUser["PatientID"] != result.list.patientID) {
result.list.isFamily = true; result.list.isFamily = true;
} }
// result.list.cRSVerificationStatus = result['CRSVerificationStatus'];
this.sharedPref.setString(APP_LANGUAGE, currentLang); this.sharedPref.setString(APP_LANGUAGE, currentLang);
this.sharedPref.setObject(MAIN_USER, mainUser); this.sharedPref.setObject(MAIN_USER, mainUser);

@ -21,17 +21,17 @@ var _InAppBrowserOptions = InAppBrowserClassOptions(
class MyInAppBrowser extends InAppBrowser { class MyInAppBrowser extends InAppBrowser {
_PAYMENT_TYPE paymentType; _PAYMENT_TYPE paymentType;
// static String SERVICE_URL =
// 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
static String SERVICE_URL = static String SERVICE_URL =
'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
// static String PREAUTH_SERVICE_URL = // static String SERVICE_URL =
// 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT // 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
static String PREAUTH_SERVICE_URL = static String PREAUTH_SERVICE_URL =
'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT
// static String PREAUTH_SERVICE_URL =
// 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store
// static String PRESCRIPTION_PAYMENT_WITH_ORDERID = // static String PRESCRIPTION_PAYMENT_WITH_ORDERID =
// 'https://uat.hmgwebservices.com/epharmacy/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID='; // 'https://uat.hmgwebservices.com/epharmacy/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID=';

@ -129,6 +129,7 @@ class AppScaffold extends StatelessWidget {
) )
: buildBodyWidget(context), : buildBodyWidget(context),
), ),
floatingActionButton: floatingActionButton,
); );
} }
@ -271,6 +272,15 @@ class _RobotIcon extends State<RobotIcon> {
}); });
} }
} }
if (p['isRobotVisible'] == 'false') {
if (this.mounted) {
setState(() {
if (IS_VOICE_COMMAND_CLOSED == true) {
this.isAnimation = false;
}
});
}
}
}); });
super.initState(); super.initState();

@ -206,6 +206,7 @@ class _FloatingSearchButton extends State<FloatingSearchButton> with TickerProvi
if (this.mounted) { if (this.mounted) {
controller.reverse(); controller.reverse();
IS_VOICE_COMMAND_CLOSED = true; IS_VOICE_COMMAND_CLOSED = true;
event.setValue({'isRobotVisible': 'false'});
} }
}); });
}, },

Loading…
Cancel
Save