jira bugs

merge-requests/318/head
hussam al-habibeh 3 years ago
parent 81ce399e85
commit 854352d9ce

@ -13,8 +13,8 @@ const PACKAGES_CUSTOMER = '/api/customers';
const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items';
const PACKAGES_ORDERS = '/api/orders';
const BASE_URL = 'https://uat.hmgwebservices.com/';
//const BASE_URL = 'https://hmgwebservices.com/';
// const BASE_URL = 'https://uat.hmgwebservices.com/';
const BASE_URL = 'https://hmgwebservices.com/';
// Pharmacy UAT URLs
const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
@ -33,8 +33,7 @@ const GET_GEO_ZONES = 'Services/Patients.svc/REST/GeoF_GetAllPoints';
const LOG_GEO_ZONES = 'Services/Patients.svc/REST/GeoF_InsertPatientFileInfo';
// Delivery Driver
const DRIVER_LOCATION =
'Services/Patients.svc/REST/PatientER_GetDriverLocation';
const DRIVER_LOCATION = 'Services/Patients.svc/REST/PatientER_GetDriverLocation';
//weather
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';
// Wifi Credentials
const WIFI_CREDENTIALS =
"Services/Patients.svc/Hmg_SMS_Get_By_ProjectID_And_PatientID";
const WIFI_CREDENTIALS = "Services/Patients.svc/Hmg_SMS_Get_By_ProjectID_And_PatientID";
///Doctor
const GET_MY_DOCTOR =
'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
const GET_MY_DOCTOR = 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
const GET_DOCTOR_PROFILE = 'Services/Doctors.svc/REST/GetDocProfiles';
const GET_DOCTOR_RATING_NOTES =
'Services/Doctors.svc/REST/dr_GetNotesDoctorRating';
const GET_DOCTOR_RATING_DETAILS =
'Services/Doctors.svc/REST/dr_GetDoctorRatingDetails';
const GET_DOCTOR_RATING_NOTES = 'Services/Doctors.svc/REST/dr_GetNotesDoctorRating';
const GET_DOCTOR_RATING_DETAILS = 'Services/Doctors.svc/REST/dr_GetDoctorRatingDetails';
const GET_DOCTOR_RATING = 'Services/Doctors.svc/REST/dr_GetAvgDoctorRating';
///Prescriptions
const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList';
const GET_PRESCRIPTIONS_ALL_ORDERS =
'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const GET_PRESCRIPTION_REPORT =
'Services/Patients.svc/REST/INP_GetPrescriptionReport';
const SEND_PRESCRIPTION_EMAIL =
'Services/Notifications.svc/REST/SendPrescriptionEmail';
const GET_PRESCRIPTION_REPORT_ENH =
'Services/Patients.svc/REST/GetPrescriptionReport_enh';
const GET_PRESCRIPTIONS_ALL_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const GET_PRESCRIPTION_REPORT = 'Services/Patients.svc/REST/INP_GetPrescriptionReport';
const SEND_PRESCRIPTION_EMAIL = 'Services/Notifications.svc/REST/SendPrescriptionEmail';
const GET_PRESCRIPTION_REPORT_ENH = 'Services/Patients.svc/REST/GetPrescriptionReport_enh';
///Lab Order
const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders';
const GET_Patient_LAB_SPECIAL_RESULT =
'Services/Patients.svc/REST/GetPatientLabSpecialResults';
const SEND_LAB_RESULT_EMAIL =
'Services/Notifications.svc/REST/SendLabReportEmail';
const GET_Patient_LAB_RESULT =
'Services/Patients.svc/REST/GetPatientLabResults';
const GET_Patient_LAB_ORDERS_RESULT =
'Services/Patients.svc/REST/GetPatientLabOrdersResults';
const GET_Patient_LAB_SPECIAL_RESULT = 'Services/Patients.svc/REST/GetPatientLabSpecialResults';
const SEND_LAB_RESULT_EMAIL = 'Services/Notifications.svc/REST/SendLabReportEmail';
const GET_Patient_LAB_RESULT = 'Services/Patients.svc/REST/GetPatientLabResults';
const GET_Patient_LAB_ORDERS_RESULT = 'Services/Patients.svc/REST/GetPatientLabOrdersResults';
///
const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders';
const GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT =
'Services/Patients.svc/REST/GetPatientLabResultsByAppointmentNo';
const GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT = 'Services/Patients.svc/REST/GetPatientLabResultsByAppointmentNo';
const GET_PATIENT_ORDERS_DETAILS =
'Services/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead';
const GET_PATIENT_ORDERS_DETAILS = 'Services/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead';
const GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL';
const SEND_RAD_REPORT_EMAIL =
'Services/Notifications.svc/REST/SendRadReportEmail';
const SEND_RAD_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendRadReportEmail';
///Feedback
const SEND_FEEDBACK = 'Services/COCWS.svc/REST/InsertCOCItemInSPList';
@ -95,32 +79,23 @@ const GET_PATIENT_AppointmentHistory = 'Services'
'/Doctors.svc/REST/PateintHasAppoimentHistory';
///VITAL SIGN
const GET_PATIENT_VITAL_SIGN =
'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign';
const GET_PATIENT_VITAL_SIGN = 'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign';
///Er Nearest
const GET_NEAREST_HOSPITAL =
'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime';
const GET_NEAREST_HOSPITAL = 'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime';
///ED Online
const ER_GET_VISUAL_TRIAGE_QUESTIONS =
"services/Doctors.svc/REST/ER_GetVisualTriageQuestions";
const ER_SAVE_TRIAGE_INFORMATION =
"services/Doctors.svc/REST/ER_SaveTriageInformation";
const ER_GET_VISUAL_TRIAGE_QUESTIONS = "services/Doctors.svc/REST/ER_GetVisualTriageQuestions";
const ER_SAVE_TRIAGE_INFORMATION = "services/Doctors.svc/REST/ER_SaveTriageInformation";
const ER_GetPatientPaymentInformationForERClinic =
"services/Doctors.svc/REST/ER_GetPatientPaymentInformationForERClinic";
///Er Nearest
const GET_AMBULANCE_REQUEST =
'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod';
const GET_PATIENT_ALL_PRES_ORDERS =
'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID =
'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID';
const UPDATE_PRESS_ORDER =
'Services/Patients.svc/REST/PatientER_UpdatePresOrder';
const INSERT_ER_INERT_PRES_ORDER =
'Services/Patients.svc/REST/PatientER_InsertPresOrder';
const GET_AMBULANCE_REQUEST = 'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod';
const GET_PATIENT_ALL_PRES_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID = 'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID';
const UPDATE_PRESS_ORDER = 'Services/Patients.svc/REST/PatientER_UpdatePresOrder';
const INSERT_ER_INERT_PRES_ORDER = 'Services/Patients.svc/REST/PatientER_InsertPresOrder';
///FindUs
const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations';
@ -129,15 +104,13 @@ const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations';
const GET_LIVECHAT_REQUEST = 'Services/Patients.svc/REST/GetPatientICProjects';
///babyInformation
const GET_BABYINFORMATION_REQUEST =
'Services/Community.svc/REST/GetBabyByUserID';
const GET_BABYINFORMATION_REQUEST = 'Services/Community.svc/REST/GetBabyByUserID';
///Get Baby By User ID
const GET_BABY_BY_USER_ID = 'Services/Community.svc/REST/GetBabyByUserID';
///userInformation
const GET_USERINFORMATION_REQUEST =
'Services/Community.svc/REST/GetUserInformation_New';
const GET_USERINFORMATION_REQUEST = 'Services/Community.svc/REST/GetUserInformation_New';
///Update email
const UPDATE_PATENT_EMAIL = 'Services/Patients.svc/REST/UpdatePateintEmail';
@ -159,29 +132,21 @@ const GET_TABLE_REQUEST = 'Services/Community.svc/REST/CreateVaccinationTable';
const GET_CITIES_REQUEST = 'Services/Lists.svc/REST/GetAllCities';
///BloodDetails
const GET_BLOOD_REQUEST =
'services/PatientVarification.svc/REST/BloodDonation_GetBloodGroupDetails';
const GET_BLOOD_REQUEST = 'services/PatientVarification.svc/REST/BloodDonation_GetBloodGroupDetails';
const SAVE_BLOOD_REQUEST =
'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType';
const SAVE_BLOOD_REQUEST = 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType';
const GET_BLOOD_AGREEMENT =
'Services/PatientVarification.svc/REST/CheckUserAgreementForBloodDonation';
const SAVE_BLOOD_AGREEMENT =
'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation';
const GET_BLOOD_AGREEMENT = 'Services/PatientVarification.svc/REST/CheckUserAgreementForBloodDonation';
const SAVE_BLOOD_AGREEMENT = 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation';
///Reports
const REPORTS = 'Services/Doctors.svc/REST/GetPatientMedicalReportStatusInfo';
const INSERT_REQUEST_FOR_MEDICAL_REPORT =
'Services/Doctors.svc/REST/InsertRequestForMedicalReport';
const SEND_MEDICAL_REPORT_EMAIL =
'Services/Notifications.svc/REST/SendMedicalReportEmail';
const INSERT_REQUEST_FOR_MEDICAL_REPORT = 'Services/Doctors.svc/REST/InsertRequestForMedicalReport';
const SEND_MEDICAL_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendMedicalReportEmail';
///Rate
const IS_LAST_APPOITMENT_RATED =
'Services/Doctors.svc/REST/IsLastAppoitmentRated';
const GET_APPOINTMENT_DETAILS_BY_NO =
'Services/MobileNotifications.svc/REST/GetAppointmentDetailsByApptNo';
const IS_LAST_APPOITMENT_RATED = 'Services/Doctors.svc/REST/IsLastAppoitmentRated';
const GET_APPOINTMENT_DETAILS_BY_NO = 'Services/MobileNotifications.svc/REST/GetAppointmentDetailsByApptNo';
const GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID';
@ -193,8 +158,7 @@ const GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID';
const GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized";
//URL to get active appointment list
const GET_ACTIVE_APPOINTMENTS_LIST_URL =
"Services/Doctors.svc/Rest/Dr_GetAppointmentActiveNumber";
const GET_ACTIVE_APPOINTMENTS_LIST_URL = "Services/Doctors.svc/Rest/Dr_GetAppointmentActiveNumber";
//URL to get projects list
const GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject';
@ -203,115 +167,85 @@ const GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject';
const GET_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/SearchDoctorsByTime";
//URL to dental doctors list
const GET_DENTAL_DOCTORS_LIST_URL =
"Services/Doctors.svc/REST/Dental_DoctorChiefComplaintMapping";
const GET_DENTAL_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/Dental_DoctorChiefComplaintMapping";
//URL to get doctor free slots
const GET_DOCTOR_FREE_SLOTS = "Services/Doctors.svc/REST/GetDoctorFreeSlots";
//URL to insert appointment
const INSERT_SPECIFIC_APPOINTMENT =
"Services/Doctors.svc/REST/InsertSpecificAppointment";
const INSERT_SPECIFIC_APPOINTMENT = "Services/Doctors.svc/REST/InsertSpecificAppointment";
//URL to get patient share
const GET_PATIENT_SHARE =
"Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNO";
const GET_PATIENT_SHARE = "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNO";
//URL to get patient appointment history
const GET_PATIENT_APPOINTMENT_HISTORY =
"Services/Doctors.svc/REST/PateintHasAppoimentHistory";
const GET_PATIENT_APPOINTMENT_HISTORY = "Services/Doctors.svc/REST/PateintHasAppoimentHistory";
const SEND_REPORT_EYE_EMAIL =
"Services/Notifications.svc/REST/SendGlassesPrescriptionEmail";
const SEND_REPORT_EYE_EMAIL = "Services/Notifications.svc/REST/SendGlassesPrescriptionEmail";
const SEND_CONTACT_LENS_PRESCRIPTION_EMAIL =
"Services/Notifications.svc/REST/SendContactLensPrescriptionEmail";
const SEND_CONTACT_LENS_PRESCRIPTION_EMAIL = "Services/Notifications.svc/REST/SendContactLensPrescriptionEmail";
//URL to get patient appointment curfew history
const GET_PATIENT_APPOINTMENT_CURFEW_HISTORY =
"Services/Doctors.svc/REST/AppoimentHistoryForCurfew";
const GET_PATIENT_APPOINTMENT_CURFEW_HISTORY = "Services/Doctors.svc/REST/AppoimentHistoryForCurfew";
//URL to confirm appointment
const CONFIRM_APPOINTMENT =
"Services/MobileNotifications.svc/REST/ConfirmAppointment";
const CONFIRM_APPOINTMENT = "Services/MobileNotifications.svc/REST/ConfirmAppointment";
const INSERT_VIDA_REQUEST =
"Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart";
const INSERT_VIDA_REQUEST = "Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart";
//URL to cancel appointment
const CANCEL_APPOINTMENT = "Services/Doctors.svc/REST/CancelAppointment";
//URL get appointment QR
const GENERATE_QR_APPOINTMENT =
"Services/Doctors.svc/REST/GenerateQRAppointmentNo";
const GENERATE_QR_APPOINTMENT = "Services/Doctors.svc/REST/GenerateQRAppointmentNo";
//URL send email appointment QR
const EMAIL_QR_APPOINTMENT =
"Services/Notifications.svc/REST/sendEmailForOnLineCheckin";
const EMAIL_QR_APPOINTMENT = "Services/Notifications.svc/REST/sendEmailForOnLineCheckin";
//URL check payment status
const CHECK_PAYMENT_STATUS =
"Services/PayFort_Serv.svc/REST/GetRequestStatusByRequestID";
const CHECK_PAYMENT_STATUS = "Services/PayFort_Serv.svc/REST/GetRequestStatusByRequestID";
//URL create advance payment
const CREATE_ADVANCE_PAYMENT = "Services/Doctors.svc/REST/CreateAdvancePayment";
const HIS_CREATE_ADVANCE_PAYMENT =
"Services/Patients.svc/REST/HIS_CreateAdvancePayment";
const HIS_CREATE_ADVANCE_PAYMENT = "Services/Patients.svc/REST/HIS_CreateAdvancePayment";
const ADD_ADVANCE_NUMBER_REQUEST =
'Services/PayFort_Serv.svc/REST/AddAdvancedNumberRequest';
const ADD_ADVANCE_NUMBER_REQUEST = 'Services/PayFort_Serv.svc/REST/AddAdvancedNumberRequest';
const IS_ALLOW_ASK_DOCTOR =
'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
const GET_CALL_REQUEST_TYPE =
'Services/Doctors.svc/REST/GetCallRequestType_LOV';
const ADD_VIDA_REQUEST =
'Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart';
const IS_ALLOW_ASK_DOCTOR = 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
const GET_CALL_REQUEST_TYPE = '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 GET_LIVECARE_CLINICS =
'Services/ER_VirtualCall.svc/REST/PatientER_GetClinics';
const GET_LIVECARE_CLINICS = 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinics';
const GET_LIVECARE_SCHEDULE_CLINICS =
'Services/Doctors.svc/REST/PatientER_GetClinicsHaveSchedule';
const GET_LIVECARE_SCHEDULE_CLINICS = 'Services/Doctors.svc/REST/PatientER_GetClinicsHaveSchedule';
const GET_LIVECARE_SCHEDULE_CLINIC_DOCTOR_LIST =
'Services/Doctors.svc/REST/PatientER_GetDoctorByClinicID';
const GET_LIVECARE_SCHEDULE_CLINIC_DOCTOR_LIST = 'Services/Doctors.svc/REST/PatientER_GetDoctorByClinicID';
const GET_LIVECARE_SCHEDULE_DOCTOR_TIME_SLOTS =
'Services/Doctors.svc/REST/PatientER_GetDoctorFreeSlots';
const GET_LIVECARE_SCHEDULE_DOCTOR_TIME_SLOTS = 'Services/Doctors.svc/REST/PatientER_GetDoctorFreeSlots';
const INSERT_LIVECARE_SCHEDULE_APPOINTMENT =
'Services/Doctors.svc/REST/InsertSpecificAppoitmentForSchedule';
const INSERT_LIVECARE_SCHEDULE_APPOINTMENT = 'Services/Doctors.svc/REST/InsertSpecificAppoitmentForSchedule';
const GET_PATIENT_SHARE_LIVECARE =
"Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNOForLiveCare";
const GET_LIVECARE_CLINIC_TIMING =
'Services/ER_VirtualCall.svc/REST/PatientER_GetClinicsServiceTimingsSchedule';
const GET_LIVECARE_CLINIC_TIMING = 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinicsServiceTimingsSchedule';
const GET_ER_APPOINTMENT_FEES =
'Services/DoctorApplication.svc/REST/GetERAppointmentFees';
const GET_ER_APPOINTMENT_FEES = 'Services/DoctorApplication.svc/REST/GetERAppointmentFees';
const GET_ER_APPOINTMENT_TIME = 'Services/ER_VirtualCall.svc/REST/GetRestTime';
const ADD_NEW_CALL_FOR_PATIENT_ER =
'Services/DoctorApplication.svc/REST/NewCallForPatientER';
const ADD_NEW_CALL_FOR_PATIENT_ER = 'Services/DoctorApplication.svc/REST/NewCallForPatientER';
const GET_LIVECARE_HISTORY =
'Services/ER_VirtualCall.svc/REST/GetPatientErVirtualHistory';
const CANCEL_LIVECARE_REQUEST =
'Services/ER_VirtualCall.svc/REST/DeleteErRequest';
const SEND_LIVECARE_INVOICE_EMAIL =
'Services/Notifications.svc/REST/SendInvoiceForLiveCare';
const GET_LIVECARE_HISTORY = 'Services/ER_VirtualCall.svc/REST/GetPatientErVirtualHistory';
const CANCEL_LIVECARE_REQUEST = '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 UPDATE_HEALTH_TERMS =
'services/Patients.svc/REST/UpdatePateintHealthSummaryReport';
const UPDATE_HEALTH_TERMS = 'services/Patients.svc/REST/UpdatePateintHealthSummaryReport';
const GET_PATIENT_HEALTH_STATS =
'Services/Patients.svc/REST/Med_GetTransactionsSts';
const GET_PATIENT_HEALTH_STATS = 'Services/Patients.svc/REST/Med_GetTransactionsSts';
//URL to get medicine and pharmacies list
const CHANNEL = 3;
@ -332,21 +266,16 @@ var DeviceTypeID = Platform.isIOS ? 1 : 2;
const LANGUAGE_ID = 2;
const GET_PHARMCY_ITEMS = "Services/Lists.svc/REST/GetPharmcyItems_Region";
const GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList";
const GET_PAtIENTS_INSURANCE =
"Services/Patients.svc/REST/Get_PatientInsuranceDetails";
const GET_PAtIENTS_INSURANCE_UPDATED =
"Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory";
const GET_PAtIENTS_INSURANCE = "Services/Patients.svc/REST/Get_PatientInsuranceDetails";
const GET_PAtIENTS_INSURANCE_UPDATED = "Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory";
const INSURANCE_DETAILS = "Services/Patients.svc/REST/Get_InsuranceCheckList";
const GET_PATIENT_INSURANCE_DETAILS =
"Services/Patients.svc/REST/PatientER_GetPatientInsuranceDetails";
const UPLOAD_INSURANCE_CARD =
'Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate';
const GET_PATIENT_INSURANCE_DETAILS = "Services/Patients.svc/REST/PatientER_GetPatientInsuranceDetails";
const UPLOAD_INSURANCE_CARD = 'Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate';
const GET_VACCINES = "Services/Patients.svc/REST/GetDoneVaccinesByPatientID";
const GET_VACCINES_EMAIL = "Services/Notifications.svc/REST/SendVaccinesEmail";
const GET_PAtIENTS_INSURANCE_APPROVALS =
"Services/Patients.svc/REST/GetApprovalStatus";
const GET_PAtIENTS_INSURANCE_APPROVALS = "Services/Patients.svc/REST/GetApprovalStatus";
const SEARCH_BOT = 'HabibiChatBotApi/BotInterface/GetVoiceCommandResponse';
const GET_VACCINATIONS_ITEMS = "/Services/ERP.svc/REST/GET_VACCINATIONS_ITEMS";
@ -356,81 +285,54 @@ const GET_PATIENT_SICK_LEAVE = 'Services/Patients.svc/REST/GetPatientSickLeave';
const SendSickLeaveEmail = 'Services/Notifications.svc/REST/SendSickLeaveEmail';
const GET_PATIENT_AdVANCE_BALANCE_AMOUNT =
'Services/Patients.svc/REST/GetPatientAdvanceBalanceAmount';
const GET_PATIENT_INFO_BY_ID =
'Services/Doctors.svc/REST/GetPatientInfoByPatientID';
const GET_PATIENT_AdVANCE_BALANCE_AMOUNT = 'Services/Patients.svc/REST/GetPatientAdvanceBalanceAmount';
const GET_PATIENT_INFO_BY_ID = 'Services/Doctors.svc/REST/GetPatientInfoByPatientID';
const GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER =
'Services/Patients.svc/REST/AP_GetPatientInfoByPatientIDandMobileNumber';
const SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT =
'Services/Authentication.svc/REST/SendActivationCodeForAdvancePayment';
const SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = 'Services/Authentication.svc/REST/SendActivationCodeForAdvancePayment';
const CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT =
'Services/Authentication.svc/REST/CheckActivationCodeForAdvancePayment';
const GET_COVID_DRIVETHRU_PROJECT_LIST =
'Services/Doctors.svc/REST/COVID19_ProjectDriveThroughTestingCenter';
const GET_COVID_DRIVETHRU_PROJECT_LIST = 'Services/Doctors.svc/REST/COVID19_ProjectDriveThroughTestingCenter';
const GET_COVID_DRIVETHRU_PAYMENT_INFO =
'Services/Doctors.svc/REST/COVID19_GetPatientPaymentInormation';
const GET_COVID_DRIVETHRU_PAYMENT_INFO = 'Services/Doctors.svc/REST/COVID19_GetPatientPaymentInormation';
const GET_COVID_DRIVETHRU_FREE_SLOTS =
'Services/Doctors.svc/REST/COVID19_GetFreeSlots';
const GET_COVID_DRIVETHRU_FREE_SLOTS = 'Services/Doctors.svc/REST/COVID19_GetFreeSlots';
///Smartwatch Integration Services
const GET_PATIENT_LAST_RECORD =
'Services/Patients.svc/REST/Med_GetPatientLastRecord';
const GET_PATIENT_LAST_RECORD = 'Services/Patients.svc/REST/Med_GetPatientLastRecord';
///My Trackers
const GET_DIABETIC_RESULT_AVERAGE =
'Services/Patients.svc/REST/Patient_GetDiabeticResultAverage';
const GET_DIABTEC_RESULT =
'Services/Patients.svc/REST/Patient_GetDiabtecResults';
const ADD_DIABTEC_RESULT =
'Services/Patients.svc/REST/Patient_AddDiabtecResult';
const GET_BLOOD_PRESSURE_RESULT_AVERAGE =
'Services/Patients.svc/REST/Patient_GetBloodPressureResultAverage';
const GET_BLOOD_PRESSURE_RESULT =
'Services/Patients.svc/REST/Patient_GetBloodPressureResult';
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 GET_DIABETIC_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetDiabeticResultAverage';
const GET_DIABTEC_RESULT = 'Services/Patients.svc/REST/Patient_GetDiabtecResults';
const ADD_DIABTEC_RESULT = 'Services/Patients.svc/REST/Patient_AddDiabtecResult';
const GET_BLOOD_PRESSURE_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetBloodPressureResultAverage';
const GET_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_GetBloodPressureResult';
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 =
'Services/Patients.svc/Rest/GetActivePrescriptionReportByPatientID';
const GET_CALL_INFO_HOURS_RESULT =
'Services/Doctors.svc/REST/GetCallInfoHoursResult';
const GET_CALL_REQUEST_TYPE_LOV =
'Services/Doctors.svc/REST/GetCallRequestType_LOV';
const UPDATE_DIABETIC_RESULT =
'Services/Patients.svc/REST/Patient_UpdateDiabeticResult';
const SEND_AVERAGE_BLOOD_SUGAR_REPORT =
'Services/Notifications.svc/REST/SendAverageBloodSugarReport';
const DEACTIVATE_DIABETIC_STATUS =
'services/Patients.svc/REST/Patient_DeactivateDiabeticStatus';
const DEACTIVATE_BLOOD_PRESSURES_STATUS =
'services/Patients.svc/REST/Patient_DeactivateBloodPressureStatus';
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_CALL_INFO_HOURS_RESULT = 'Services/Doctors.svc/REST/GetCallInfoHoursResult';
const GET_CALL_REQUEST_TYPE_LOV = 'Services/Doctors.svc/REST/GetCallRequestType_LOV';
const UPDATE_DIABETIC_RESULT = 'Services/Patients.svc/REST/Patient_UpdateDiabeticResult';
const SEND_AVERAGE_BLOOD_SUGAR_REPORT = 'Services/Notifications.svc/REST/SendAverageBloodSugarReport';
const DEACTIVATE_DIABETIC_STATUS = 'services/Patients.svc/REST/Patient_DeactivateDiabeticStatus';
const DEACTIVATE_BLOOD_PRESSURES_STATUS = 'services/Patients.svc/REST/Patient_DeactivateBloodPressureStatus';
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 UPDATE_READ_STATUS = 'Services/Patients.svc/REST/UpdateReadStatus';
const INSERT_CALL_INFO = 'Services/Doctors.svc/REST/InsertCallInfo';
@ -438,35 +340,25 @@ const INSERT_CALL_INFO = 'Services/Doctors.svc/REST/InsertCallInfo';
const GET_PATIENT_ALLERGIES = 'Services/Patients.svc/REST/GetPatientAllergies';
// H2O
const H2O_GET_USER_PROGRESS =
"Services/H2ORemainder.svc/REST/H2O_GetUserProgress";
const H2O_INSERT_USER_ACTIVITY =
"Services/H2ORemainder.svc/REST/H2O_InsertUserActivity";
const H2O_GET_USER_DETAIL =
"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";
const H2O_GET_USER_PROGRESS = "Services/H2ORemainder.svc/REST/H2O_GetUserProgress";
const H2O_INSERT_USER_ACTIVITY = "Services/H2ORemainder.svc/REST/H2O_InsertUserActivity";
const H2O_GET_USER_DETAIL = "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
const GET_ALL_RELATIONSHIP_TYPES =
"Services/Patients.svc/REST/GetAllRelationshipTypes";
const SEND_ACTIVATION_CODE_FOR_E_REFERRAL =
'Services/Authentication.svc/REST/SendActivationCodeForEReferral';
const CHECK_ACTIVATION_CODE_FOR_E_REFERRAL =
'Services/Authentication.svc/REST/CheckActivationCodeForEReferral';
const GET_ALL_RELATIONSHIP_TYPES = "Services/Patients.svc/REST/GetAllRelationshipTypes";
const SEND_ACTIVATION_CODE_FOR_E_REFERRAL = '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 CREATE_E_REFERRAL = "Services/Patients.svc/REST/CreateEReferral";
const GET_E_REFERRALS = "Services/Patients.svc/REST/GetEReferrals";
// Encillary Orders
const GET_ANCILLARY_ORDERS =
'Services/Doctors.svc/REST/GetOnlineAncillaryOrderList';
const GET_ANCILLARY_ORDERS = 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderList';
const GET_ANCILLARY_ORDERS_DETAILS =
'Services/Doctors.svc/REST/GetOnlineAncillaryOrderProcList';
const GET_ANCILLARY_ORDERS_DETAILS = 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderProcList';
//Pharmacy wishlist
// const GET_WISHLIST = "http://swd-pharapp-01:7200/api/shopping_cart_items/";
@ -496,50 +388,34 @@ const GET_SHIPPING_OPTIONS = "get_shipping_option/";
const DELETE_SHOPPING_CART = "delete_shopping_cart_items/";
const DELETE_SHOPPING_CART_ALL = "delete_shopping_cart_item_by_customer/";
const ORDER_SHOPPING_CART = "orders";
const GET_LACUM_ACCOUNT_INFORMATION =
"Services/Patients.svc/REST/GetLakumAccountInformation";
const GET_LACUM_GROUP_INFORMATION =
"Services/Patients.svc/REST/GetlakumInQueryInfoGrouping";
const LACUM_ACCOUNT_ACTIVATE =
"Services/Patients.svc/REST/LakumAccountActivation";
const LACUM_ACCOUNT_DEACTIVATE =
"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 GET_LACUM_ACCOUNT_INFORMATION = "Services/Patients.svc/REST/GetLakumAccountInformation";
const GET_LACUM_GROUP_INFORMATION = "Services/Patients.svc/REST/GetlakumInQueryInfoGrouping";
const LACUM_ACCOUNT_ACTIVATE = "Services/Patients.svc/REST/LakumAccountActivation";
const LACUM_ACCOUNT_DEACTIVATE = "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 GET_RECOMMENDED_PRODUCT = 'alsoProduct/';
const GET_MOST_VIEWED_PRODUCTS = "mostview?";
const GET_NEW_PRODUCTS = "newproducts?";
// Home Health Care
const HHC_GET_ALL_SERVICES =
"Services/Patients.svc/REST/PatientER_HHC_GetAllServices";
const HHC_GET_ALL_CMC_SERVICES =
"Services/Patients.svc/REST/PatientER_CMC_GetAllServices";
const PATIENT_ER_UPDATE_PRES_ORDER =
"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 HHC_GET_ALL_SERVICES = "Services/Patients.svc/REST/PatientER_HHC_GetAllServices";
const HHC_GET_ALL_CMC_SERVICES = "Services/Patients.svc/REST/PatientER_CMC_GetAllServices";
const PATIENT_ER_UPDATE_PRES_ORDER = "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 PUSH_NOTIFICATION_GET_ALL_NOTIFICATIONS =
'Services/MobileNotifications.svc/REST/PushNotification_GetAllNotifications';
const PUSH_NOTIFICATION_SET_MESSAGES_FROM_POOL_AS_READ =
'Services/MobileNotifications.svc/REST/PushNotification_SetMessagesFromPoolAsRead';
const GET_PATIENT_ALL_PRES_ORD =
'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const PATIENT_ER_INSERT_PRES_ORDER =
'Services/Patients.svc/REST/PatientER_InsertPresOrder';
const GET_PATIENT_ALL_PRES_ORD = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const PATIENT_ER_INSERT_PRES_ORDER = 'Services/Patients.svc/REST/PatientER_InsertPresOrder';
const PHARMACY_MAKE_REVIEW = 'epharmacy/api/insertreviews';
const BLOOD_DONATION_REGISTER_BLOOD_TYPE =
'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType';
const ADD_USER_AGREEMENT_FOR_BLOOD_DONATION =
'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation';
const BLOOD_DONATION_REGISTER_BLOOD_TYPE = 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType';
const ADD_USER_AGREEMENT_FOR_BLOOD_DONATION = 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation';
//Pharmacy wishlist
const GET_WISHLIST = "shopping_cart_items/";
@ -572,8 +448,7 @@ const GET_SUB_PRODUCTS = 'products?categoryid=';
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=';
const GET_CLINIC_CATEGORY = 'Services/Doctors.svc/REST/DP_GetClinicCategory';
const GET_DISEASE_BY_CLINIC_ID =
'Services/Doctors.svc/REST/DP_GetDiseasesByClinicID';
const GET_DISEASE_BY_CLINIC_ID = 'Services/Doctors.svc/REST/DP_GetDiseasesByClinicID';
const SEARCH_DOCTOR_BY_TIME = 'Services/Doctors.svc/REST/SearchDoctorsByTime';
const TIMER_MIN = 10;
@ -589,6 +464,10 @@ const SCAN_QR_CODE = 'productbysku/';
const FILTERED_PRODUCTS = 'products?categoryids=';
const GET_DOCTOR_LIST_CALCULATION = "Services/Doctors.svc/REST/GetCallculationDoctors";
const GET_DOCTOR_LIST_BY_TIME = "Services/Doctors.svc/REST/SearchDoctorsByTime";
class AppGlobal {
static var context;

@ -0,0 +1,197 @@
class DoctorListByTimeModel {
dynamic clinicID;
String clinicName;
String doctorTitle;
dynamic iD;
String name;
dynamic projectID;
String projectName;
dynamic actualDoctorRate;
dynamic clinicRoomNo;
dynamic date;
dynamic dayName;
double decimalDoctorRate;
dynamic doctorAvailability;
dynamic doctorID;
String doctorImageURL;
dynamic doctorProfile;
dynamic doctorProfileInfo;
dynamic doctorRate;
dynamic doctorStarsRate;
dynamic gender;
String genderDescription;
bool isAllowWaitList;
bool isAppointmentAllowed;
bool isDoctorAllowVedioCall;
bool isDoctorDummy;
bool isDoctorHasPrePostImages;
bool isLiveCare;
String latitude;
String longitude;
String nationalityFlagURL;
String nationalityID;
String nationalityName;
dynamic nearestFreeSlot;
dynamic noOfPatientsRate;
dynamic originalClinicID;
dynamic personRate;
dynamic projectDistanceInKiloMeters;
String qR;
dynamic qRString;
dynamic rateNumber;
dynamic serviceID;
String setupID;
List<String> speciality;
dynamic workingHours;
DoctorListByTimeModel(
{this.clinicID,
this.clinicName,
this.doctorTitle,
this.iD,
this.name,
this.projectID,
this.projectName,
this.actualDoctorRate,
this.clinicRoomNo,
this.date,
this.dayName,
this.decimalDoctorRate,
this.doctorAvailability,
this.doctorID,
this.doctorImageURL,
this.doctorProfile,
this.doctorProfileInfo,
this.doctorRate,
this.doctorStarsRate,
this.gender,
this.genderDescription,
this.isAllowWaitList,
this.isAppointmentAllowed,
this.isDoctorAllowVedioCall,
this.isDoctorDummy,
this.isDoctorHasPrePostImages,
this.isLiveCare,
this.latitude,
this.longitude,
this.nationalityFlagURL,
this.nationalityID,
this.nationalityName,
this.nearestFreeSlot,
this.noOfPatientsRate,
this.originalClinicID,
this.personRate,
this.projectDistanceInKiloMeters,
this.qR,
this.qRString,
this.rateNumber,
this.serviceID,
this.setupID,
this.speciality,
this.workingHours});
DoctorListByTimeModel.fromJson(Map<String, dynamic> json) {
clinicID = json['ClinicID'];
clinicName = json['ClinicName'];
doctorTitle = json['DoctorTitle'];
iD = json['ID'];
name = json['Name'];
projectID = json['ProjectID'];
projectName = json['ProjectName'];
actualDoctorRate = json['ActualDoctorRate'];
clinicRoomNo = json['ClinicRoomNo'];
date = json['Date'];
dayName = json['DayName'];
decimalDoctorRate = json['DecimalDoctorRate'];
doctorAvailability = json['DoctorAvailability'];
doctorID = json['DoctorID'];
doctorImageURL = json['DoctorImageURL'];
doctorProfile = json['DoctorProfile'];
doctorProfileInfo = json['DoctorProfileInfo'];
doctorRate = json['DoctorRate'];
doctorStarsRate = json['DoctorStarsRate'];
gender = json['Gender'];
genderDescription = json['GenderDescription'];
isAllowWaitList = json['IsAllowWaitList'];
isAppointmentAllowed = json['IsAppointmentAllowed'];
isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall'];
isDoctorDummy = json['IsDoctorDummy'];
isDoctorHasPrePostImages = json['IsDoctorHasPrePostImages'];
isLiveCare = json['IsLiveCare'];
latitude = json['Latitude'];
longitude = json['Longitude'];
nationalityFlagURL = json['NationalityFlagURL'];
nationalityID = json['NationalityID'];
nationalityName = json['NationalityName'];
nearestFreeSlot = json['NearestFreeSlot'];
noOfPatientsRate = json['NoOfPatientsRate'];
originalClinicID = json['OriginalClinicID'];
personRate = json['PersonRate'];
projectDistanceInKiloMeters = json['ProjectDistanceInKiloMeters'];
qR = json['QR'];
qRString = json['QRString'];
rateNumber = json['RateNumber'];
serviceID = json['ServiceID'];
setupID = json['SetupID'];
speciality = json['Speciality'].cast<String>();
workingHours = json['WorkingHours'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ClinicID'] = this.clinicID;
data['ClinicName'] = this.clinicName;
data['DoctorTitle'] = this.doctorTitle;
data['ID'] = this.iD;
data['Name'] = this.name;
data['ProjectID'] = this.projectID;
data['ProjectName'] = this.projectName;
data['ActualDoctorRate'] = this.actualDoctorRate;
data['ClinicRoomNo'] = this.clinicRoomNo;
data['Date'] = this.date;
data['DayName'] = this.dayName;
data['DecimalDoctorRate'] = this.decimalDoctorRate;
data['DoctorAvailability'] = this.doctorAvailability;
data['DoctorID'] = this.doctorID;
data['DoctorImageURL'] = this.doctorImageURL;
data['DoctorProfile'] = this.doctorProfile;
data['DoctorProfileInfo'] = this.doctorProfileInfo;
data['DoctorRate'] = this.doctorRate;
data['DoctorStarsRate'] = this.doctorStarsRate;
data['Gender'] = this.gender;
data['GenderDescription'] = this.genderDescription;
data['IsAllowWaitList'] = this.isAllowWaitList;
data['IsAppointmentAllowed'] = this.isAppointmentAllowed;
data['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall;
data['IsDoctorDummy'] = this.isDoctorDummy;
data['IsDoctorHasPrePostImages'] = this.isDoctorHasPrePostImages;
data['IsLiveCare'] = this.isLiveCare;
data['Latitude'] = this.latitude;
data['Longitude'] = this.longitude;
data['NationalityFlagURL'] = this.nationalityFlagURL;
data['NationalityID'] = this.nationalityID;
data['NationalityName'] = this.nationalityName;
data['NearestFreeSlot'] = this.nearestFreeSlot;
data['NoOfPatientsRate'] = this.noOfPatientsRate;
data['OriginalClinicID'] = this.originalClinicID;
data['PersonRate'] = this.personRate;
data['ProjectDistanceInKiloMeters'] = this.projectDistanceInKiloMeters;
data['QR'] = this.qR;
data['QRString'] = this.qRString;
data['RateNumber'] = this.rateNumber;
data['ServiceID'] = this.serviceID;
data['SetupID'] = this.setupID;
data['Speciality'] = this.speciality;
data['WorkingHours'] = this.workingHours;
return data;
}
}
class DoctorsListTime {
List<DoctorListByTimeModel> doctorsByTimeList = List();
String filterName = "";
DoctorsListTime({filterName, DoctorListByTimeModel doctor}) {
doctorsByTimeList.add(doctor);
}
}

@ -0,0 +1,80 @@
class DoctorListByTimeRequestModel {
int clinicID;
bool isGetNearAppointment;
bool continueDentalPlan;
bool isSearchAppointmnetByClinicID;
int patientID;
int latitude;
int longitude;
bool license;
double versionID;
int channel;
int languageID;
String iPAdress;
String generalid;
int patientOutSA;
dynamic sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
DoctorListByTimeRequestModel(
{this.clinicID,
this.isGetNearAppointment,
this.continueDentalPlan,
this.isSearchAppointmnetByClinicID,
this.patientID,
this.latitude,
this.longitude,
this.license,
this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID});
DoctorListByTimeRequestModel.fromJson(Map<String, dynamic> json) {
clinicID = json['ClinicID'];
isGetNearAppointment = json['IsGetNearAppointment'];
continueDentalPlan = json['ContinueDentalPlan'];
isSearchAppointmnetByClinicID = json['IsSearchAppointmnetByClinicID'];
patientID = json['PatientID'];
latitude = json['Latitude'];
longitude = json['Longitude'];
license = json['License'];
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ClinicID'] = this.clinicID;
data['IsGetNearAppointment'] = this.isGetNearAppointment;
data['ContinueDentalPlan'] = this.continueDentalPlan;
data['IsSearchAppointmnetByClinicID'] = this.isSearchAppointmnetByClinicID;
data['PatientID'] = this.patientID;
data['Latitude'] = this.latitude;
data['Longitude'] = this.longitude;
data['License'] = this.license;
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
return data;
}
}

@ -0,0 +1,64 @@
class GetDoctorListModel {
int calcID;
int projectID;
int clinicID;
String clinicName;
int doctorID;
String doctorImageURL;
String doctorName;
String doctorTitle;
int gender;
String genderDescription;
String nationality;
String nationalityFlagURL;
String projectName;
GetDoctorListModel(
{this.calcID,
this.projectID,
this.clinicID,
this.clinicName,
this.doctorID,
this.doctorImageURL,
this.doctorName,
this.doctorTitle,
this.gender,
this.genderDescription,
this.nationality,
this.nationalityFlagURL,
this.projectName});
GetDoctorListModel.fromJson(Map<String, dynamic> json) {
calcID = json['CalcID'];
projectID = json['ProjectID'];
clinicID = json['ClinicID'];
clinicName = json['ClinicName'];
doctorID = json['DoctorID'];
doctorImageURL = json['DoctorImageURL'];
doctorName = json['DoctorName'];
doctorTitle = json['DoctorTitle'];
gender = json['Gender'];
genderDescription = json['GenderDescription'];
nationality = json['Nationality'];
nationalityFlagURL = json['NationalityFlagURL'];
projectName = json['ProjectName'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['CalcID'] = this.calcID;
data['ProjectID'] = this.projectID;
data['ClinicID'] = this.clinicID;
data['ClinicName'] = this.clinicName;
data['DoctorID'] = this.doctorID;
data['DoctorImageURL'] = this.doctorImageURL;
data['DoctorName'] = this.doctorName;
data['DoctorTitle'] = this.doctorTitle;
data['Gender'] = this.gender;
data['GenderDescription'] = this.genderDescription;
data['Nationality'] = this.nationality;
data['NationalityFlagURL'] = this.nationalityFlagURL;
data['ProjectName'] = this.projectName;
return data;
}
}

@ -0,0 +1,52 @@
class GetDoctorListRequestModel {
int calculationID;
double versionID;
int channel;
int languageID;
String iPAdress;
String generalid;
int patientOutSA;
String sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
GetDoctorListRequestModel(
{this.calculationID,
this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID});
GetDoctorListRequestModel.fromJson(Map<String, dynamic> json) {
calculationID = json['CalculationID'];
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['CalculationID'] = this.calculationID;
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
return data;
}
}

@ -2,24 +2,28 @@ import 'package:diplomaticquarterapp/config/config.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/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';
class BariatricsService extends BaseService {
List<ClinicCategory> clinicCategoryList = [];
List<DiseasesByClinic> diseasesList = [];
List<GetDoctorListModel> doctorList = [];
List<DoctorListByTimeModel> doctorListByTime = [];
Future getClinicCategory() async {
hasError = false;
Map<String, dynamic> body = Map();
var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
body['ClinicID'] = 108; // hint: it is static depend on IONIC project
body['isDentalAllowedBackend'] = false;
body['LanguageID'] = languageID == 'ar' ? 1 : 2;
await baseAppClient.post(GET_CLINIC_CATEGORY,
onSuccess: (dynamic response, int statusCode) {
await baseAppClient.post(GET_CLINIC_CATEGORY, onSuccess: (dynamic response, int statusCode) {
clinicCategoryList.clear();
if (response['ClinicCategoryList'] != null)
response['ClinicCategoryList'].forEach((city) {
@ -36,8 +40,7 @@ class BariatricsService extends BaseService {
Map<String, dynamic> body = Map();
body['ClinicID'] = 108; // hint: it is static depend on IONIC project
await baseAppClient.post(GET_DISEASE_BY_CLINIC_ID,
onSuccess: (dynamic response, int statusCode) {
await baseAppClient.post(GET_DISEASE_BY_CLINIC_ID, onSuccess: (dynamic response, int statusCode) {
diseasesList.clear();
if (response['DiseasesByClinicList'] != null)
response['DiseasesByClinicList'].forEach((city) {
@ -51,8 +54,7 @@ class BariatricsService extends BaseService {
Future searchDoctorsByTime(DiseasesByClinic disease) async {
hasError = false;
var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Map<String, dynamic> body = Map();
body['ClinicID'] = 108; // hint: it is static depend on IONIC project
@ -66,11 +68,36 @@ class BariatricsService extends BaseService {
body['Longitude'] = 0;
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(SEARCH_DOCTOR_BY_TIME,
onSuccess: (dynamic response, int statusCode) {
}, onFailure: (String error, int statusCode) {
await baseAppClient.post(SEARCH_DOCTOR_BY_TIME, onSuccess: (dynamic response, int statusCode) {},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
Future getDoctorList() async {
hasError = false;
DoctorListByTimeRequestModel _doctorListReq = DoctorListByTimeRequestModel();
_doctorListReq.isGetNearAppointment = false;
_doctorListReq.continueDentalPlan = false;
_doctorListReq.isSearchAppointmnetByClinicID = true;
_doctorListReq.latitude = 0;
_doctorListReq.longitude = 0;
_doctorListReq.license = true;
_doctorListReq.clinicID = 108;
_doctorListReq.patientID = 0;
//body['ClinicID'] = 108; // hint: it is static depend on IONIC project
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) {
hasError = true;
super.error = error;
}, body: _doctorListReq.toJson());
}
}

@ -2,6 +2,8 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.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/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/viewModels/base_view_model.dart';
@ -13,6 +15,9 @@ class BariatricsViewModel extends BaseViewModel {
List<ClinicCategory> get clinicCategoryList => _service.clinicCategoryList;
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 {
setState(ViewState.Busy);
@ -46,4 +51,32 @@ class BariatricsViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
}
void getDoctorList() async {
setState(ViewState.Busy);
await _service.getDoctorList();
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) {
var value = doctorLists[doctorLists.indexOf(patientLabOrdersClinic[0])]
.doctorsByTimeList
.where((e) => e.projectName == element.projectName)
.toList();
if (value.isEmpty)
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 {
BloodPressureService bloodPressureService = locator<BloodPressureService>();
List<BloodPressureResult> get monthDiabtecPatientResult =>
bloodPressureService.monthDiabtecPatientResult;
List<BloodPressureResult> get monthDiabtecPatientResult => bloodPressureService.monthDiabtecPatientResult;
List<BloodPressureResult> get weekDiabtecPatientResult =>
bloodPressureService.weekDiabtecPatientResult;
List<BloodPressureResult> get weekDiabtecPatientResult => bloodPressureService.weekDiabtecPatientResult;
List<BloodPressureResult> get yearDiabtecPatientResult =>
bloodPressureService.yearDiabtecPatientResult;
List<BloodPressureResult> get yearDiabtecPatientResult => bloodPressureService.yearDiabtecPatientResult;
List<TimeSeriesSales2> weightWeekTimeSeriesDataTop = [];
List<TimeSeriesSales2> weightWeekTimeSeriesDataLow = [];
@ -37,35 +34,36 @@ class BloodPressureViewMode extends BaseViewModel {
} else {
clearDate();
bloodPressureService.weekDiabtectResultAverageList.forEach((element) {
weightWeekTimeSeriesDataTop.add(TimeSeriesSales2(
element.bloodPressureDate,
element.dailyDiastolicPressureAverageResult.toDouble()));
weightWeekTimeSeriesDataLow.add(TimeSeriesSales2(
element.bloodPressureDate,
element.dailySystolicePressureAverageResult.toDouble()));
weightWeekTimeSeriesDataTop
.add(TimeSeriesSales2(element.bloodPressureDate, element.dailyDiastolicPressureAverageResult.toDouble()));
weightWeekTimeSeriesDataLow
.add(TimeSeriesSales2(element.bloodPressureDate, element.dailySystolicePressureAverageResult.toDouble()));
for (int index = 0; index < bloodPressureService.monthDiabtectResultAverageList.length; index++) {
weighMonthTimeSeriesDataTop.add(TimeSeriesSales3(index, bloodPressureService.monthDiabtectResultAverageList[index].weekDiastolicPressureAverageResult.toDouble()));
weighMonthTimeSeriesDataLow.add(TimeSeriesSales3(index, bloodPressureService.monthDiabtectResultAverageList[index].weekSystolicePressureAverageResult.toDouble()));
weighMonthTimeSeriesDataTop.add(TimeSeriesSales3(
index,
bloodPressureService.monthDiabtectResultAverageList[index].weekDiastolicPressureAverageResult
.toDouble()));
weighMonthTimeSeriesDataLow.add(TimeSeriesSales3(
index,
bloodPressureService.monthDiabtectResultAverageList[index].weekSystolicePressureAverageResult
.toDouble()));
}
bloodPressureService.yearDiabtecResultAverageList.forEach((element) {
weightYearTimeSeriesDataTop.add(TimeSeriesSales2(element.date,
element.monthSystolicePressureAverageResult.toDouble()));
weightYearTimeSeriesDataTop
.add(TimeSeriesSales2(element.date, element.monthSystolicePressureAverageResult.toDouble()));
weightYearTimeSeriesDataLow.add(TimeSeriesSales2(element.date,
element.monthDiastolicPressureAverageResult.toDouble()));
weightYearTimeSeriesDataLow
.add(TimeSeriesSales2(element.date, element.monthDiastolicPressureAverageResult.toDouble()));
});
});
setState(ViewState.Idle);
}
}
void clearDate(){
void clearDate() {
weightWeekTimeSeriesDataTop.clear();
weightWeekTimeSeriesDataLow.clear();
weighMonthTimeSeriesDataTop.clear();
@ -90,9 +88,10 @@ class BloodPressureViewMode extends BaseViewModel {
{String bloodPressureDate,
String diastolicPressure,
String systolicePressure,
int measuredArm,bool isUpdate = false}) async {
int measuredArm,
bool isUpdate = false}) async {
setState(ViewState.BusyLocal);
if(!isUpdate)
if (!isUpdate)
await bloodPressureService.addDiabtecResult(
bloodPressureDate: bloodPressureDate,
diastolicPressure: diastolicPressure,
@ -113,7 +112,6 @@ class BloodPressureViewMode extends BaseViewModel {
}
}
Future deactivateDiabeticStatus({int lineItemNo}) async {
setState(ViewState.BusyLocal);

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

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

@ -121,8 +121,7 @@ class _BMICalculatorState extends State<BMICalculator> {
return AppScaffold(
isShowAppBar: true,
isShowDecPage: false,
appBarTitle:
"${TranslationBase.of(context).bmi} ${TranslationBase.of(context).calcHealth}",
appBarTitle: "${TranslationBase.of(context).bmi} ${TranslationBase.of(context).calcHealth}",
body: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
@ -159,8 +158,7 @@ class _BMICalculatorState extends State<BMICalculator> {
Row(
children: [
Padding(
padding: EdgeInsets.symmetric(
vertical: 10.0, horizontal: 8.0),
padding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 8.0),
child: Center(
child: Container(
width: 60.0,
@ -181,8 +179,7 @@ class _BMICalculatorState extends State<BMICalculator> {
Container(
height: 38.0,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Container(
@ -264,18 +261,15 @@ class _BMICalculatorState extends State<BMICalculator> {
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
offset:
Offset(0, 3), // changes position of shadow
offset: Offset(0, 3), // changes position of shadow
),
],
color: cmCard,
borderRadius: BorderRadius.circular(3.0),
),
child: Padding(
padding: const EdgeInsets.symmetric(
vertical: 0.0, horizontal: 18.0),
child: Center(
child: Texts(TranslationBase.of(context).cm)),
padding: const EdgeInsets.symmetric(vertical: 0.0, horizontal: 18.0),
child: Center(child: Texts(TranslationBase.of(context).cm)),
),
),
),
@ -296,16 +290,13 @@ class _BMICalculatorState extends State<BMICalculator> {
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
offset:
Offset(0, 3), // changes position of shadow
offset: Offset(0, 3), // changes position of shadow
),
],
),
child: Padding(
padding:
const EdgeInsets.symmetric(horizontal: 16.0),
child: Center(
child: Texts(TranslationBase.of(context).feet)),
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Center(child: Texts(TranslationBase.of(context).feet)),
),
),
),
@ -337,8 +328,7 @@ class _BMICalculatorState extends State<BMICalculator> {
Row(
children: [
Padding(
padding: EdgeInsets.symmetric(
vertical: 10.0, horizontal: 8.0),
padding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 8.0),
child: Center(
child: Container(
width: 60.0,
@ -359,8 +349,7 @@ class _BMICalculatorState extends State<BMICalculator> {
Container(
height: 38.0,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Container(
@ -442,18 +431,15 @@ class _BMICalculatorState extends State<BMICalculator> {
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
offset:
Offset(0, 3), // changes position of shadow
offset: Offset(0, 3), // changes position of shadow
),
],
color: kgCard,
borderRadius: BorderRadius.circular(3.0),
),
child: Padding(
padding: const EdgeInsets.symmetric(
vertical: 0.0, horizontal: 18.0),
child: Center(
child: Texts(TranslationBase.of(context).kg)),
padding: const EdgeInsets.symmetric(vertical: 0.0, horizontal: 18.0),
child: Center(child: Texts(TranslationBase.of(context).kg)),
),
),
),
@ -474,17 +460,13 @@ class _BMICalculatorState extends State<BMICalculator> {
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
offset:
Offset(0, 3), // changes position of shadow
offset: Offset(0, 3), // changes position of shadow
),
],
),
child: Padding(
padding:
const EdgeInsets.symmetric(horizontal: 16.0),
child: Center(
child:
Texts(TranslationBase.of(context).pound)),
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Center(child: Texts(TranslationBase.of(context).pound)),
),
),
),

@ -50,9 +50,9 @@ class ResultPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowDecPage: false,
isShowAppBar: true,
appBarTitle:
"${TranslationBase.of(context).bmi} ${TranslationBase.of(context).calcHealth}",
appBarTitle: "${TranslationBase.of(context).bmi} ${TranslationBase.of(context).calcHealth}",
body: Column(
children: [
Expanded(
@ -112,11 +112,10 @@ class ResultPage extends StatelessWidget {
backgroundColor: Theme.of(context).primaryColor,
radius: 8,
fontWeight: FontWeight.bold,
handler: (){
handler: () {
Navigator.push(
context,
FadePage(
page: BariatricsPage(1, 1, finalResult)),
FadePage(page: BariatricsPage(1, 1, finalResult)),
);
},
),

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

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

@ -0,0 +1,131 @@
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:rating_bar/rating_bar.dart';
class DoctorList extends StatelessWidget {
const DoctorList({Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
return BaseView<BariatricsViewModel>(
allowAny: true,
onModelReady: (model) => model.getDoctorList(),
builder: (BuildContext context, BariatricsViewModel model, Widget child) => AppScaffold(
isShowDecPage: false,
isShowAppBar: true,
baseViewModel: model,
appBarTitle: "Doctors List",
description: TranslationBase.of(context).infoApprovals,
infoList: TranslationBase.of(context).infoApprovalPoints,
body: ListView.builder(
itemCount: model.doctorLists.length,
itemBuilder: (BuildContext context, int index) {
return ExpansionTile(
title: Text(model.doctorListByTime[index].projectName),
children: [
Card(
margin: EdgeInsets.fromLTRB(10.0, 16.0, 10.0, 8.0),
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),
child: Container(
decoration: BoxDecoration(),
padding: EdgeInsets.all(7.0),
width: MediaQuery.of(context).size.width,
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Expanded(
flex: 1,
child: ClipRRect(
borderRadius: BorderRadius.circular(100.0),
child: Image.network(model.doctorListByTime[index].doctorImageURL,
fit: BoxFit.fill, height: 60.0, width: 60.0),
),
),
Expanded(
flex: 4,
child: Container(
width: MediaQuery.of(context).size.width * 0.55,
margin: EdgeInsets.fromLTRB(20.0, 10.0, 10.0, 0.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
if (model.doctorListByTime[index].doctorTitle != null)
Text(
model.doctorListByTime[index].doctorTitle +
" " +
model.doctorListByTime[index].name,
style: TextStyle(
fontSize: 14.0, color: Colors.grey[700], letterSpacing: 1.0)),
Container(
margin: EdgeInsets.only(top: 3.0),
child: Text(
model.doctorListByTime[index].clinicName != null
? model.doctorListByTime[index].clinicName
: "",
style: TextStyle(
fontSize: 12.0, color: Colors.grey[600], letterSpacing: 1.0)),
),
Container(
margin: EdgeInsets.only(top: 3.0),
child: Text(model.doctorListByTime[index].projectName,
style: TextStyle(
fontSize: 12.0, color: Colors.grey[600], letterSpacing: 1.0)),
),
// if (doctor.speciality != null)
// Container(
// margin: EdgeInsets.only(top: 3.0, bottom: 3.0),
// child: Text(getDoctorSpeciality(this.doctor.speciality).trim(),
// style: TextStyle(fontSize: 12.0, color: Colors.grey[600], letterSpacing: 1.0)),
// ),
// this.doctor.nearestFreeSlot != null
// ? Container(
// margin: EdgeInsets.only(top: 3.0, bottom: 3.0),
// child: Text(getDate(this.doctor.nearestFreeSlot),
// style: TextStyle(
// fontSize: 14.0,
// fontWeight: FontWeight.bold,
// color: Colors.green[600],
// letterSpacing: 1.0)),
// )
// : Container(),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
RatingBar.readOnly(
initialRating: model.doctorListByTime[index].actualDoctorRate.toDouble(),
size: 20.0,
filledColor: Colors.yellow[700],
emptyColor: Colors.grey[500],
isHalfAllowed: true,
halfFilledIcon: Icons.star_half,
filledIcon: Icons.star,
emptyIcon: Icons.star,
),
Container(
child: Image.network(model.doctorListByTime[index].nationalityFlagURL,
width: 25.0, height: 25.0),
),
],
),
],
),
),
),
],
),
),
),
],
);
}),
));
}
}

@ -112,8 +112,7 @@ class _BloodSugarState extends State<BloodSugar> {
onTap: () {
setState(() {
updateColor(1);
inputValue =
double.parse(textController.text);
inputValue = double.parse(textController.text);
inputValue = inputValue / 15;
unit = 'mmol/l';
});
@ -127,16 +126,14 @@ class _BloodSugarState extends State<BloodSugar> {
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
offset: Offset(
0, 3), // changes position of shadow
offset: Offset(0, 3), // changes position of shadow
),
],
color: cardMGColor,
borderRadius: BorderRadius.circular(3.0),
),
child: Padding(
padding: const EdgeInsets.symmetric(
vertical: 0.0, horizontal: 18.0),
padding: const EdgeInsets.symmetric(vertical: 0.0, horizontal: 18.0),
child: Texts('MG/DLt TO \nMMOL/L'),
),
),
@ -145,8 +142,7 @@ class _BloodSugarState extends State<BloodSugar> {
onTap: () {
setState(() {
updateColor(2);
inputValue =
double.parse(textController.text);
inputValue = double.parse(textController.text);
inputValue = inputValue * 18;
unit = 'mg/dlt';
});
@ -162,15 +158,13 @@ class _BloodSugarState extends State<BloodSugar> {
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
offset: Offset(
0, 3), // changes position of shadow
offset: Offset(0, 3), // changes position of shadow
),
],
),
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 16.0),
child: Texts('MG/DLt TO\n MMOL/L'),
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Texts('\nMMOL/L TO MG/DLt '),
),
),
),
@ -197,8 +191,7 @@ class _BloodSugarState extends State<BloodSugar> {
keyboardType: TextInputType.number,
decoration: InputDecoration(
labelText: TranslationBase.of(context).enterReadingValue,
border: OutlineInputBorder(
borderSide: BorderSide(color: Colors.black45)),
border: OutlineInputBorder(borderSide: BorderSide(color: Colors.black45)),
labelStyle: TextStyle(
color: Colors.black87,
),
@ -260,9 +253,7 @@ class _BloodSugarState extends State<BloodSugar> {
label: TranslationBase.of(context).calculate,
onTap: () {
setState(() {
_visible == false
? _visible = !_visible
: _visible = _visible;
_visible == false ? _visible = !_visible : _visible = _visible;
calculateBloodSugar();
});
},

@ -8,8 +8,7 @@ class MyWebView extends StatelessWidget {
final String title;
final String selectedUrl;
final Completer<WebViewController> _controller =
Completer<WebViewController>();
final Completer<WebViewController> _controller = Completer<WebViewController>();
MyWebView({
@required this.title,
@ -21,17 +20,12 @@ class MyWebView extends StatelessWidget {
return AppScaffold(
isShowAppBar: true,
appBarTitle: title,
body:
WebView(
body: WebView(
initialUrl: selectedUrl,
javascriptMode: JavascriptMode.unrestricted,
onWebViewCreated: (WebViewController webViewController) {
_controller.complete(webViewController);
},
)
);
));
}
}

@ -9,7 +9,6 @@ import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'health_calculator/bmi_calculator/bmi_calculator.dart';
import 'health_calculator/bmr_calculator/bmr_calculator.dart';
import 'health_calculator/calorie_calculator/calorie_calculator.dart';
@ -21,8 +20,7 @@ class HealthCalculators extends StatefulWidget {
_HealthCalculatorsState createState() => _HealthCalculatorsState();
}
class _HealthCalculatorsState extends State<HealthCalculators>
with SingleTickerProviderStateMixin {
class _HealthCalculatorsState extends State<HealthCalculators> with SingleTickerProviderStateMixin {
TabController _tabController;
void initState() {
super.initState();
@ -67,22 +65,19 @@ class _HealthCalculatorsState extends State<HealthCalculators>
indicatorWeight: 4.0,
indicatorColor: Colors.red,
labelColor: Theme.of(context).buttonColor,
labelPadding:
EdgeInsets.symmetric(horizontal: 13.0, vertical: 2.0),
labelPadding: EdgeInsets.symmetric(horizontal: 13.0, vertical: 2.0),
unselectedLabelColor: Colors.grey,
tabs: <Widget>[
Container(
width: MediaQuery.of(context).size.width * 0.35,
child: Center(
child: Texts(
TranslationBase.of(context).generalHealth),
child: Texts(TranslationBase.of(context).generalHealth),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.35,
child: Center(
child:
Texts(TranslationBase.of(context).womanHealth),
child: Texts(TranslationBase.of(context).womanHealth),
),
),
],
@ -121,8 +116,7 @@ class _HealthCalculatorsState extends State<HealthCalculators>
child: MedicalProfileItem(
title: TranslationBase.of(context).bmi,
imagePath: 'bmi_health_calculator.png',
subTitle:
TranslationBase.of(context).calcHealth,
subTitle: TranslationBase.of(context).calcHealth,
),
),
),
@ -140,8 +134,7 @@ class _HealthCalculatorsState extends State<HealthCalculators>
child: MedicalProfileItem(
title: TranslationBase.of(context).calories,
imagePath: 'calories-calculator.png',
subTitle:
TranslationBase.of(context).calcHealth,
subTitle: TranslationBase.of(context).calcHealth,
),
),
),
@ -163,8 +156,7 @@ class _HealthCalculatorsState extends State<HealthCalculators>
child: MedicalProfileItem(
title: TranslationBase.of(context).bmr,
imagePath: 'BMR_calculator.png',
subTitle:
TranslationBase.of(context).calcHealth,
subTitle: TranslationBase.of(context).calcHealth,
),
),
),
@ -220,11 +212,9 @@ class _HealthCalculatorsState extends State<HealthCalculators>
);
},
child: MedicalProfileItem(
title:
TranslationBase.of(context).carbohydrate,
title: TranslationBase.of(context).carbohydrate,
imagePath: 'carb_protein.png',
subTitle:
TranslationBase.of(context).proteinFat,
subTitle: TranslationBase.of(context).proteinFat,
),
),
),

@ -20,8 +20,7 @@ class WeightHomePage extends StatefulWidget {
_WeightHomePageState createState() => _WeightHomePageState();
}
class _WeightHomePageState extends State<WeightHomePage>
with SingleTickerProviderStateMixin {
class _WeightHomePageState extends State<WeightHomePage> with SingleTickerProviderStateMixin {
TabController _tabController;
@override
@ -43,7 +42,8 @@ class _WeightHomePageState extends State<WeightHomePage>
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).weight,
appBarIcons: [IconButton(
appBarIcons: [
IconButton(
icon: Icon(Icons.email),
color: Colors.white,
onPressed: () {
@ -51,16 +51,18 @@ class _WeightHomePageState extends State<WeightHomePage>
context: context,
child: ConfirmSendEmailDialog(
email: model.user.emailAddress,
onTapSendEmail: () async{
onTapSendEmail: () async {
GifLoaderDialogUtils.showMyDialog(context);
model.sendReportByEmail().then((value) {
GifLoaderDialogUtils.hideDialog(context);
if(model.state == ViewState.ErrorLocal){
if (model.state == ViewState.ErrorLocal) {
AppToast.showErrorToast(message: model.error);
}else{
AppToast.showSuccessToast(message:TranslationBase.of(context).emailSentSuccessfully, );
} else {
AppToast.showSuccessToast(
message: TranslationBase.of(context).emailSentSuccessfully,
);
}
}).catchError((e){
}).catchError((e) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: model.error);
});
@ -68,7 +70,8 @@ class _WeightHomePageState extends State<WeightHomePage>
),
);
},
),],
),
],
baseViewModel: model,
body: Scaffold(
extendBodyBehindAppBar: true,
@ -98,7 +101,12 @@ class _WeightHomePageState extends State<WeightHomePage>
),
floatingActionButton: InkWell(
onTap: () {
Navigator.push(context, FadePage(page: AddWeightPage(model: model,)));
Navigator.push(
context,
FadePage(
page: AddWeightPage(
model: model,
)));
},
child: Container(
width: 55,

@ -29,7 +29,7 @@ class AddBloodPressurePage extends StatefulWidget {
{Key key,
this.bloodSugarDate,
this.measureTimeSelectedType,
this.isUpdate=false,
this.isUpdate = false,
this.lineItemNo,
this.model,
this.bloodSystolicValue,
@ -42,8 +42,7 @@ class AddBloodPressurePage extends StatefulWidget {
class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
TextEditingController _bloodSystolicValueController = TextEditingController();
TextEditingController _bloodDiastolicValueController =
TextEditingController();
TextEditingController _bloodDiastolicValueController = TextEditingController();
DateTime bloodSugarDate = DateTime.now();
DateTime timeSugarDate = DateTime.now();
int measuredArm = 1;
@ -79,10 +78,9 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
return AppScaffold(
isShowAppBar: true,
appBarTitle: widget.isUpdate
? TranslationBase.of(context).update
: TranslationBase.of(context).add,
appBarIcons: widget.isUpdate?[
appBarTitle: widget.isUpdate ? TranslationBase.of(context).update : TranslationBase.of(context).add,
appBarIcons: widget.isUpdate
? [
IconButton(
icon: Icon(Icons.delete),
color: Colors.white,
@ -96,9 +94,7 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
ConfirmDialog.closeAlertDialog(context);
GifLoaderDialogUtils.showMyDialog(context);
widget.model
.deactivateDiabeticStatus(lineItemNo: widget.lineItemNo)
.then((value) {
widget.model.deactivateDiabeticStatus(lineItemNo: widget.lineItemNo).then((value) {
GifLoaderDialogUtils.hideDialog(context);
if (widget.model.state == ViewState.ErrorLocal)
AppToast.showErrorToast(message: widget.model.error);
@ -113,7 +109,8 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
dialog.showAlertDialog(context);
},
)
]:null,
]
: null,
body: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Container(
@ -141,17 +138,13 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
),
InkWell(
onTap: () {
confirmSelectMeasureTimeDialog(projectViewModel.isArabic
? measureTimeEnList
: measureTimeArList);
confirmSelectMeasureTimeDialog(projectViewModel.isArabic ? measureTimeArList : measureTimeEnList);
},
child: Container(
padding: EdgeInsets.all(12),
width: double.infinity,
height: 65,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Colors.white),
decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
@ -178,17 +171,13 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
bloodSugarDate = date;
},
);
},
currentTime: bloodSugarDate,
locale: projectViewModel.localeType);
}, currentTime: bloodSugarDate, locale: projectViewModel.localeType);
},
child: Container(
padding: EdgeInsets.all(12),
width: double.infinity,
height: 65,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Colors.white),
decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
@ -203,30 +192,22 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
),
InkWell(
onTap: () {
DatePicker.showTimePicker(context, showTitleActions: true,
onConfirm: (date) {
DatePicker.showTimePicker(context, showTitleActions: true, onConfirm: (date) {
setState(
() {
timeSugarDate = date;
},
);
},
currentTime: timeSugarDate,
locale: projectViewModel.localeType);
}, currentTime: timeSugarDate, locale: projectViewModel.localeType);
},
child: Container(
padding: EdgeInsets.all(12),
width: double.infinity,
height: 65,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Colors.white),
decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(TranslationBase.of(context).time),
Texts(getTime())
],
children: [Texts(TranslationBase.of(context).time), Texts(getTime())],
),
),
),
@ -245,27 +226,26 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
label: TranslationBase.of(context).save.toUpperCase(),
textColor: Colors.white,
onTap: () async {
if (_bloodSystolicValueController.text.isNotEmpty &&
_bloodDiastolicValueController.text.isNotEmpty) {
if (_bloodSystolicValueController.text.isNotEmpty && _bloodDiastolicValueController.text.isNotEmpty) {
GifLoaderDialogUtils.showMyDialog(context);
widget.model.addORUpdateDiabtecResult(
widget.model
.addORUpdateDiabtecResult(
isUpdate: widget.isUpdate,
bloodPressureDate:
'${bloodSugarDate.year}-${bloodSugarDate.month}-${bloodSugarDate.day} ${timeSugarDate.hour}:${timeSugarDate.minute}:00',
diastolicPressure:
_bloodDiastolicValueController.text.toString(),
systolicePressure:
_bloodSystolicValueController.text.toString(),
diastolicPressure: _bloodDiastolicValueController.text.toString(),
systolicePressure: _bloodSystolicValueController.text.toString(),
measuredArm: measuredArm,
).then((value) {
)
.then((value) {
GifLoaderDialogUtils.hideDialog(context);
if(widget.model.state == ViewState.BusyLocal)
if (widget.model.state == ViewState.BusyLocal)
AppToast.showErrorToast(message: widget.model.error);
else
Navigator.pop(context);
;
}).catchError((e){
;
}).catchError((e) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: widget.model.error);
});

Loading…
Cancel
Save