merge-requests/335/head
haroon amjad 3 years ago
commit 0d2a91c124

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

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

@ -0,0 +1,198 @@
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);
this.filterName = filterName;
}
}

@ -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/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/ClinicCategory.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/ClinicCategory.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart';
import 'package:diplomaticquarterapp/core/model/health_calcolator/get_doctor_by_time_model.dart';
import 'package:diplomaticquarterapp/core/model/health_calcolator/get_doctor_by_time_request_model.dart';
import 'package:diplomaticquarterapp/core/model/health_calcolator/get_doctor_list_calcolation_model.dart';
import 'package:diplomaticquarterapp/core/model/health_calcolator/get_doctor_list_calcolation_request_model.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart';
class BariatricsService extends BaseService { class BariatricsService extends BaseService {
List<ClinicCategory> clinicCategoryList = []; List<ClinicCategory> clinicCategoryList = [];
List<DiseasesByClinic> diseasesList = []; List<DiseasesByClinic> diseasesList = [];
List<GetDoctorListModel> doctorList = [];
List<DoctorListByTimeModel> doctorListByTime = [];
Future getClinicCategory() async { Future getClinicCategory() async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
var languageID = var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
body['ClinicID'] = 108; // hint: it is static depend on IONIC project body['ClinicID'] = 108; // hint: it is static depend on IONIC project
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
body['LanguageID'] = languageID == 'ar' ? 1 : 2; body['LanguageID'] = languageID == 'ar' ? 1 : 2;
await baseAppClient.post(GET_CLINIC_CATEGORY, await baseAppClient.post(GET_CLINIC_CATEGORY, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
clinicCategoryList.clear(); clinicCategoryList.clear();
if (response['ClinicCategoryList'] != null) if (response['ClinicCategoryList'] != null)
response['ClinicCategoryList'].forEach((city) { response['ClinicCategoryList'].forEach((city) {
@ -36,8 +40,7 @@ class BariatricsService extends BaseService {
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['ClinicID'] = 108; // hint: it is static depend on IONIC project body['ClinicID'] = 108; // hint: it is static depend on IONIC project
await baseAppClient.post(GET_DISEASE_BY_CLINIC_ID, await baseAppClient.post(GET_DISEASE_BY_CLINIC_ID, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
diseasesList.clear(); diseasesList.clear();
if (response['DiseasesByClinicList'] != null) if (response['DiseasesByClinicList'] != null)
response['DiseasesByClinicList'].forEach((city) { response['DiseasesByClinicList'].forEach((city) {
@ -51,8 +54,7 @@ class BariatricsService extends BaseService {
Future searchDoctorsByTime(DiseasesByClinic disease) async { Future searchDoctorsByTime(DiseasesByClinic disease) async {
hasError = false; hasError = false;
var languageID = var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['ClinicID'] = 108; // hint: it is static depend on IONIC project body['ClinicID'] = 108; // hint: it is static depend on IONIC project
@ -66,11 +68,36 @@ class BariatricsService extends BaseService {
body['Longitude'] = 0; body['Longitude'] = 0;
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
await baseAppClient.post(SEARCH_DOCTOR_BY_TIME, await baseAppClient.post(SEARCH_DOCTOR_BY_TIME, onSuccess: (dynamic response, int statusCode) {},
onSuccess: (dynamic response, int statusCode) { onFailure: (String error, int statusCode) {
}, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: body); }, 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());
}
} }

@ -7,12 +7,9 @@ import 'package:diplomaticquarterapp/core/service/base_service.dart';
class WeightService extends BaseService { class WeightService extends BaseService {
///Average ///Average
List<MonthWeightMeasurementResultAverage> List<MonthWeightMeasurementResultAverage> monthWeightMeasurementResultAverage = List();
monthWeightMeasurementResultAverage = List(); List<WeekWeightMeasurementResultAverage> weekWeightMeasurementResultAverage = List();
List<WeekWeightMeasurementResultAverage> weekWeightMeasurementResultAverage = List<YearWeightMeasurementResultAverage> yearWeightMeasurementResultAverage = List();
List();
List<YearWeightMeasurementResultAverage> yearWeightMeasurementResultAverage =
List();
///Result ///Result
List<WeightMeasurementResult> monthWeightMeasurementResult = List(); List<WeightMeasurementResult> monthWeightMeasurementResult = List();
@ -23,24 +20,20 @@ class WeightService extends BaseService {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
await baseAppClient.post(GET_WEIGHT_PRESSURE_RESULT_AVERAGE, await baseAppClient.post(GET_WEIGHT_PRESSURE_RESULT_AVERAGE, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
monthWeightMeasurementResultAverage.clear(); monthWeightMeasurementResultAverage.clear();
weekWeightMeasurementResultAverage.clear(); weekWeightMeasurementResultAverage.clear();
yearWeightMeasurementResultAverage.clear(); yearWeightMeasurementResultAverage.clear();
response['List_MonthWeightMeasurementResultAverage'].forEach((item) { response['List_MonthWeightMeasurementResultAverage'].forEach((item) {
monthWeightMeasurementResultAverage monthWeightMeasurementResultAverage.add(MonthWeightMeasurementResultAverage.fromJson(item));
.add(MonthWeightMeasurementResultAverage.fromJson(item));
}); });
response['List_WeekWeightMeasurementResultAverage'].forEach((item) { response['List_WeekWeightMeasurementResultAverage'].forEach((item) {
weekWeightMeasurementResultAverage weekWeightMeasurementResultAverage.add(WeekWeightMeasurementResultAverage.fromJson(item));
.add(WeekWeightMeasurementResultAverage.fromJson(item));
}); });
response['List_YearWeightMeasurementResultAverage'].forEach((item) { response['List_YearWeightMeasurementResultAverage'].forEach((item) {
yearWeightMeasurementResultAverage yearWeightMeasurementResultAverage.add(YearWeightMeasurementResultAverage.fromJson(item));
.add(YearWeightMeasurementResultAverage.fromJson(item));
}); });
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -50,8 +43,7 @@ class WeightService extends BaseService {
Future getWeightMeasurementResult() async { Future getWeightMeasurementResult() async {
hasError = false; hasError = false;
await baseAppClient.post(GET_WEIGHT_PRESSURE_RESULT, await baseAppClient.post(GET_WEIGHT_PRESSURE_RESULT, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
monthWeightMeasurementResult.clear(); monthWeightMeasurementResult.clear();
weekWeightMeasurementResult.clear(); weekWeightMeasurementResult.clear();
yearWeightMeasurementResult.clear(); yearWeightMeasurementResult.clear();
@ -61,8 +53,7 @@ class WeightService extends BaseService {
}); });
response['List_MonthWeightMeasurementResult'].forEach((item) { response['List_MonthWeightMeasurementResult'].forEach((item) {
monthWeightMeasurementResult monthWeightMeasurementResult.add(WeightMeasurementResult.fromJson(item));
.add(WeightMeasurementResult.fromJson(item));
}); });
response['List_YearWeightMeasurementResult'].forEach((item) { response['List_YearWeightMeasurementResult'].forEach((item) {
@ -74,8 +65,7 @@ class WeightService extends BaseService {
}, body: Map()); }, body: Map());
} }
addWeightResult( addWeightResult({String weightDate, String weightMeasured, int weightUnit}) async {
{String weightDate, String weightMeasured, int weightUnit}) async {
hasError = false; hasError = false;
super.error = ""; super.error = "";
@ -85,15 +75,14 @@ class WeightService extends BaseService {
body['weightUnit'] = weightUnit; body['weightUnit'] = weightUnit;
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
await baseAppClient.post(ADD_WEIGHT_PRESSURE_RESULT, await baseAppClient.post(ADD_WEIGHT_PRESSURE_RESULT, onSuccess: (response, statusCode) async {},
onSuccess: (response, statusCode) async {},
onFailure: (String error, int statusCode) { onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: body); }, body: body);
} }
updateWeightResult({int lineItemNo, int weightUnit,String weightMeasured,String weightDate}) async { updateWeightResult({int lineItemNo, int weightUnit, String weightMeasured, String weightDate}) async {
hasError = false; hasError = false;
super.error = ""; super.error = "";
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
@ -103,36 +92,36 @@ class WeightService extends BaseService {
body['WeightDate'] = weightDate; body['WeightDate'] = weightDate;
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
await baseAppClient.post(UPDATE_WEIGHT_PRESSURE_RESULT, await baseAppClient.post(UPDATE_WEIGHT_PRESSURE_RESULT, onSuccess: (response, statusCode) async {},
onSuccess: (response, statusCode) async {},
onFailure: (String error, int statusCode) { onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: body); }, body: body);
} }
Future sendReportByEmail() async { Future sendReportByEmail() async {
hasError = false; hasError = false;
super.error = ""; super.error = "";
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
body['to'] = user.emailAddress; body['to'] = user.emailAddress;
await baseAppClient.post(SEND_AVERAGE_BLOOD_WEIGHT_REPORT, await baseAppClient.post(SEND_AVERAGE_BLOOD_WEIGHT_REPORT, onSuccess: (response, statusCode) async {},
onSuccess: (response, statusCode) async {},
onFailure: (String error, int statusCode) { onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: body); }, body: body);
} }
deleteWeightResult({int lineItemNo, }) async { deleteWeightResult({
int lineItemNo,
}) async {
hasError = false; hasError = false;
super.error = ""; super.error = "";
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['LineItemNo'] = lineItemNo; body['LineItemNo'] = lineItemNo;
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
await baseAppClient.post(DEACTIVATE_WEIGHT_PRESSURE_RESULT, await baseAppClient.post(DEACTIVATE_WEIGHT_PRESSURE_RESULT, onSuccess: (response, statusCode) async {},
onSuccess: (response, statusCode) async {},
onFailure: (String error, int statusCode) { onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;

@ -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/ClinicCategory.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/ClinicCategory.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/ClinicCategory.dart';
import 'package:diplomaticquarterapp/core/model/health_calcolator/get_doctor_by_time_model.dart';
import 'package:diplomaticquarterapp/core/model/health_calcolator/get_doctor_list_calcolation_model.dart';
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart'; import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
@ -13,6 +15,9 @@ class BariatricsViewModel extends BaseViewModel {
List<ClinicCategory> get clinicCategoryList => _service.clinicCategoryList; List<ClinicCategory> get clinicCategoryList => _service.clinicCategoryList;
List<DiseasesByClinic> get diseasesList => _service.diseasesList; List<DiseasesByClinic> get diseasesList => _service.diseasesList;
List<GetDoctorListModel> get doctorList => _service.doctorList;
List<DoctorListByTimeModel> get doctorListByTime => _service.doctorListByTime;
List<DoctorsListTime> doctorLists = List();
void getClinicCategory() async { void getClinicCategory() async {
setState(ViewState.Busy); setState(ViewState.Busy);
@ -46,4 +51,27 @@ class BariatricsViewModel extends BaseViewModel {
setState(ViewState.Idle); 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) {
doctorLists[doctorLists.indexOf(patientLabOrdersClinic[0])].doctorsByTimeList.add(element);
} else {
doctorLists.add(DoctorsListTime(filterName: element.projectName, doctor: element));
}
});
setState(ViewState.Idle);
}
}
}
} }

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

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

@ -16,14 +16,11 @@ import '../../../core/viewModels/base_view_model.dart';
class WeightPressureViewModel extends BaseViewModel { class WeightPressureViewModel extends BaseViewModel {
WeightService weightService = locator<WeightService>(); WeightService weightService = locator<WeightService>();
List<WeightMeasurementResult> get monthWeightMeasurementResult => List<WeightMeasurementResult> get monthWeightMeasurementResult => weightService.monthWeightMeasurementResult;
weightService.monthWeightMeasurementResult;
List<WeightMeasurementResult> get weekWeightMeasurementResult => List<WeightMeasurementResult> get weekWeightMeasurementResult => weightService.weekWeightMeasurementResult;
weightService.weekWeightMeasurementResult;
List<WeightMeasurementResult> get yearWeightMeasurementResult => List<WeightMeasurementResult> get yearWeightMeasurementResult => weightService.yearWeightMeasurementResult;
weightService.yearWeightMeasurementResult;
List<TimeSeriesSales2> weightWeekTimeSeriesData = []; List<TimeSeriesSales2> weightWeekTimeSeriesData = [];
List<TimeSeriesSales3> weighMonthTimeSeriesData = []; List<TimeSeriesSales3> weighMonthTimeSeriesData = [];
@ -35,7 +32,7 @@ class WeightPressureViewModel extends BaseViewModel {
await weightService.getWeightMeasurementResult(); await weightService.getWeightMeasurementResult();
if (weightService.hasError) { if (weightService.hasError) {
error = weightService.error; error = weightService.error;
setState(ViewState.Error); setState(ViewState.ErrorLocal);
} else { } else {
weightService.weekWeightMeasurementResultAverage.forEach((element) { weightService.weekWeightMeasurementResultAverage.forEach((element) {
weightWeekTimeSeriesData.add(TimeSeriesSales2( weightWeekTimeSeriesData.add(TimeSeriesSales2(
@ -44,14 +41,10 @@ class WeightPressureViewModel extends BaseViewModel {
)); ));
}); });
for (int index = 0; for (int index = 0; index < weightService.monthWeightMeasurementResultAverage.length; index++) {
index < weightService.monthWeightMeasurementResultAverage.length;
index++) {
weighMonthTimeSeriesData.add(TimeSeriesSales3( weighMonthTimeSeriesData.add(TimeSeriesSales3(
index, index,
weightService weightService.monthWeightMeasurementResultAverage[index].weekAverageResult.toDouble(),
.monthWeightMeasurementResultAverage[index].weekAverageResult
.toDouble(),
)); ));
} }
@ -66,8 +59,7 @@ class WeightPressureViewModel extends BaseViewModel {
} }
} }
addWeightResult( addWeightResult({String weightDate, String weightMeasured, int weightUnit}) async {
{String weightDate, String weightMeasured, int weightUnit}) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
await weightService.addWeightResult( await weightService.addWeightResult(
weightDate: weightDate, weightDate: weightDate,
@ -82,6 +74,7 @@ class WeightPressureViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
} }
Future sendReportByEmail() async { Future sendReportByEmail() async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
@ -94,14 +87,10 @@ class WeightPressureViewModel extends BaseViewModel {
} }
} }
updateWeightResult({int lineItemNo, int weightUnit, String weightMeasured,String weightDate}) async { updateWeightResult({int lineItemNo, int weightUnit, String weightMeasured, String weightDate}) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
await weightService.updateWeightResult( await weightService.updateWeightResult(
lineItemNo: lineItemNo, lineItemNo: lineItemNo, weightMeasured: weightMeasured, weightUnit: weightUnit, weightDate: weightDate);
weightMeasured: weightMeasured,
weightUnit: weightUnit,
weightDate: weightDate
);
if (weightService.hasError) { if (weightService.hasError) {
error = weightService.error; error = weightService.error;
setState(ViewState.Error); setState(ViewState.Error);
@ -111,7 +100,9 @@ class WeightPressureViewModel extends BaseViewModel {
} }
} }
deleteWeightResult({int lineItemNo, }) async { deleteWeightResult({
int lineItemNo,
}) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
await weightService.deleteWeightResult( await weightService.deleteWeightResult(
lineItemNo: lineItemNo, lineItemNo: lineItemNo,

@ -22,7 +22,7 @@ class VaccineViewModel extends BaseViewModel {
await _vaccineService.getMyVaccine(); await _vaccineService.getMyVaccine();
if (_vaccineService.hasError) { if (_vaccineService.hasError) {
error = _vaccineService.error; error = _vaccineService.error;
setState(ViewState.ErrorLocal); setState(ViewState.Error);
} else } else
setState(ViewState.Idle); setState(ViewState.Idle);
} }

@ -292,7 +292,9 @@ class MobileNumberTextFiled extends StatelessWidget {
padding: EdgeInsets.all(5), padding: EdgeInsets.all(5),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15), color: Colors.white), borderRadius: BorderRadius.circular(15), color: Colors.white),
child: Row(children: <Widget>[ child: Row(
textDirection: TextDirection.ltr,
children: <Widget>[
Expanded( Expanded(
flex: 1, flex: 1,
child: Icon( child: Icon(

@ -3,12 +3,14 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/doctor_list.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -33,122 +35,117 @@ class _BariatricsPageState extends State<BariatricsPage> {
return BaseView<BariatricsViewModel>( return BaseView<BariatricsViewModel>(
onModelReady: (model) => model.getClinicCategory(), onModelReady: (model) => model.getClinicCategory(),
builder: (_, model, w) => builder: (_, model, w) => AppScaffold(
AppScaffold( isShowDecPage: false,
isShowAppBar: true, isShowAppBar: true,
appBarTitle: "${TranslationBase appBarTitle: "${TranslationBase.of(context).bariatrics}",
.of(context) baseViewModel: model,
.bariatrics}", body: Column(
baseViewModel: model, children: [
body: Column( Container(
children: [ margin: EdgeInsets.all(8.0),
Container( child: Center(
margin: EdgeInsets.all(8.0), child: Texts(TranslationBase.of(context).bariatricsHeaderMsg),
child: Center( ),
child: Texts(TranslationBase ),
.of(context) Expanded(
.bariatricsHeaderMsg), child: Container(
), margin: EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0),
), child: Row(
Expanded( children: [
child: Container( Expanded(
margin: EdgeInsets.symmetric( child: SingleChildScrollView(
horizontal: 16.0, vertical: 8.0), child: Column(
child: Row( children: [
children: [ ...model.diseasesList
Expanded( .map((item) => RadioListTile(
child: SingleChildScrollView(
child: Column(
children: [
...model.diseasesList
.map((item) =>
RadioListTile(
title: Texts("${item.diseases}"), title: Texts("${item.diseases}"),
activeColor: Colors.blue.shade700, activeColor: Colors.blue.shade700,
value: item.diseasesID, value: item.diseasesID,
groupValue: _selectedDisease != null groupValue: _selectedDisease != null ? _selectedDisease.diseasesID : -1,
? _selectedDisease.diseasesID selected: _selectedDisease != null
: -1, ? item.diseasesID == _selectedDisease.diseasesID
selected: _selectedDisease != null ? item : false,
.diseasesID ==
_selectedDisease.diseasesID : false,
onChanged: (val) { onChanged: (val) {
setState(() { setState(() {
_selectedDisease = item; _selectedDisease = item;
}); });
}, },
)) ))
.toList() .toList()
], ],
),
),
),
Image.asset(
_getImageName(widget.gender, widget.obeseResult,
projectProvider.isArabic),
fit: BoxFit.cover,
), ),
], ),
), ),
), Image.asset(
), _getImageName(widget.gender, widget.obeseResult, projectProvider.isArabic),
Container( fit: BoxFit.cover,
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16), ),
child: BorderedButton( ],
TranslationBase
.of(context)
.continues,
fontSize: SizeConfig.textMultiplier * 2.1,
textColor: Colors.white,
vPadding: 8,
hPadding: 8,
backgroundColor: Theme
.of(context)
.primaryColor,
radius: 8,
fontWeight: FontWeight.bold,
handler: () async {
await model.searchDoctorsByTime(_selectedDisease);
if(model.state == ViewState.ErrorLocal){
AppToast.showErrorToast(message: model.error);
}
// Navigator.push(
// context,
// MaterialPageRoute(builder: (context) => BariatricsPage()),
// );
},
),
),
Container(
margin: EdgeInsets.only(bottom: 16.0, left: 16, right: 16),
child: BorderedButton(
TranslationBase
.of(context)
.skip,
fontSize: SizeConfig.textMultiplier * 2.1,
textColor: Colors.blue,
vPadding: 8,
hPadding: 8,
backgroundColor: Color(0x00000000),
radius: 8,
hasBorder: true,
borderColor: Color(0x00000000),
fontWeight: FontWeight.bold,
handler: () async {
await model.searchDoctorsByTime(_selectedDisease);
if(model.state == ViewState.ErrorLocal){
AppToast.showErrorToast(message: model.error);
}
// Navigator.push(
// context,
// MaterialPageRoute(builder: (context) => BariatricsPage()),
// );
},
),
), ),
], ),
),
Container(
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
child: BorderedButton(
TranslationBase.of(context).continues,
fontSize: SizeConfig.textMultiplier * 2.1,
textColor: Colors.white,
vPadding: 8,
hPadding: 8,
backgroundColor: Theme.of(context).primaryColor,
radius: 8,
fontWeight: FontWeight.bold,
handler: () async {
Navigator.push(
context,
FadePage(page: DoctorList()),
);
// await model.searchDoctorsByTime(_selectedDisease);
// if (model.state == ViewState.ErrorLocal) {
// AppToast.showErrorToast(message: model.error);
// } else {}
// Navigator.push(
// context,
// MaterialPageRoute(builder: (context) => BariatricsPage()),
// );
},
),
),
Container(
margin: EdgeInsets.only(bottom: 16.0, left: 16, right: 16),
child: BorderedButton(
TranslationBase.of(context).skip,
fontSize: SizeConfig.textMultiplier * 2.1,
textColor: Colors.blue,
vPadding: 8,
hPadding: 8,
backgroundColor: Color(0x00000000),
radius: 8,
hasBorder: true,
borderColor: Color(0x00000000),
fontWeight: FontWeight.bold,
handler: () async {
Navigator.push(
context,
FadePage(page: DoctorList()),
);
await model.searchDoctorsByTime(_selectedDisease);
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( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false, isShowDecPage: false,
appBarTitle: appBarTitle: "${TranslationBase.of(context).bmi} ${TranslationBase.of(context).calcHealth}",
"${TranslationBase.of(context).bmi} ${TranslationBase.of(context).calcHealth}",
body: SingleChildScrollView( body: SingleChildScrollView(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
@ -159,8 +158,7 @@ class _BMICalculatorState extends State<BMICalculator> {
Row( Row(
children: [ children: [
Padding( Padding(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 8.0),
vertical: 10.0, horizontal: 8.0),
child: Center( child: Center(
child: Container( child: Container(
width: 60.0, width: 60.0,
@ -181,8 +179,7 @@ class _BMICalculatorState extends State<BMICalculator> {
Container( Container(
height: 38.0, height: 38.0,
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.center,
CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Container( Container(
@ -264,18 +261,15 @@ class _BMICalculatorState extends State<BMICalculator> {
color: Colors.grey.withOpacity(0.5), color: Colors.grey.withOpacity(0.5),
spreadRadius: 3, spreadRadius: 3,
blurRadius: 7, blurRadius: 7,
offset: offset: Offset(0, 3), // changes position of shadow
Offset(0, 3), // changes position of shadow
), ),
], ],
color: cmCard, color: cmCard,
borderRadius: BorderRadius.circular(3.0), borderRadius: BorderRadius.circular(3.0),
), ),
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(vertical: 0.0, horizontal: 18.0),
vertical: 0.0, horizontal: 18.0), child: Center(child: Texts(TranslationBase.of(context).cm)),
child: Center(
child: Texts(TranslationBase.of(context).cm)),
), ),
), ),
), ),
@ -296,16 +290,13 @@ class _BMICalculatorState extends State<BMICalculator> {
color: Colors.grey.withOpacity(0.5), color: Colors.grey.withOpacity(0.5),
spreadRadius: 3, spreadRadius: 3,
blurRadius: 7, blurRadius: 7,
offset: offset: Offset(0, 3), // changes position of shadow
Offset(0, 3), // changes position of shadow
), ),
], ],
), ),
child: Padding( child: Padding(
padding: padding: const EdgeInsets.symmetric(horizontal: 16.0),
const EdgeInsets.symmetric(horizontal: 16.0), child: Center(child: Texts(TranslationBase.of(context).feet)),
child: Center(
child: Texts(TranslationBase.of(context).feet)),
), ),
), ),
), ),
@ -337,8 +328,7 @@ class _BMICalculatorState extends State<BMICalculator> {
Row( Row(
children: [ children: [
Padding( Padding(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 8.0),
vertical: 10.0, horizontal: 8.0),
child: Center( child: Center(
child: Container( child: Container(
width: 60.0, width: 60.0,
@ -359,8 +349,7 @@ class _BMICalculatorState extends State<BMICalculator> {
Container( Container(
height: 38.0, height: 38.0,
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.center,
CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Container( Container(
@ -442,18 +431,15 @@ class _BMICalculatorState extends State<BMICalculator> {
color: Colors.grey.withOpacity(0.5), color: Colors.grey.withOpacity(0.5),
spreadRadius: 3, spreadRadius: 3,
blurRadius: 7, blurRadius: 7,
offset: offset: Offset(0, 3), // changes position of shadow
Offset(0, 3), // changes position of shadow
), ),
], ],
color: kgCard, color: kgCard,
borderRadius: BorderRadius.circular(3.0), borderRadius: BorderRadius.circular(3.0),
), ),
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(vertical: 0.0, horizontal: 18.0),
vertical: 0.0, horizontal: 18.0), child: Center(child: Texts(TranslationBase.of(context).kg)),
child: Center(
child: Texts(TranslationBase.of(context).kg)),
), ),
), ),
), ),
@ -474,17 +460,13 @@ class _BMICalculatorState extends State<BMICalculator> {
color: Colors.grey.withOpacity(0.5), color: Colors.grey.withOpacity(0.5),
spreadRadius: 3, spreadRadius: 3,
blurRadius: 7, blurRadius: 7,
offset: offset: Offset(0, 3), // changes position of shadow
Offset(0, 3), // changes position of shadow
), ),
], ],
), ),
child: Padding( child: Padding(
padding: padding: const EdgeInsets.symmetric(horizontal: 16.0),
const EdgeInsets.symmetric(horizontal: 16.0), child: Center(child: Texts(TranslationBase.of(context).pound)),
child: Center(
child:
Texts(TranslationBase.of(context).pound)),
), ),
), ),
), ),

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

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

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

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

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

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

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

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

@ -0,0 +1,126 @@
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/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package: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 Padding(
padding: EdgeInsets.symmetric(horizontal: 16.0, vertical: 10.0),
child: Container(
//height: MediaQuery.of(context).size.height * 0.09,
decoration: BoxDecoration(color: Colors.white),
child: ExpansionTile(
title: Padding(
padding: EdgeInsets.all(21.0),
child: Texts(model.doctorLists[index].filterName),
),
children: model.doctorLists[index].doctorsByTimeList
.map((doctor) => 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(doctor.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 (doctor.doctorTitle != null)
Text(doctor.doctorTitle + " " + doctor.name,
style: TextStyle(
fontSize: 14.0,
color: Colors.grey[700],
letterSpacing: 1.0)),
Container(
margin: EdgeInsets.only(top: 3.0),
child: Text(doctor.clinicName != null ? doctor.clinicName : "",
style: TextStyle(
fontSize: 12.0,
color: Colors.grey[600],
letterSpacing: 1.0)),
),
Container(
margin: EdgeInsets.only(top: 3.0),
child: Text(doctor.projectName,
style: TextStyle(
fontSize: 12.0,
color: Colors.grey[600],
letterSpacing: 1.0)),
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
RatingBar.readOnly(
initialRating: doctor.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(doctor.nationalityFlagURL,
width: 25.0, height: 25.0),
),
],
),
],
),
),
),
],
),
),
))
.toList(),
),
),
);
}),
));
}
}

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

@ -1,6 +1,8 @@
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/doctor_list.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
@ -9,8 +11,7 @@ class OvulationResult extends StatelessWidget {
var dateTo; var dateTo;
var conceivedDate; var conceivedDate;
var deliveryDue; var deliveryDue;
OvulationResult( OvulationResult({this.dateFrom, this.dateTo, this.deliveryDue, this.conceivedDate});
{this.dateFrom, this.dateTo, this.deliveryDue, this.conceivedDate});
//var newFormat = DateFormat("yy-MM-dd"); //var newFormat = DateFormat("yy-MM-dd");
@override @override
@ -84,6 +85,12 @@ class OvulationResult extends StatelessWidget {
width: 350, width: 350,
child: Button( child: Button(
label: 'See List Of Doctors', label: 'See List Of Doctors',
onTap: () {
Navigator.push(
context,
FadePage(page: DoctorList()),
);
},
), ),
), ),
], ],

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

@ -8,8 +8,7 @@ class MyWebView extends StatelessWidget {
final String title; final String title;
final String selectedUrl; final String selectedUrl;
final Completer<WebViewController> _controller = final Completer<WebViewController> _controller = Completer<WebViewController>();
Completer<WebViewController>();
MyWebView({ MyWebView({
@required this.title, @required this.title,
@ -21,17 +20,12 @@ class MyWebView extends StatelessWidget {
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: title, appBarTitle: title,
body: WebView(
body:
WebView(
initialUrl: selectedUrl, initialUrl: selectedUrl,
javascriptMode: JavascriptMode.unrestricted, javascriptMode: JavascriptMode.unrestricted,
onWebViewCreated: (WebViewController webViewController) { onWebViewCreated: (WebViewController webViewController) {
_controller.complete(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:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'health_calculator/bmi_calculator/bmi_calculator.dart'; import 'health_calculator/bmi_calculator/bmi_calculator.dart';
import 'health_calculator/bmr_calculator/bmr_calculator.dart'; import 'health_calculator/bmr_calculator/bmr_calculator.dart';
import 'health_calculator/calorie_calculator/calorie_calculator.dart'; import 'health_calculator/calorie_calculator/calorie_calculator.dart';
@ -21,8 +20,7 @@ class HealthCalculators extends StatefulWidget {
_HealthCalculatorsState createState() => _HealthCalculatorsState(); _HealthCalculatorsState createState() => _HealthCalculatorsState();
} }
class _HealthCalculatorsState extends State<HealthCalculators> class _HealthCalculatorsState extends State<HealthCalculators> with SingleTickerProviderStateMixin {
with SingleTickerProviderStateMixin {
TabController _tabController; TabController _tabController;
void initState() { void initState() {
super.initState(); super.initState();
@ -67,22 +65,19 @@ class _HealthCalculatorsState extends State<HealthCalculators>
indicatorWeight: 4.0, indicatorWeight: 4.0,
indicatorColor: Colors.red, indicatorColor: Colors.red,
labelColor: Theme.of(context).buttonColor, labelColor: Theme.of(context).buttonColor,
labelPadding: labelPadding: EdgeInsets.symmetric(horizontal: 13.0, vertical: 2.0),
EdgeInsets.symmetric(horizontal: 13.0, vertical: 2.0),
unselectedLabelColor: Colors.grey, unselectedLabelColor: Colors.grey,
tabs: <Widget>[ tabs: <Widget>[
Container( Container(
width: MediaQuery.of(context).size.width * 0.35, width: MediaQuery.of(context).size.width * 0.35,
child: Center( child: Center(
child: Texts( child: Texts(TranslationBase.of(context).generalHealth),
TranslationBase.of(context).generalHealth),
), ),
), ),
Container( Container(
width: MediaQuery.of(context).size.width * 0.35, width: MediaQuery.of(context).size.width * 0.35,
child: Center( child: Center(
child: child: Texts(TranslationBase.of(context).womanHealth),
Texts(TranslationBase.of(context).womanHealth),
), ),
), ),
], ],
@ -121,8 +116,7 @@ class _HealthCalculatorsState extends State<HealthCalculators>
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).bmi, title: TranslationBase.of(context).bmi,
imagePath: 'bmi_health_calculator.png', imagePath: 'bmi_health_calculator.png',
subTitle: subTitle: TranslationBase.of(context).calcHealth,
TranslationBase.of(context).calcHealth,
), ),
), ),
), ),
@ -140,8 +134,7 @@ class _HealthCalculatorsState extends State<HealthCalculators>
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).calories, title: TranslationBase.of(context).calories,
imagePath: 'calories-calculator.png', imagePath: 'calories-calculator.png',
subTitle: subTitle: TranslationBase.of(context).calcHealth,
TranslationBase.of(context).calcHealth,
), ),
), ),
), ),
@ -163,8 +156,7 @@ class _HealthCalculatorsState extends State<HealthCalculators>
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).bmr, title: TranslationBase.of(context).bmr,
imagePath: 'BMR_calculator.png', imagePath: 'BMR_calculator.png',
subTitle: subTitle: TranslationBase.of(context).calcHealth,
TranslationBase.of(context).calcHealth,
), ),
), ),
), ),
@ -220,11 +212,9 @@ class _HealthCalculatorsState extends State<HealthCalculators>
); );
}, },
child: MedicalProfileItem( child: MedicalProfileItem(
title: title: TranslationBase.of(context).carbohydrate,
TranslationBase.of(context).carbohydrate,
imagePath: 'carb_protein.png', imagePath: 'carb_protein.png',
subTitle: subTitle: TranslationBase.of(context).proteinFat,
TranslationBase.of(context).proteinFat,
), ),
), ),
), ),

@ -415,7 +415,7 @@ class _HomePageState extends State<HomePage> {
height: 40, height: 40,
), ),
Texts( Texts(
"${model.heightCm}", "${model.heightCm} ${TranslationBase.of(context).cm}",
color: Colors.white, color: Colors.white,
fontSize: 17, fontSize: 17,
) )
@ -433,7 +433,7 @@ class _HomePageState extends State<HomePage> {
width: 25, width: 25,
height: 40, height: 40,
), ),
Texts('${model.weightKg}', Texts('${model.weightKg} ${TranslationBase.of(context).kg}',
color: Colors.white, color: Colors.white,
fontSize: 17) fontSize: 17)
], ],
@ -444,8 +444,6 @@ class _HomePageState extends State<HomePage> {
), ),
Expanded( Expanded(
child: Row( child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
Image.asset( Image.asset(
'assets/images/blood_icon.png', 'assets/images/blood_icon.png',
@ -455,6 +453,7 @@ class _HomePageState extends State<HomePage> {
Texts( Texts(
'${model.booldType}', '${model.booldType}',
color: Colors.white, color: Colors.white,
fontSize: 17
) )
], ],
), ),

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

@ -28,46 +28,52 @@ class WeightMonthlyPage extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
body: model.weighMonthTimeSeriesData.isEmpty?Container(child: Center(child: Texts(TranslationBase.of(context).noDataAvailable),),):ListView( isShowDecPage: false,
children: [ body: model.weighMonthTimeSeriesData.isEmpty
Container( ? Container(
width: double.maxFinite, child: Center(
color: Colors.white, child: Texts(TranslationBase.of(context).noDataAvailable),
child: MonthLineChartCurved( ),
horizontalInterval: 1.0, )
title: TranslationBase.of(context).weight, : ListView(
timeSeries: model.weighMonthTimeSeriesData, children: [
indexes: model.weighMonthTimeSeriesData.length ~/ 5.5, Container(
)), width: double.maxFinite,
SizedBox( color: Colors.white,
height: 12, child: MonthLineChartCurved(
), horizontalInterval: 1.0,
Padding( title: TranslationBase.of(context).weight,
padding: const EdgeInsets.all(8.0), timeSeries: model.weighMonthTimeSeriesData,
child: Texts(TranslationBase.of(context).details), indexes: model.weighMonthTimeSeriesData.length ~/ 5.5,
), )),
Container( SizedBox(
padding: EdgeInsets.all(10), height: 12,
color: Colors.transparent, ),
child: Column( Padding(
crossAxisAlignment: CrossAxisAlignment.start, padding: const EdgeInsets.all(8.0),
children: <Widget>[ child: Texts(TranslationBase.of(context).details),
Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 2.0, color: Colors.grey[300]),
),
children: fullData(context, projectViewModel, model),
), ),
Container(
padding: EdgeInsets.all(10),
color: Colors.transparent,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 2.0, color: Colors.grey[300]),
),
children: fullData(context, projectViewModel, model),
),
],
),
)
], ],
), ),
)
],
),
); );
} }
List<TableRow> fullData(BuildContext context, List<TableRow> fullData(BuildContext context, ProjectViewModel projectViewModel, WeightPressureViewModel model) {
ProjectViewModel projectViewModel, WeightPressureViewModel model) {
List<TableRow> tableRow = []; List<TableRow> tableRow = [];
tableRow.add( tableRow.add(
TableRow( TableRow(
@ -76,12 +82,8 @@ class WeightMonthlyPage extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic topLeft: projectViewModel.isArabic ? Radius.circular(0.0) : Radius.circular(10.0),
? Radius.circular(0.0) topRight: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0.0),
: Radius.circular(10.0),
topRight: projectViewModel.isArabic
? Radius.circular(10.0)
: Radius.circular(0.0),
), ),
), ),
child: Center( child: Center(
@ -109,12 +111,8 @@ class WeightMonthlyPage extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0.0),
? Radius.circular(10.0) topRight: projectViewModel.isArabic ? Radius.circular(0.0) : Radius.circular(10.0),
: Radius.circular(0.0),
topRight: projectViewModel.isArabic
? Radius.circular(0.0)
: Radius.circular(10.0),
), ),
), ),
child: Center( child: Center(

@ -1,5 +1,3 @@
import 'package:diplomaticquarterapp/core/model/my_trakers/chartData/WeekChartDate.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/weight/WeightMeasurementResult.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/weight_pressure_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/weight_pressure_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/LineChartCurved.dart'; import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/LineChartCurved.dart';
@ -26,47 +24,57 @@ class WeightWeeklyPage extends StatelessWidget {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
body: model.weightWeekTimeSeriesData.isEmpty?Container(child: Center(child: Texts(TranslationBase.of(context).noDataAvailable),),):ListView( isShowDecPage: false,
children: [ body: model.weightWeekTimeSeriesData.isEmpty
Container( ? Container(
margin: EdgeInsets.only(top: 12, left: 8, right: 8), child: Center(
color: Colors.white, child: Container(
child: LineChartCurved( child: Center(
horizontalInterval: 1.0, child: Texts(TranslationBase.of(context).noDataAvailable),
title: TranslationBase.of(context).weight,
timeSeries: model.weightWeekTimeSeriesData,
indexes: model.weightWeekTimeSeriesData.length ~/ 5.5,
),
),
SizedBox(
height: 12,
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(TranslationBase.of(context).details),
),
Container(
padding: EdgeInsets.all(10),
color: Colors.transparent,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 2.0, color: Colors.grey[300]),
), ),
children: fullData(context, projectViewModel, model),
), ),
),
)
: ListView(
children: [
Container(
margin: EdgeInsets.only(top: 12, left: 8, right: 8),
color: Colors.white,
child: LineChartCurved(
horizontalInterval: 1.0,
title: TranslationBase.of(context).weight,
timeSeries: model.weightWeekTimeSeriesData,
indexes: model.weightWeekTimeSeriesData.length ~/ 5.5 ?? 0,
),
),
SizedBox(
height: 12,
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(TranslationBase.of(context).details),
),
Container(
padding: EdgeInsets.all(10),
color: Colors.transparent,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 2.0, color: Colors.grey[300]),
),
children: fullData(context, projectViewModel, model),
),
],
),
)
], ],
), ),
)
],
),
); );
} }
List<TableRow> fullData(BuildContext context, List<TableRow> fullData(BuildContext context, ProjectViewModel projectViewModel, WeightPressureViewModel model) {
ProjectViewModel projectViewModel, WeightPressureViewModel model) {
List<TableRow> tableRow = []; List<TableRow> tableRow = [];
tableRow.add( tableRow.add(
TableRow( TableRow(
@ -75,12 +83,8 @@ class WeightWeeklyPage extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic topLeft: projectViewModel.isArabic ? Radius.circular(0.0) : Radius.circular(10.0),
? Radius.circular(0.0) topRight: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0.0),
: Radius.circular(10.0),
topRight: projectViewModel.isArabic
? Radius.circular(10.0)
: Radius.circular(0.0),
), ),
), ),
child: Center( child: Center(
@ -120,12 +124,8 @@ class WeightWeeklyPage extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0.0),
? Radius.circular(10.0) topRight: projectViewModel.isArabic ? Radius.circular(0.0) : Radius.circular(10.0),
: Radius.circular(0.0),
topRight: projectViewModel.isArabic
? Radius.circular(0.0)
: Radius.circular(10.0),
), ),
), ),
child: Center( child: Center(

@ -18,55 +18,61 @@ import 'package:provider/provider.dart';
class WeightYearPage extends StatelessWidget { class WeightYearPage extends StatelessWidget {
final WeightPressureViewModel model; final WeightPressureViewModel model;
const WeightYearPage({
const WeightYearPage({Key key, this.model, }) Key key,
: super(key: key); this.model,
}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
body: model.weightYearTimeSeriesData.isEmpty ? Container(child: Center(child: Texts(TranslationBase.of(context).noDataAvailable),),) : ListView( isShowDecPage: false,
children: [ body: model.weightYearTimeSeriesData.isEmpty
Container( ? Container(
width: double.maxFinite, child: Center(
color: Colors.white, child: Texts(TranslationBase.of(context).noDataAvailable),
child: LineChartCurved( ),
horizontalInterval: 2.0, )
title: TranslationBase.of(context).weight, : ListView(
timeSeries: model.weightYearTimeSeriesData, children: [
indexes: model.weightYearTimeSeriesData.length ~/ 5.5, Container(
) width: double.maxFinite,
), color: Colors.white,
SizedBox( child: LineChartCurved(
height: 12, horizontalInterval: 2.0,
), title: TranslationBase.of(context).weight,
Padding( timeSeries: model.weightYearTimeSeriesData,
padding: const EdgeInsets.all(8.0), indexes: model.weightYearTimeSeriesData.length ~/ 5.5 ?? "",
child: Texts(TranslationBase.of(context).details), )),
), SizedBox(
Container( height: 12,
padding: EdgeInsets.all(10),
color: Colors.transparent,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 2.0, color: Colors.grey[300]),
),
children: fullData(context, projectViewModel, model),
), ),
Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(TranslationBase.of(context).details),
),
Container(
padding: EdgeInsets.all(10),
color: Colors.transparent,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 2.0, color: Colors.grey[300]),
),
children: fullData(context, projectViewModel, model),
),
],
),
)
], ],
), ),
)
],
),
); );
} }
List<TableRow> fullData(BuildContext context, List<TableRow> fullData(BuildContext context, ProjectViewModel projectViewModel, WeightPressureViewModel model) {
ProjectViewModel projectViewModel, WeightPressureViewModel model) {
List<TableRow> tableRow = []; List<TableRow> tableRow = [];
tableRow.add( tableRow.add(
TableRow( TableRow(
@ -75,12 +81,8 @@ class WeightYearPage extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic topLeft: projectViewModel.isArabic ? Radius.circular(0.0) : Radius.circular(10.0),
? Radius.circular(0.0) topRight: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0.0),
: Radius.circular(10.0),
topRight: projectViewModel.isArabic
? Radius.circular(10.0)
: Radius.circular(0.0),
), ),
), ),
child: Center( child: Center(
@ -108,12 +110,8 @@ class WeightYearPage extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0.0),
? Radius.circular(10.0) topRight: projectViewModel.isArabic ? Radius.circular(0.0) : Radius.circular(10.0),
: Radius.circular(0.0),
topRight: projectViewModel.isArabic
? Radius.circular(0.0)
: Radius.circular(10.0),
), ),
), ),
child: Center( child: Center(
@ -128,7 +126,7 @@ class WeightYearPage extends StatelessWidget {
), ),
); );
model.yearWeightMeasurementResult.forEach( model.yearWeightMeasurementResult.forEach(
(diabtec) { (diabtec) {
tableRow.add( tableRow.add(
TableRow( TableRow(
children: [ children: [

@ -42,12 +42,10 @@ class AddBloodPressurePage extends StatefulWidget {
class _AddBloodPressurePageState extends State<AddBloodPressurePage> { class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
TextEditingController _bloodSystolicValueController = TextEditingController(); TextEditingController _bloodSystolicValueController = TextEditingController();
TextEditingController _bloodDiastolicValueController = TextEditingController _bloodDiastolicValueController = TextEditingController();
TextEditingController();
DateTime bloodSugarDate = DateTime.now(); DateTime bloodSugarDate = DateTime.now();
DateTime timeSugarDate = DateTime.now(); DateTime timeSugarDate = DateTime.now();
int measuredArm = 1; int measuredArm = 1;
bool isButtonDisabled = false;
final List<String> measureTimeEnList = [ final List<String> measureTimeEnList = [
'Left', 'Left',
'Right', 'Right',
@ -71,7 +69,6 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
measuredArm = measureTimeArList.indexOf(widget.measureTimeSelectedType); measuredArm = measureTimeArList.indexOf(widget.measureTimeSelectedType);
_bloodSystolicValueController.text = widget.bloodSystolicValue; _bloodSystolicValueController.text = widget.bloodSystolicValue;
_bloodDiastolicValueController.text = widget.bloodDiastolicValue; _bloodDiastolicValueController.text = widget.bloodDiastolicValue;
validateForm();
} }
} }
@ -81,9 +78,7 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: widget.isUpdate appBarTitle: widget.isUpdate ? TranslationBase.of(context).update : TranslationBase.of(context).add,
? TranslationBase.of(context).update
: TranslationBase.of(context).add,
appBarIcons: widget.isUpdate appBarIcons: widget.isUpdate
? [ ? [
IconButton( IconButton(
@ -99,14 +94,10 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
ConfirmDialog.closeAlertDialog(context); ConfirmDialog.closeAlertDialog(context);
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
widget.model widget.model.deactivateDiabeticStatus(lineItemNo: widget.lineItemNo).then((value) {
.deactivateDiabeticStatus(
lineItemNo: widget.lineItemNo)
.then((value) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (widget.model.state == ViewState.ErrorLocal) if (widget.model.state == ViewState.ErrorLocal)
AppToast.showErrorToast( AppToast.showErrorToast(message: widget.model.error);
message: widget.model.error);
else else
Navigator.pop(context); Navigator.pop(context);
}).catchError((e) { }).catchError((e) {
@ -133,8 +124,6 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
hintText: TranslationBase.of(context).systolicAdd, hintText: TranslationBase.of(context).systolicAdd,
controller: _bloodSystolicValueController, controller: _bloodSystolicValueController,
keyboardType: TextInputType.number, keyboardType: TextInputType.number,
maxLength: 3,
onChanged: (value) => validateForm(),
), ),
SizedBox( SizedBox(
height: 8, height: 8,
@ -143,25 +132,19 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
hintText: TranslationBase.of(context).diastolicAdd, hintText: TranslationBase.of(context).diastolicAdd,
controller: _bloodDiastolicValueController, controller: _bloodDiastolicValueController,
keyboardType: TextInputType.number, keyboardType: TextInputType.number,
maxLength: 3,
onChanged: (value) => validateForm(),
), ),
SizedBox( SizedBox(
height: 8, height: 8,
), ),
InkWell( InkWell(
onTap: () { onTap: () {
confirmSelectMeasureTimeDialog(projectViewModel.isArabic confirmSelectMeasureTimeDialog(projectViewModel.isArabic ? measureTimeEnList : measureTimeArList);
? measureTimeEnList
: measureTimeArList);
}, },
child: Container( child: Container(
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
width: double.infinity, width: double.infinity,
height: 65, height: 65,
decoration: BoxDecoration( decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white),
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
@ -188,17 +171,13 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
bloodSugarDate = date; bloodSugarDate = date;
}, },
); );
}, }, currentTime: bloodSugarDate, locale: projectViewModel.localeType);
currentTime: bloodSugarDate,
locale: projectViewModel.localeType);
}, },
child: Container( child: Container(
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
width: double.infinity, width: double.infinity,
height: 65, height: 65,
decoration: BoxDecoration( decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white),
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
@ -213,30 +192,22 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
), ),
InkWell( InkWell(
onTap: () { onTap: () {
DatePicker.showTimePicker(context, showTitleActions: true, DatePicker.showTimePicker(context, showTitleActions: true, onConfirm: (date) {
onConfirm: (date) {
setState( setState(
() { () {
timeSugarDate = date; timeSugarDate = date;
}, },
); );
}, }, currentTime: timeSugarDate, locale: projectViewModel.localeType);
currentTime: timeSugarDate,
locale: projectViewModel.localeType);
}, },
child: Container( child: Container(
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
width: double.infinity, width: double.infinity,
height: 65, height: 65,
decoration: BoxDecoration( decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white),
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [Texts(TranslationBase.of(context).time), Texts(getTime())],
Texts(TranslationBase.of(context).time),
Texts(getTime())
],
), ),
), ),
), ),
@ -254,12 +225,8 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
loading: widget.model.state == ViewState.BusyLocal, loading: widget.model.state == ViewState.BusyLocal,
label: TranslationBase.of(context).save.toUpperCase(), label: TranslationBase.of(context).save.toUpperCase(),
textColor: Colors.white, textColor: Colors.white,
color: isButtonDisabled
? Colors.grey[900]
: Colors.grey,
onTap: () async { onTap: () async {
if (_bloodSystolicValueController.text.isNotEmpty && if (_bloodSystolicValueController.text.isNotEmpty && _bloodDiastolicValueController.text.isNotEmpty) {
_bloodDiastolicValueController.text.isNotEmpty) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
widget.model widget.model
@ -267,10 +234,8 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
isUpdate: widget.isUpdate, isUpdate: widget.isUpdate,
bloodPressureDate: bloodPressureDate:
'${bloodSugarDate.year}-${bloodSugarDate.month}-${bloodSugarDate.day} ${timeSugarDate.hour}:${timeSugarDate.minute}:00', '${bloodSugarDate.year}-${bloodSugarDate.month}-${bloodSugarDate.day} ${timeSugarDate.hour}:${timeSugarDate.minute}:00',
diastolicPressure: diastolicPressure: _bloodDiastolicValueController.text.toString(),
_bloodDiastolicValueController.text.toString(), systolicePressure: _bloodSystolicValueController.text.toString(),
systolicePressure:
_bloodSystolicValueController.text.toString(),
measuredArm: measuredArm, measuredArm: measuredArm,
) )
.then((value) { .then((value) {
@ -310,43 +275,9 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
setState(() { setState(() {
measureTimeSelectedType = value; measureTimeSelectedType = value;
measuredArm = list.indexOf(value); measuredArm = list.indexOf(value);
validateForm();
}); });
}, },
), ),
); );
} }
void validateForm() {
print("_bloodSystolicValueController "+_bloodSystolicValueController.text.length.toString());
if (measureTimeSelectedType != 'Left Arm' &&
_bloodSystolicValueController.text.length > 0 &&
_bloodDiastolicValueController.text.length > 0) {
setState(() {
isButtonDisabled = true;
});
} else {
setState(() {
isButtonDisabled = false;
});
}
// if(measureTimeSelectedType == 'Left Arm'){
// setState(() {
// isButtonDisabled = false;
// });
// }else if(_bloodSystolicValueController.text.length < 0){
// setState(() {
// isButtonDisabled = false;
// });
// }else if(_bloodDiastolicValueController.text.length < 0){
// setState(() {
// isButtonDisabled = false;
// });
// }else{
// setState(() {
// isButtonDisabled = true;
// });
// }
}
} }

@ -17,8 +17,7 @@ class BloodYearPage extends StatelessWidget {
final List<DiabtecPatientResult> diabtecPatientResult; final List<DiabtecPatientResult> diabtecPatientResult;
final List<TimeSeriesSales2> timeSeriesData; final List<TimeSeriesSales2> timeSeriesData;
const BloodYearPage({Key key, this.diabtecPatientResult, this.timeSeriesData}) const BloodYearPage({Key key, this.diabtecPatientResult, this.timeSeriesData}) : super(key: key);
: super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -38,7 +37,7 @@ class BloodYearPage extends StatelessWidget {
child: LineChartCurved( child: LineChartCurved(
title: 'Sugar', title: 'Sugar',
timeSeries: timeSeriesData, timeSeries: timeSeriesData,
indexes: timeSeriesData.length ~/ 5.5, indexes: timeSeriesData.length ~/ 5.5 ?? 0,
)), )),
SizedBox( SizedBox(
height: 12, height: 12,
@ -55,8 +54,7 @@ class BloodYearPage extends StatelessWidget {
children: <Widget>[ children: <Widget>[
Table( Table(
border: TableBorder.symmetric( border: TableBorder.symmetric(
inside: inside: BorderSide(width: 2.0, color: Colors.grey[300]),
BorderSide(width: 2.0, color: Colors.grey[300]),
), ),
children: fullData(context, projectViewModel), children: fullData(context, projectViewModel),
), ),
@ -68,8 +66,7 @@ class BloodYearPage extends StatelessWidget {
); );
} }
List<TableRow> fullData( List<TableRow> fullData(BuildContext context, ProjectViewModel projectViewModel) {
BuildContext context, ProjectViewModel projectViewModel) {
List<TableRow> tableRow = []; List<TableRow> tableRow = [];
tableRow.add( tableRow.add(
TableRow( TableRow(
@ -79,12 +76,8 @@ class BloodYearPage extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic topLeft: projectViewModel.isArabic ? Radius.circular(0.0) : Radius.circular(10.0),
? Radius.circular(0.0) topRight: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0.0),
: Radius.circular(10.0),
topRight: projectViewModel.isArabic
? Radius.circular(10.0)
: Radius.circular(0.0),
), ),
), ),
child: Center( child: Center(
@ -130,12 +123,8 @@ class BloodYearPage extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0.0),
? Radius.circular(10.0) topRight: projectViewModel.isArabic ? Radius.circular(0.0) : Radius.circular(10.0),
: Radius.circular(0.0),
topRight: projectViewModel.isArabic
? Radius.circular(0.0)
: Radius.circular(10.0),
), ),
), ),
child: Center( child: Center(

@ -15,6 +15,7 @@ class MyTrackers extends StatelessWidget {
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).myTracker, appBarTitle: TranslationBase.of(context).myTracker,
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
@ -27,22 +28,24 @@ class MyTrackers extends StatelessWidget {
children: [ children: [
Expanded( Expanded(
child: InkWell( child: InkWell(
onTap: ()=> Navigator.push(context, FadePage(page: BloodSugarHomePage())), onTap: () => Navigator.push(context, FadePage(page: BloodSugarHomePage())),
child: Container( child: Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
width: MediaQuery.of(context).size.width*0.35, width: MediaQuery.of(context).size.width * 0.35,
height:MediaQuery.of(context).size.width*0.35 , height: MediaQuery.of(context).size.width * 0.35,
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.rectangle, shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white),
borderRadius: BorderRadius.circular(8),
color: Colors.white
),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Image.asset('assets/tracker/blood-suger.png',width: 60.0,), Image.asset(
SizedBox(height: 15,), 'assets/tracker/blood-suger.png',
width: 60.0,
),
SizedBox(
height: 15,
),
Texts(TranslationBase.of(context).bloodSugar), Texts(TranslationBase.of(context).bloodSugar),
], ],
), ),
@ -51,22 +54,24 @@ class MyTrackers extends StatelessWidget {
), ),
Expanded( Expanded(
child: InkWell( child: InkWell(
onTap: ()=> Navigator.push(context, FadePage(page: BloodPressureHomePage())), onTap: () => Navigator.push(context, FadePage(page: BloodPressureHomePage())),
child: Container( child: Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
width: MediaQuery.of(context).size.width*0.35, width: MediaQuery.of(context).size.width * 0.35,
height:MediaQuery.of(context).size.width*0.35 , height: MediaQuery.of(context).size.width * 0.35,
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.rectangle, shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white),
borderRadius: BorderRadius.circular(8),
color: Colors.white
),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Image.asset('assets/tracker/blood-pressure.png',width: 60.0,), Image.asset(
SizedBox(height: 15,), 'assets/tracker/blood-pressure.png',
width: 60.0,
),
SizedBox(
height: 15,
),
Texts(TranslationBase.of(context).bloodPressure), Texts(TranslationBase.of(context).bloodPressure),
], ],
), ),
@ -80,22 +85,24 @@ class MyTrackers extends StatelessWidget {
children: [ children: [
Expanded( Expanded(
child: InkWell( child: InkWell(
onTap: ()=> Navigator.push(context, FadePage(page: WeightHomePage())), onTap: () => Navigator.push(context, FadePage(page: WeightHomePage())),
child: Container( child: Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
width: MediaQuery.of(context).size.width*0.35, width: MediaQuery.of(context).size.width * 0.35,
height:MediaQuery.of(context).size.width*0.35 , height: MediaQuery.of(context).size.width * 0.35,
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.rectangle, shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white),
borderRadius: BorderRadius.circular(8),
color: Colors.white
),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Image.asset('assets/tracker/weight.png',width: 60.0,), Image.asset(
SizedBox(height: 15,), 'assets/tracker/weight.png',
width: 60.0,
),
SizedBox(
height: 15,
),
Texts(TranslationBase.of(context).weight), Texts(TranslationBase.of(context).weight),
], ],
), ),

@ -61,15 +61,13 @@ class ReportListWidget extends StatelessWidget {
), ),
Texts(reportList[index].projectName), Texts(reportList[index].projectName),
Texts(reportList[index].clinicDescription), Texts(reportList[index].clinicDescription),
Texts(TranslationBase.of(context).invoiceNo + Texts(TranslationBase.of(context).invoiceNo + ': ${reportList[index].invoiceNo}'),
': ${reportList[index].invoiceNo}'),
SizedBox(height: 12), SizedBox(height: 12),
], ],
), ),
reportList[index].status == 2 reportList[index].status == 2
? Container( ? Container(
margin: margin: EdgeInsets.only(left: 15.0, right: 15.0),
EdgeInsets.only(left: 15.0, right: 15.0),
child: InkWell( child: InkWell(
onTap: () { onTap: () {
showConfirmMessage(reportList[index]); showConfirmMessage(reportList[index]);
@ -78,7 +76,7 @@ class ReportListWidget extends StatelessWidget {
child: Icon( child: Icon(
Icons.email, Icons.email,
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,
size: 35.0, size: 30.0,
), ),
), ),
) )
@ -123,8 +121,7 @@ class ReportListWidget extends StatelessWidget {
report.setupId) report.setupId)
.then((value) { .then((value) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context); GifLoaderDialogUtils.hideDialog(AppGlobal.context);
AppToast.showSuccessToast( AppToast.showSuccessToast(message: TranslationBase.of(AppGlobal.context).emailSentSuccessfully);
message: TranslationBase.of(AppGlobal.context).emailSentSuccessfully);
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context); GifLoaderDialogUtils.hideDialog(AppGlobal.context);
print(err); print(err);

@ -27,7 +27,7 @@ class LineChartCurved extends StatelessWidget {
getYaxix(); getYaxix();
calculateMaxAndMin(); calculateMaxAndMin();
return AspectRatio( return AspectRatio(
aspectRatio: 1.1, aspectRatio: 1.0,
child: Container( child: Container(
decoration: const BoxDecoration( decoration: const BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(18)), borderRadius: BorderRadius.all(Radius.circular(18)),
@ -80,14 +80,6 @@ class LineChartCurved extends StatelessWidget {
} }
getYaxix() { getYaxix() {
// int indexess= (timeSeries.length*0.30).toInt();
// for (int index = 0; index < timeSeries.length; index++) {
// int mIndex = indexess * index;
// if (mIndex < timeSeries.length) {
// yAxixs.add(timeSeries[mIndex].sales);
// }
// }
for (int index = 0; index < timeSeries.length; index++) { for (int index = 0; index < timeSeries.length; index++) {
int mIndex = indexes * index; int mIndex = indexes * index;
if (mIndex < timeSeries.length) { if (mIndex < timeSeries.length) {
@ -181,7 +173,7 @@ class LineChartCurved extends StatelessWidget {
minX: minX, minX: minX,
maxX: maxX, maxX: maxX,
maxY: maxY, maxY: maxY,
minY: minY, minY: 0,
lineBarsData: getData(context), lineBarsData: getData(context),
); );
} }

@ -30,173 +30,190 @@ class _MyVaccinesState extends State<MyVaccines> {
onModelReady: (model) => model.getVaccine(), onModelReady: (model) => model.getVaccine(),
builder: (BuildContext context, VaccineViewModel model, Widget child) => builder: (BuildContext context, VaccineViewModel model, Widget child) =>
AppScaffold( AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).myVaccines, baseViewModel: model,
baseViewModel: model, appBarTitle: TranslationBase.of(context).myVaccines,
body: Container( body: Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: SizeConfig.screenWidth * 0.004, left: SizeConfig.screenWidth * 0.004,
right: SizeConfig.screenWidth * 0.004, right: SizeConfig.screenWidth * 0.004,
top: SizeConfig.screenWidth * 0.04, top: SizeConfig.screenWidth * 0.04,
), ),
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
RoundedContainer( RoundedContainer(
backgroundColor: Colors.white, backgroundColor: Colors.white,
child: ExpansionTile( child: ExpansionTile(
title: Container( title: Container(
height: 65.0, height: 65.0,
child: Text('2018'), child: Text('2018'),
), ),
children: <Widget>[ children: <Widget>[
Container( Container(
child: ListView.builder( child: ListView.builder(
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
shrinkWrap: true, shrinkWrap: true,
itemCount: model.vaccineList == null itemCount: model.vaccineList == null
? 0 ? 0
: model.vaccineList.length, : model.vaccineList.length,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return Column( return Column(
children: <Widget>[ children: <Widget>[
RoundedContainer( RoundedContainer(
child: Column( child: Column(
children: <Widget>[
Row(
children: <Widget>[ children: <Widget>[
Expanded( Row(
child: Column( children: <Widget>[
children: <Widget>[ Expanded(
Padding( child: Column(
padding: EdgeInsets.symmetric( children: <Widget>[
horizontal: 20.0, Padding(
vertical: 20.0), padding: EdgeInsets
child: Image.network( .symmetric(
model.vaccineList[index] horizontal:
.doctorImageURL, 20.0,
height: SizeConfig vertical: 20.0),
child: Image.network(
model
.vaccineList[
index]
.doctorImageURL,
height: SizeConfig
.imageSizeMultiplier * .imageSizeMultiplier *
23, 23,
width: SizeConfig width: SizeConfig
.imageSizeMultiplier * .imageSizeMultiplier *
20, 20,
fit: BoxFit.fill, fit: BoxFit.fill,
), ),
),
],
), ),
], flex: 2,
), ),
flex: 2, Expanded(
), child: Container(
Expanded( child: Column(
child: Container( crossAxisAlignment:
child: Column( CrossAxisAlignment
crossAxisAlignment: .start,
CrossAxisAlignment.start, children: <Widget>[
children: <Widget>[ Text(
Text( model
model.vaccineList[index] .vaccineList[
index]
.doctorTitle + .doctorTitle +
model.vaccineList[index] model
.doctorName, .vaccineList[
style: TextStyle( index]
fontWeight: .doctorName,
style: TextStyle(
fontWeight:
FontWeight.w900, FontWeight.w900,
fontSize: 16.6, fontSize: 16.6,
), ),
), ),
SizedBox(height: 7.0), SizedBox(height: 7.0),
Text( Text(
model.vaccineList[index] model
.projectName, .vaccineList[
style: TextStyle( index]
fontSize: 17.0, .projectName,
letterSpacing: 0.5, style: TextStyle(
), fontSize: 17.0,
), letterSpacing: 0.5,
SizedBox(height: 7.0), ),
Text( ),
model.vaccineList[index] SizedBox(height: 7.0),
.vaccineName, Text(
style: TextStyle( model
fontSize: 17.0, .vaccineList[
), index]
), .vaccineName,
SizedBox(height: 7.0), style: TextStyle(
Text( fontSize: 17.0,
'Date Taken ' + ),
convertDateFormat(model ),
.vaccineList[index] SizedBox(height: 7.0),
.invoiceDate), Text(
style: TextStyle( 'Date Taken ' +
fontSize: 17.0), convertDateFormat(model
.vaccineList[
index]
.invoiceDate),
style: TextStyle(
fontSize: 17.0),
),
],
), ),
], ),
flex: 5,
), ),
), ],
flex: 5,
), ),
], ],
), ),
], ),
), ],
), );
], }),
); )
}), ],
) ),
], ),
), // SpaceBetweenTexts(space: 165.0),
), ],
// SpaceBetweenTexts(space: 165.0),
],
),
),
bottomSheet: Container(
color: Theme.of(context).scaffoldBackgroundColor,
padding: EdgeInsets.all(12),
height: MediaQuery.of(context).size.height * 0.25,
width: double.infinity,
child: Column(
children: [
Divider(
height: 2,
thickness: 1,
),
SizedBox(
height: 6,
),
Container(
width: double.infinity,
// height: 80.0,
child: Button(
disabled: true,
label: TranslationBase.of(context).checkVaccineAvailability,
backgroundColor: Color(0xff9EA3A4),
onTap: () => Navigator.push(
context, FadePage(page: MyVaccinesItemPage())),
),
), ),
if (projectViewModel.havePrivilege(27)) ),
Container( bottomSheet: model.state == ViewState.Busy?Container(height: 0,): model.vaccineList.length > 0
width: double.infinity, ? Container(
// height: 80.0, color: Theme.of(context).scaffoldBackgroundColor,
child: SecondaryButton( padding: EdgeInsets.all(12),
label: TranslationBase.of(context).sendEmail, height: MediaQuery.of(context).size.height * 0.25,
color: Color(0xffF62426), width: double.infinity,
textColor: Colors.white, child: Column(
disabled: model.vaccineList.length == 0, children: [
loading: model.state == ViewState.BusyLocal, Divider(
onTap: () async { height: 2,
model.sendEmail( thickness: 1,
message: TranslationBase.of(context) ),
.emailSentSuccessfully); SizedBox(
}, height: 6,
), ),
), Container(
], width: double.infinity,
// height: 80.0,
child: Button(
disabled: true,
label: TranslationBase.of(context)
.checkVaccineAvailability,
backgroundColor: Color(0xff9EA3A4),
onTap: () => Navigator.push(
context, FadePage(page: MyVaccinesItemPage())),
),
),
if (projectViewModel.havePrivilege(27))
Container(
width: double.infinity,
// height: 80.0,
child: SecondaryButton(
label: TranslationBase.of(context).sendEmail,
color: Color(0xffF62426),
textColor: Colors.white,
disabled: model.vaccineList.length == 0,
loading: model.state == ViewState.BusyLocal,
onTap: () async {
model.sendEmail(
message: TranslationBase.of(context)
.emailSentSuccessfully);
},
),
),
],
),
)
: Container(height: 0,),
), ),
),
),
); );
} }

Loading…
Cancel
Save