From 8f5fef87e9b401da683740f70420b6e4d16bbad9 Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Sun, 15 Aug 2021 14:36:03 +0300 Subject: [PATCH 1/9] add blood pressure translation issue --- lib/config/config.dart | 409 ++++++------------ .../blood_pressure/AddBloodPressurePage.dart | 2 +- 2 files changed, 140 insertions(+), 271 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index a9f06a53..be4ad2e2 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -13,8 +13,8 @@ const PACKAGES_CUSTOMER = '/api/customers'; const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items'; const PACKAGES_ORDERS = '/api/orders'; -//const BASE_URL = 'https://uat.hmgwebservices.com/'; -const BASE_URL = 'https://hmgwebservices.com/'; +const BASE_URL = 'https://uat.hmgwebservices.com/'; +// const BASE_URL = 'https://hmgwebservices.com/'; // Pharmacy UAT URLs //const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; @@ -33,8 +33,7 @@ const GET_GEO_ZONES = 'Services/Patients.svc/REST/GeoF_GetAllPoints'; const LOG_GEO_ZONES = 'Services/Patients.svc/REST/GeoF_InsertPatientFileInfo'; // Delivery Driver -const DRIVER_LOCATION = - 'Services/Patients.svc/REST/PatientER_GetDriverLocation'; +const DRIVER_LOCATION = 'Services/Patients.svc/REST/PatientER_GetDriverLocation'; //weather const WEATHER_INDICATOR = 'Services/Weather.svc/REST/GetCityInfo'; @@ -42,52 +41,37 @@ const WEATHER_INDICATOR = 'Services/Weather.svc/REST/GetCityInfo'; const GET_PRIVILEGE = 'Services/Patients.svc/REST/Service_Privilege'; // Wifi Credentials -const WIFI_CREDENTIALS = - "Services/Patients.svc/Hmg_SMS_Get_By_ProjectID_And_PatientID"; +const WIFI_CREDENTIALS = "Services/Patients.svc/Hmg_SMS_Get_By_ProjectID_And_PatientID"; ///Doctor -const GET_MY_DOCTOR = - 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult'; +const GET_MY_DOCTOR = 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult'; const GET_DOCTOR_PROFILE = 'Services/Doctors.svc/REST/GetDocProfiles'; const GET_DOCTOR_PRE_POST_IMAGES = 'Services/Doctors.svc/REST/GetDoctorPrePostImages'; -const GET_DOCTOR_RATING_NOTES = - 'Services/Doctors.svc/REST/dr_GetNotesDoctorRating'; -const GET_DOCTOR_RATING_DETAILS = - 'Services/Doctors.svc/REST/dr_GetDoctorRatingDetails'; +const GET_DOCTOR_RATING_NOTES = 'Services/Doctors.svc/REST/dr_GetNotesDoctorRating'; +const GET_DOCTOR_RATING_DETAILS = 'Services/Doctors.svc/REST/dr_GetDoctorRatingDetails'; const GET_DOCTOR_RATING = 'Services/Doctors.svc/REST/dr_GetAvgDoctorRating'; ///Prescriptions const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList'; -const GET_PRESCRIPTIONS_ALL_ORDERS = - 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; -const GET_PRESCRIPTION_REPORT = - 'Services/Patients.svc/REST/INP_GetPrescriptionReport'; -const SEND_PRESCRIPTION_EMAIL = - 'Services/Notifications.svc/REST/SendPrescriptionEmail'; -const GET_PRESCRIPTION_REPORT_ENH = - 'Services/Patients.svc/REST/GetPrescriptionReport_enh'; +const GET_PRESCRIPTIONS_ALL_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; +const GET_PRESCRIPTION_REPORT = 'Services/Patients.svc/REST/INP_GetPrescriptionReport'; +const SEND_PRESCRIPTION_EMAIL = 'Services/Notifications.svc/REST/SendPrescriptionEmail'; +const GET_PRESCRIPTION_REPORT_ENH = 'Services/Patients.svc/REST/GetPrescriptionReport_enh'; ///Lab Order const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders'; -const GET_Patient_LAB_SPECIAL_RESULT = - 'Services/Patients.svc/REST/GetPatientLabSpecialResults'; -const SEND_LAB_RESULT_EMAIL = - 'Services/Notifications.svc/REST/SendLabReportEmail'; -const GET_Patient_LAB_RESULT = - 'Services/Patients.svc/REST/GetPatientLabResults'; -const GET_Patient_LAB_ORDERS_RESULT = - 'Services/Patients.svc/REST/GetPatientLabOrdersResults'; +const GET_Patient_LAB_SPECIAL_RESULT = 'Services/Patients.svc/REST/GetPatientLabSpecialResults'; +const SEND_LAB_RESULT_EMAIL = 'Services/Notifications.svc/REST/SendLabReportEmail'; +const GET_Patient_LAB_RESULT = 'Services/Patients.svc/REST/GetPatientLabResults'; +const GET_Patient_LAB_ORDERS_RESULT = 'Services/Patients.svc/REST/GetPatientLabOrdersResults'; /// const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders'; -const GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT = - 'Services/Patients.svc/REST/GetPatientLabResultsByAppointmentNo'; +const GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT = 'Services/Patients.svc/REST/GetPatientLabResultsByAppointmentNo'; -const GET_PATIENT_ORDERS_DETAILS = - 'Services/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead'; +const GET_PATIENT_ORDERS_DETAILS = 'Services/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead'; const GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL'; -const SEND_RAD_REPORT_EMAIL = - 'Services/Notifications.svc/REST/SendRadReportEmail'; +const SEND_RAD_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendRadReportEmail'; ///Feedback const SEND_FEEDBACK = 'Services/COCWS.svc/REST/InsertCOCItemInSPList'; @@ -96,32 +80,23 @@ const GET_PATIENT_AppointmentHistory = 'Services' '/Doctors.svc/REST/PateintHasAppoimentHistory'; ///VITAL SIGN -const GET_PATIENT_VITAL_SIGN = - 'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign'; +const GET_PATIENT_VITAL_SIGN = 'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign'; ///Er Nearest -const GET_NEAREST_HOSPITAL = - 'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime'; +const GET_NEAREST_HOSPITAL = 'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime'; ///ED Online -const ER_GET_VISUAL_TRIAGE_QUESTIONS = - "services/Doctors.svc/REST/ER_GetVisualTriageQuestions"; -const ER_SAVE_TRIAGE_INFORMATION = - "services/Doctors.svc/REST/ER_SaveTriageInformation"; +const ER_GET_VISUAL_TRIAGE_QUESTIONS = "services/Doctors.svc/REST/ER_GetVisualTriageQuestions"; +const ER_SAVE_TRIAGE_INFORMATION = "services/Doctors.svc/REST/ER_SaveTriageInformation"; const ER_GetPatientPaymentInformationForERClinic = "services/Doctors.svc/REST/ER_GetPatientPaymentInformationForERClinic"; ///Er Nearest -const GET_AMBULANCE_REQUEST = - 'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod'; -const GET_PATIENT_ALL_PRES_ORDERS = - 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; -const GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID = - 'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID'; -const UPDATE_PRESS_ORDER = - 'Services/Patients.svc/REST/PatientER_UpdatePresOrder'; -const INSERT_ER_INERT_PRES_ORDER = - 'Services/Patients.svc/REST/PatientER_InsertPresOrder'; +const GET_AMBULANCE_REQUEST = 'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod'; +const GET_PATIENT_ALL_PRES_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; +const GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID = 'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID'; +const UPDATE_PRESS_ORDER = 'Services/Patients.svc/REST/PatientER_UpdatePresOrder'; +const INSERT_ER_INERT_PRES_ORDER = 'Services/Patients.svc/REST/PatientER_InsertPresOrder'; /// ER RRT const GET_ALL_RC_TRANSPORTATION = 'rc/api/Transportation/getalltransportation'; @@ -135,15 +110,13 @@ const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations'; const GET_LIVECHAT_REQUEST = 'Services/Patients.svc/REST/GetPatientICProjects'; ///babyInformation -const GET_BABYINFORMATION_REQUEST = - 'Services/Community.svc/REST/GetBabyByUserID'; +const GET_BABYINFORMATION_REQUEST = 'Services/Community.svc/REST/GetBabyByUserID'; ///Get Baby By User ID const GET_BABY_BY_USER_ID = 'Services/Community.svc/REST/GetBabyByUserID'; ///userInformation -const GET_USERINFORMATION_REQUEST = - 'Services/Community.svc/REST/GetUserInformation_New'; +const GET_USERINFORMATION_REQUEST = 'Services/Community.svc/REST/GetUserInformation_New'; ///Update email const UPDATE_PATENT_EMAIL = 'Services/Patients.svc/REST/UpdatePateintEmail'; @@ -165,29 +138,21 @@ const GET_TABLE_REQUEST = 'Services/Community.svc/REST/CreateVaccinationTable'; const GET_CITIES_REQUEST = 'Services/Lists.svc/REST/GetAllCities'; ///BloodDetails -const GET_BLOOD_REQUEST = - 'services/PatientVarification.svc/REST/BloodDonation_GetBloodGroupDetails'; +const GET_BLOOD_REQUEST = 'services/PatientVarification.svc/REST/BloodDonation_GetBloodGroupDetails'; -const SAVE_BLOOD_REQUEST = - 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType'; +const SAVE_BLOOD_REQUEST = 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType'; -const GET_BLOOD_AGREEMENT = - 'Services/PatientVarification.svc/REST/CheckUserAgreementForBloodDonation'; -const SAVE_BLOOD_AGREEMENT = - 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation'; +const GET_BLOOD_AGREEMENT = 'Services/PatientVarification.svc/REST/CheckUserAgreementForBloodDonation'; +const SAVE_BLOOD_AGREEMENT = 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation'; ///Reports const REPORTS = 'Services/Doctors.svc/REST/GetPatientMedicalReportStatusInfo'; -const INSERT_REQUEST_FOR_MEDICAL_REPORT = - 'Services/Doctors.svc/REST/InsertRequestForMedicalReport'; -const SEND_MEDICAL_REPORT_EMAIL = - 'Services/Notifications.svc/REST/SendMedicalReportEmail'; +const INSERT_REQUEST_FOR_MEDICAL_REPORT = 'Services/Doctors.svc/REST/InsertRequestForMedicalReport'; +const SEND_MEDICAL_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendMedicalReportEmail'; ///Rate -const IS_LAST_APPOITMENT_RATED = - 'Services/Doctors.svc/REST/IsLastAppoitmentRated'; -const GET_APPOINTMENT_DETAILS_BY_NO = - 'Services/MobileNotifications.svc/REST/GetAppointmentDetailsByApptNo'; +const IS_LAST_APPOITMENT_RATED = 'Services/Doctors.svc/REST/IsLastAppoitmentRated'; +const GET_APPOINTMENT_DETAILS_BY_NO = 'Services/MobileNotifications.svc/REST/GetAppointmentDetailsByApptNo'; const GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID'; @@ -199,8 +164,7 @@ const GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID'; const GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized"; //URL to get active appointment list -const GET_ACTIVE_APPOINTMENTS_LIST_URL = - "Services/Doctors.svc/Rest/Dr_GetAppointmentActiveNumber"; +const GET_ACTIVE_APPOINTMENTS_LIST_URL = "Services/Doctors.svc/Rest/Dr_GetAppointmentActiveNumber"; //URL to get projects list const GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject'; @@ -209,118 +173,87 @@ const GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject'; const GET_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/SearchDoctorsByTime"; //URL to dental doctors list -const GET_DENTAL_DOCTORS_LIST_URL = - "Services/Doctors.svc/REST/Dental_DoctorChiefComplaintMapping"; +const GET_DENTAL_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/Dental_DoctorChiefComplaintMapping"; //URL to get doctor free slots const GET_DOCTOR_FREE_SLOTS = "Services/Doctors.svc/REST/GetDoctorFreeSlots"; //URL to insert appointment -const INSERT_SPECIFIC_APPOINTMENT = - "Services/Doctors.svc/REST/InsertSpecificAppointment"; +const INSERT_SPECIFIC_APPOINTMENT = "Services/Doctors.svc/REST/InsertSpecificAppointment"; //URL to get patient share -const GET_PATIENT_SHARE = - "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNO"; +const GET_PATIENT_SHARE = "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNO"; //URL to get patient appointment history -const GET_PATIENT_APPOINTMENT_HISTORY = - "Services/Doctors.svc/REST/PateintHasAppoimentHistory"; +const GET_PATIENT_APPOINTMENT_HISTORY = "Services/Doctors.svc/REST/PateintHasAppoimentHistory"; -const SEND_REPORT_EYE_EMAIL = - "Services/Notifications.svc/REST/SendGlassesPrescriptionEmail"; +const SEND_REPORT_EYE_EMAIL = "Services/Notifications.svc/REST/SendGlassesPrescriptionEmail"; -const SEND_CONTACT_LENS_PRESCRIPTION_EMAIL = - "Services/Notifications.svc/REST/SendContactLensPrescriptionEmail"; +const SEND_CONTACT_LENS_PRESCRIPTION_EMAIL = "Services/Notifications.svc/REST/SendContactLensPrescriptionEmail"; //URL to get patient appointment curfew history -const GET_PATIENT_APPOINTMENT_CURFEW_HISTORY = - "Services/Doctors.svc/REST/AppoimentHistoryForCurfew"; +const GET_PATIENT_APPOINTMENT_CURFEW_HISTORY = "Services/Doctors.svc/REST/AppoimentHistoryForCurfew"; //URL to confirm appointment -const CONFIRM_APPOINTMENT = - "Services/MobileNotifications.svc/REST/ConfirmAppointment"; +const CONFIRM_APPOINTMENT = "Services/MobileNotifications.svc/REST/ConfirmAppointment"; -const INSERT_VIDA_REQUEST = - "Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart"; +const INSERT_VIDA_REQUEST = "Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart"; //URL to cancel appointment const CANCEL_APPOINTMENT = "Services/Doctors.svc/REST/CancelAppointment"; //URL get appointment QR -const GENERATE_QR_APPOINTMENT = - "Services/Doctors.svc/REST/GenerateQRAppointmentNo"; +const GENERATE_QR_APPOINTMENT = "Services/Doctors.svc/REST/GenerateQRAppointmentNo"; //URL send email appointment QR -const EMAIL_QR_APPOINTMENT = - "Services/Notifications.svc/REST/sendEmailForOnLineCheckin"; +const EMAIL_QR_APPOINTMENT = "Services/Notifications.svc/REST/sendEmailForOnLineCheckin"; //URL check payment status -const CHECK_PAYMENT_STATUS = - "Services/PayFort_Serv.svc/REST/GetRequestStatusByRequestID"; +const CHECK_PAYMENT_STATUS = "Services/PayFort_Serv.svc/REST/GetRequestStatusByRequestID"; //URL create advance payment const CREATE_ADVANCE_PAYMENT = "Services/Doctors.svc/REST/CreateAdvancePayment"; -const HIS_CREATE_ADVANCE_PAYMENT = - "Services/Patients.svc/REST/HIS_CreateAdvancePayment"; +const HIS_CREATE_ADVANCE_PAYMENT = "Services/Patients.svc/REST/HIS_CreateAdvancePayment"; -const ADD_ADVANCE_NUMBER_REQUEST = - 'Services/PayFort_Serv.svc/REST/AddAdvancedNumberRequest'; +const ADD_ADVANCE_NUMBER_REQUEST = 'Services/PayFort_Serv.svc/REST/AddAdvancedNumberRequest'; -const IS_ALLOW_ASK_DOCTOR = - 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult'; -const GET_CALL_REQUEST_TYPE = - 'Services/Doctors.svc/REST/GetCallRequestType_LOV'; -const ADD_VIDA_REQUEST = - 'Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart'; +const IS_ALLOW_ASK_DOCTOR = 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult'; +const GET_CALL_REQUEST_TYPE = 'Services/Doctors.svc/REST/GetCallRequestType_LOV'; +const ADD_VIDA_REQUEST = 'Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart'; const SEND_CALL_REQUEST = 'Services/Doctors.svc/REST/InsertCallInfo'; -const GET_LIVECARE_CLINICS = - 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinics'; +const GET_LIVECARE_CLINICS = 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinics'; -const GET_LIVECARE_SCHEDULE_CLINICS = - 'Services/Doctors.svc/REST/PatientER_GetClinicsHaveSchedule'; +const GET_LIVECARE_SCHEDULE_CLINICS = 'Services/Doctors.svc/REST/PatientER_GetClinicsHaveSchedule'; -const GET_LIVECARE_SCHEDULE_CLINIC_DOCTOR_LIST = - 'Services/Doctors.svc/REST/PatientER_GetDoctorByClinicID'; +const GET_LIVECARE_SCHEDULE_CLINIC_DOCTOR_LIST = 'Services/Doctors.svc/REST/PatientER_GetDoctorByClinicID'; -const GET_LIVECARE_SCHEDULE_DOCTOR_TIME_SLOTS = - 'Services/Doctors.svc/REST/PatientER_GetDoctorFreeSlots'; +const GET_LIVECARE_SCHEDULE_DOCTOR_TIME_SLOTS = 'Services/Doctors.svc/REST/PatientER_GetDoctorFreeSlots'; -const INSERT_LIVECARE_SCHEDULE_APPOINTMENT = - 'Services/Doctors.svc/REST/InsertSpecificAppoitmentForSchedule'; +const INSERT_LIVECARE_SCHEDULE_APPOINTMENT = 'Services/Doctors.svc/REST/InsertSpecificAppoitmentForSchedule'; const GET_PATIENT_SHARE_LIVECARE = "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNOForLiveCare"; -const GET_LIVECARE_CLINIC_TIMING = - 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinicsServiceTimingsSchedule'; +const GET_LIVECARE_CLINIC_TIMING = 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinicsServiceTimingsSchedule'; -const GET_ER_APPOINTMENT_FEES = - 'Services/DoctorApplication.svc/REST/GetERAppointmentFees'; +const GET_ER_APPOINTMENT_FEES = 'Services/DoctorApplication.svc/REST/GetERAppointmentFees'; const GET_ER_APPOINTMENT_TIME = 'Services/ER_VirtualCall.svc/REST/GetRestTime'; -const ADD_NEW_CALL_FOR_PATIENT_ER = - 'Services/DoctorApplication.svc/REST/NewCallForPatientER'; +const ADD_NEW_CALL_FOR_PATIENT_ER = 'Services/DoctorApplication.svc/REST/NewCallForPatientER'; -const GET_LIVECARE_HISTORY = - 'Services/ER_VirtualCall.svc/REST/GetPatientErVirtualHistory'; -const CANCEL_LIVECARE_REQUEST = - 'Services/ER_VirtualCall.svc/REST/DeleteErRequest'; -const SEND_LIVECARE_INVOICE_EMAIL = - 'Services/Notifications.svc/REST/SendInvoiceForLiveCare'; +const GET_LIVECARE_HISTORY = 'Services/ER_VirtualCall.svc/REST/GetPatientErVirtualHistory'; +const CANCEL_LIVECARE_REQUEST = 'Services/ER_VirtualCall.svc/REST/DeleteErRequest'; +const SEND_LIVECARE_INVOICE_EMAIL = 'Services/Notifications.svc/REST/SendInvoiceForLiveCare'; const GET_USER_TERMS = 'Services/Patients.svc/REST/GetUserTermsAndConditions'; -const UPDATE_HEALTH_TERMS = - 'services/Patients.svc/REST/UpdatePateintHealthSummaryReport'; +const UPDATE_HEALTH_TERMS = 'services/Patients.svc/REST/UpdatePateintHealthSummaryReport'; -const GET_PATIENT_HEALTH_STATS = - 'Services/Patients.svc/REST/Med_GetTransactionsSts'; +const GET_PATIENT_HEALTH_STATS = 'Services/Patients.svc/REST/Med_GetTransactionsSts'; -const SEND_CHECK_IN_NFC_REQUEST = - 'Services/Patients.svc/REST/Patient_CheckAppointmentValidation_ForNFC'; +const SEND_CHECK_IN_NFC_REQUEST = 'Services/Patients.svc/REST/Patient_CheckAppointmentValidation_ForNFC'; //URL to get medicine and pharmacies list const CHANNEL = 3; @@ -341,21 +274,16 @@ var DeviceTypeID = Platform.isIOS ? 1 : 2; const LANGUAGE_ID = 2; const GET_PHARMCY_ITEMS = "Services/Lists.svc/REST/GetPharmcyItems_Region"; const GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList"; -const GET_PAtIENTS_INSURANCE = - "Services/Patients.svc/REST/Get_PatientInsuranceDetails"; -const GET_PAtIENTS_INSURANCE_UPDATED = - "Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory"; +const GET_PAtIENTS_INSURANCE = "Services/Patients.svc/REST/Get_PatientInsuranceDetails"; +const GET_PAtIENTS_INSURANCE_UPDATED = "Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory"; const INSURANCE_DETAILS = "Services/Patients.svc/REST/Get_InsuranceCheckList"; -const GET_PATIENT_INSURANCE_DETAILS = - "Services/Patients.svc/REST/PatientER_GetPatientInsuranceDetails"; -const UPLOAD_INSURANCE_CARD = - 'Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate'; +const GET_PATIENT_INSURANCE_DETAILS = "Services/Patients.svc/REST/PatientER_GetPatientInsuranceDetails"; +const UPLOAD_INSURANCE_CARD = 'Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate'; const GET_VACCINES = "Services/Patients.svc/REST/GetDoneVaccinesByPatientID"; const GET_VACCINES_EMAIL = "Services/Notifications.svc/REST/SendVaccinesEmail"; -const GET_PAtIENTS_INSURANCE_APPROVALS = - "Services/Patients.svc/REST/GetApprovalStatus_DWH"; +const GET_PAtIENTS_INSURANCE_APPROVALS = "Services/Patients.svc/REST/GetApprovalStatus_DWH"; const SEARCH_BOT = 'HabibiChatBotApi/BotInterface/GetVoiceCommandResponse'; const GET_VACCINATIONS_ITEMS = "/Services/ERP.svc/REST/GET_VACCINATIONS_ITEMS"; @@ -365,84 +293,56 @@ const GET_PATIENT_SICK_LEAVE = 'Services/Patients.svc/REST/GetPatientSickLeave'; const SendSickLeaveEmail = 'Services/Notifications.svc/REST/SendSickLeaveEmail'; -const GET_PATIENT_AdVANCE_BALANCE_AMOUNT = - 'Services/Patients.svc/REST/GetPatientAdvanceBalanceAmount'; -const GET_PATIENT_INFO_BY_ID = - 'Services/Doctors.svc/REST/GetPatientInfoByPatientID'; +const GET_PATIENT_AdVANCE_BALANCE_AMOUNT = 'Services/Patients.svc/REST/GetPatientAdvanceBalanceAmount'; +const GET_PATIENT_INFO_BY_ID = 'Services/Doctors.svc/REST/GetPatientInfoByPatientID'; const GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER = 'Services/Patients.svc/REST/AP_GetPatientInfoByPatientIDandMobileNumber'; -const SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = - 'Services/Authentication.svc/REST/SendActivationCodeForAdvancePayment'; +const SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = 'Services/Authentication.svc/REST/SendActivationCodeForAdvancePayment'; const CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = 'Services/Authentication.svc/REST/CheckActivationCodeForAdvancePayment'; -const GET_COVID_DRIVETHRU_PROJECT_LIST = - 'Services/Doctors.svc/REST/COVID19_ProjectDriveThroughTestingCenter'; +const GET_COVID_DRIVETHRU_PROJECT_LIST = 'Services/Doctors.svc/REST/COVID19_ProjectDriveThroughTestingCenter'; -const GET_COVID_DRIVETHRU_PAYMENT_INFO = - 'Services/Doctors.svc/REST/COVID19_GetPatientPaymentInormation'; +const GET_COVID_DRIVETHRU_PAYMENT_INFO = 'Services/Doctors.svc/REST/COVID19_GetPatientPaymentInormation'; -const GET_COVID_DRIVETHRU_FREE_SLOTS = - 'Services/Doctors.svc/REST/COVID19_GetFreeSlots'; +const GET_COVID_DRIVETHRU_FREE_SLOTS = 'Services/Doctors.svc/REST/COVID19_GetFreeSlots'; -const GET_COVID_DRIVETHRU_PROCEDURES_LIST = - 'Services/Doctors.svc/REST/COVID19_GetTestProcedures'; +const GET_COVID_DRIVETHRU_PROCEDURES_LIST = 'Services/Doctors.svc/REST/COVID19_GetTestProcedures'; ///Smartwatch Integration Services -const GET_PATIENT_LAST_RECORD = - 'Services/Patients.svc/REST/Med_GetPatientLastRecord'; +const GET_PATIENT_LAST_RECORD = 'Services/Patients.svc/REST/Med_GetPatientLastRecord'; ///My Trackers -const GET_DIABETIC_RESULT_AVERAGE = - 'Services/Patients.svc/REST/Patient_GetDiabeticResultAverage'; -const GET_DIABTEC_RESULT = - 'Services/Patients.svc/REST/Patient_GetDiabtecResults'; -const ADD_DIABTEC_RESULT = - 'Services/Patients.svc/REST/Patient_AddDiabtecResult'; - -const GET_BLOOD_PRESSURE_RESULT_AVERAGE = - 'Services/Patients.svc/REST/Patient_GetBloodPressureResultAverage'; -const GET_BLOOD_PRESSURE_RESULT = - 'Services/Patients.svc/REST/Patient_GetBloodPressureResult'; -const ADD_BLOOD_PRESSURE_RESULT = - 'Services/Patients.svc/REST/Patient_AddBloodPressureResult'; - -const GET_WEIGHT_PRESSURE_RESULT_AVERAGE = - 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResultAverage'; -const GET_WEIGHT_PRESSURE_RESULT = - 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResult'; -const ADD_WEIGHT_PRESSURE_RESULT = - 'Services/Patients.svc/REST/Patient_AddWeightMeasurementResult'; +const GET_DIABETIC_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetDiabeticResultAverage'; +const GET_DIABTEC_RESULT = 'Services/Patients.svc/REST/Patient_GetDiabtecResults'; +const ADD_DIABTEC_RESULT = 'Services/Patients.svc/REST/Patient_AddDiabtecResult'; + +const GET_BLOOD_PRESSURE_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetBloodPressureResultAverage'; +const GET_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_GetBloodPressureResult'; +const ADD_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_AddBloodPressureResult'; + +const GET_WEIGHT_PRESSURE_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResultAverage'; +const GET_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResult'; +const ADD_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_AddWeightMeasurementResult'; const ADD_ACTIVE_PRESCRIPTIONS_REPORT_BY_PATIENT_ID = 'Services/Patients.svc/Rest/GetActivePrescriptionReportByPatientID'; -const GET_CALL_INFO_HOURS_RESULT = - 'Services/Doctors.svc/REST/GetCallInfoHoursResult'; -const GET_CALL_REQUEST_TYPE_LOV = - 'Services/Doctors.svc/REST/GetCallRequestType_LOV'; - -const UPDATE_DIABETIC_RESULT = - 'Services/Patients.svc/REST/Patient_UpdateDiabeticResult'; - -const SEND_AVERAGE_BLOOD_SUGAR_REPORT = - 'Services/Notifications.svc/REST/SendAverageBloodSugarReport'; -const DEACTIVATE_DIABETIC_STATUS = - 'services/Patients.svc/REST/Patient_DeactivateDiabeticStatus'; -const DEACTIVATE_BLOOD_PRESSURES_STATUS = - 'services/Patients.svc/REST/Patient_DeactivateBloodPressureStatus'; - -const UPDATE_BLOOD_PRESSURE_RESULT = - 'Services/Patients.svc/REST/Patient_UpdateBloodPressureResult'; -const SEND_AVERAGE_BLOOD_WEIGHT_REPORT = - 'Services/Notifications.svc/REST/SendAverageBodyWeightReport'; -const SEND_AVERAGE_BLOOD_PRESSURE_REPORT = - 'Services/Notifications.svc/REST/SendAverageBloodPressureReport'; - -const UPDATE_WEIGHT_PRESSURE_RESULT = - 'Services/Patients.svc/REST/Patient_UpdateWeightMeasurementResult'; -const DEACTIVATE_WEIGHT_PRESSURE_RESULT = - 'services/Patients.svc/REST/Patient_DeactivateWeightMeasurementStatus'; +const GET_CALL_INFO_HOURS_RESULT = 'Services/Doctors.svc/REST/GetCallInfoHoursResult'; +const GET_CALL_REQUEST_TYPE_LOV = 'Services/Doctors.svc/REST/GetCallRequestType_LOV'; + +const UPDATE_DIABETIC_RESULT = 'Services/Patients.svc/REST/Patient_UpdateDiabeticResult'; + +const SEND_AVERAGE_BLOOD_SUGAR_REPORT = 'Services/Notifications.svc/REST/SendAverageBloodSugarReport'; +const DEACTIVATE_DIABETIC_STATUS = 'services/Patients.svc/REST/Patient_DeactivateDiabeticStatus'; +const DEACTIVATE_BLOOD_PRESSURES_STATUS = 'services/Patients.svc/REST/Patient_DeactivateBloodPressureStatus'; + +const UPDATE_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_UpdateBloodPressureResult'; +const SEND_AVERAGE_BLOOD_WEIGHT_REPORT = 'Services/Notifications.svc/REST/SendAverageBodyWeightReport'; +const SEND_AVERAGE_BLOOD_PRESSURE_REPORT = 'Services/Notifications.svc/REST/SendAverageBloodPressureReport'; + +const UPDATE_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_UpdateWeightMeasurementResult'; +const DEACTIVATE_WEIGHT_PRESSURE_RESULT = 'services/Patients.svc/REST/Patient_DeactivateWeightMeasurementStatus'; const GET_DOCTOR_RESPONSE = 'Services/Patients.svc/REST/GetDoctorResponse'; const UPDATE_READ_STATUS = 'Services/Patients.svc/REST/UpdateReadStatus'; const INSERT_CALL_INFO = 'Services/Doctors.svc/REST/InsertCallInfo'; @@ -450,35 +350,25 @@ const INSERT_CALL_INFO = 'Services/Doctors.svc/REST/InsertCallInfo'; const GET_PATIENT_ALLERGIES = 'Services/Patients.svc/REST/GetPatientAllergies'; // H2O -const H2O_GET_USER_PROGRESS = - "Services/H2ORemainder.svc/REST/H2O_GetUserProgress"; -const H2O_INSERT_USER_ACTIVITY = - "Services/H2ORemainder.svc/REST/H2O_InsertUserActivity"; -const H2O_GET_USER_DETAIL = - "Services/H2ORemainder.svc/REST/H2O_GetUserDetails_New"; -const H2O_UPDATE_USER_DETAIL = - "Services/H2ORemainder.svc/REST/H2O_UpdateUserDetails_New"; -const H2O_UNDO_USER_ACTIVITY = - "Services/H2ORemainder.svc/REST/H2o_UndoUserActivity"; +const H2O_GET_USER_PROGRESS = "Services/H2ORemainder.svc/REST/H2O_GetUserProgress"; +const H2O_INSERT_USER_ACTIVITY = "Services/H2ORemainder.svc/REST/H2O_InsertUserActivity"; +const H2O_GET_USER_DETAIL = "Services/H2ORemainder.svc/REST/H2O_GetUserDetails_New"; +const H2O_UPDATE_USER_DETAIL = "Services/H2ORemainder.svc/REST/H2O_UpdateUserDetails_New"; +const H2O_UNDO_USER_ACTIVITY = "Services/H2ORemainder.svc/REST/H2o_UndoUserActivity"; //E_Referral Services -const GET_ALL_RELATIONSHIP_TYPES = - "Services/Patients.svc/REST/GetAllRelationshipTypes"; -const SEND_ACTIVATION_CODE_FOR_E_REFERRAL = - 'Services/Authentication.svc/REST/SendActivationCodeForEReferral'; -const CHECK_ACTIVATION_CODE_FOR_E_REFERRAL = - 'Services/Authentication.svc/REST/CheckActivationCodeForEReferral'; +const GET_ALL_RELATIONSHIP_TYPES = "Services/Patients.svc/REST/GetAllRelationshipTypes"; +const SEND_ACTIVATION_CODE_FOR_E_REFERRAL = 'Services/Authentication.svc/REST/SendActivationCodeForEReferral'; +const CHECK_ACTIVATION_CODE_FOR_E_REFERRAL = 'Services/Authentication.svc/REST/CheckActivationCodeForEReferral'; const GET_ALL_CITIES = 'services/Lists.svc/rest/GetAllCities'; const CREATE_E_REFERRAL = "Services/Patients.svc/REST/CreateEReferral"; const GET_E_REFERRALS = "Services/Patients.svc/REST/GetEReferrals"; // Encillary Orders -const GET_ANCILLARY_ORDERS = - 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderList'; +const GET_ANCILLARY_ORDERS = 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderList'; -const GET_ANCILLARY_ORDERS_DETAILS = - 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderProcList'; +const GET_ANCILLARY_ORDERS_DETAILS = 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderProcList'; //Pharmacy wishlist // const GET_WISHLIST = "http://swd-pharapp-01:7200/api/shopping_cart_items/"; @@ -510,50 +400,34 @@ const GET_SHIPPING_OPTIONS = "get_shipping_option/"; const DELETE_SHOPPING_CART = "delete_shopping_cart_items/"; const DELETE_SHOPPING_CART_ALL = "delete_shopping_cart_item_by_customer/"; const ORDER_SHOPPING_CART = "orders"; -const GET_LACUM_ACCOUNT_INFORMATION = - "Services/Patients.svc/REST/GetLakumAccountInformation"; -const GET_LACUM_GROUP_INFORMATION = - "Services/Patients.svc/REST/GetlakumInQueryInfoGrouping"; -const LACUM_ACCOUNT_ACTIVATE = - "Services/Patients.svc/REST/LakumAccountActivation"; -const LACUM_ACCOUNT_DEACTIVATE = - "Services/Patients.svc/REST/LakumAccountDeactivation"; -const CREATE_LAKUM_ACCOUNT = - "Services/Patients.svc/REST/PHR_CreateLakumAccount"; -const TRANSFER_YAHALA_LOYALITY_POINTS = - "Services/Patients.svc/REST/TransferYaHalaLoyaltyPoints"; -const LAKUM_GET_USER_TERMS_AND_CONDITIONS = - "Services/ERP.svc/REST/GetUserTermsAndConditionsForEPharmcy"; +const GET_LACUM_ACCOUNT_INFORMATION = "Services/Patients.svc/REST/GetLakumAccountInformation"; +const GET_LACUM_GROUP_INFORMATION = "Services/Patients.svc/REST/GetlakumInQueryInfoGrouping"; +const LACUM_ACCOUNT_ACTIVATE = "Services/Patients.svc/REST/LakumAccountActivation"; +const LACUM_ACCOUNT_DEACTIVATE = "Services/Patients.svc/REST/LakumAccountDeactivation"; +const CREATE_LAKUM_ACCOUNT = "Services/Patients.svc/REST/PHR_CreateLakumAccount"; +const TRANSFER_YAHALA_LOYALITY_POINTS = "Services/Patients.svc/REST/TransferYaHalaLoyaltyPoints"; +const LAKUM_GET_USER_TERMS_AND_CONDITIONS = "Services/ERP.svc/REST/GetUserTermsAndConditionsForEPharmcy"; const PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList'; const GET_RECOMMENDED_PRODUCT = 'alsoProduct/'; const GET_MOST_VIEWED_PRODUCTS = "mostview?"; const GET_NEW_PRODUCTS = "newproducts?"; // Home Health Care -const HHC_GET_ALL_SERVICES = - "Services/Patients.svc/REST/PatientER_HHC_GetAllServices"; -const HHC_GET_ALL_CMC_SERVICES = - "Services/Patients.svc/REST/PatientER_CMC_GetAllServices"; -const PATIENT_ER_UPDATE_PRES_ORDER = - "Services/Patients.svc/REST/PatientER_UpdatePresOrder"; -const GET_ORDER_DETAIL_BY_ID = - "Services/Patients.svc/REST/PatientER_HHC_GetTransactionsForOrder"; -const GET_CMC_ORDER_DETAIL_BY_ID = - "Services/Patients.svc/REST/PatientER_CMC_GetTransactionsForOrder"; +const HHC_GET_ALL_SERVICES = "Services/Patients.svc/REST/PatientER_HHC_GetAllServices"; +const HHC_GET_ALL_CMC_SERVICES = "Services/Patients.svc/REST/PatientER_CMC_GetAllServices"; +const PATIENT_ER_UPDATE_PRES_ORDER = "Services/Patients.svc/REST/PatientER_UpdatePresOrder"; +const GET_ORDER_DETAIL_BY_ID = "Services/Patients.svc/REST/PatientER_HHC_GetTransactionsForOrder"; +const GET_CMC_ORDER_DETAIL_BY_ID = "Services/Patients.svc/REST/PatientER_CMC_GetTransactionsForOrder"; const GET_CHECK_UP_ITEMS = "Services/Patients.svc/REST/GetCheckUpItems"; const PUSH_NOTIFICATION_GET_ALL_NOTIFICATIONS = 'Services/MobileNotifications.svc/REST/PushNotification_GetAllNotifications'; const PUSH_NOTIFICATION_SET_MESSAGES_FROM_POOL_AS_READ = 'Services/MobileNotifications.svc/REST/PushNotification_SetMessagesFromPoolAsRead'; -const GET_PATIENT_ALL_PRES_ORD = - 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; -const PATIENT_ER_INSERT_PRES_ORDER = - 'Services/Patients.svc/REST/PatientER_InsertPresOrder'; +const GET_PATIENT_ALL_PRES_ORD = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; +const PATIENT_ER_INSERT_PRES_ORDER = 'Services/Patients.svc/REST/PatientER_InsertPresOrder'; const PHARMACY_MAKE_REVIEW = 'epharmacy/api/insertreviews'; -const BLOOD_DONATION_REGISTER_BLOOD_TYPE = - 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType'; -const ADD_USER_AGREEMENT_FOR_BLOOD_DONATION = - 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation'; +const BLOOD_DONATION_REGISTER_BLOOD_TYPE = 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType'; +const ADD_USER_AGREEMENT_FOR_BLOOD_DONATION = 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation'; //Pharmacy wishlist const GET_WISHLIST = "shopping_cart_items/"; @@ -586,8 +460,7 @@ const GET_SUB_PRODUCTS = 'products?categoryid='; const GET_FINAL_PRODUCTS = 'products?fields=id,reviews,discount_ids,name,namen,localized_names,display_order,short_description,full_description,full_descriptionn,sku,order_minimum_quantity,order_maximum_quantity,price,old_price,images,is_rx,rx_message,rx_messagen,discount_name,discount_namen,approved_rating_sum,approved_total_reviews,allow_back_in_stock_subscriptions,stock_quantity,stock_availability,stock_availabilityn,discount_percentage&CategoryId='; const GET_CLINIC_CATEGORY = 'Services/Doctors.svc/REST/DP_GetClinicCategory'; -const GET_DISEASE_BY_CLINIC_ID = - 'Services/Doctors.svc/REST/DP_GetDiseasesByClinicID'; +const GET_DISEASE_BY_CLINIC_ID = 'Services/Doctors.svc/REST/DP_GetDiseasesByClinicID'; const SEARCH_DOCTOR_BY_TIME = 'Services/Doctors.svc/REST/SearchDoctorsByTime'; const TIMER_MIN = 10; @@ -603,17 +476,13 @@ const SCAN_QR_CODE = 'productbysku/'; const FILTERED_PRODUCTS = 'products?categoryids='; -const GET_DOCTOR_LIST_CALCULATION = - "Services/Doctors.svc/REST/GetCallculationDoctors"; +const GET_DOCTOR_LIST_CALCULATION = "Services/Doctors.svc/REST/GetCallculationDoctors"; -const GET_ALL_APPOINTMENTS_FOR_DENTAL_CLINIC = - "Services/Patients.svc/REST/GetDentalAppointments"; +const GET_ALL_APPOINTMENTS_FOR_DENTAL_CLINIC = "Services/Patients.svc/REST/GetDentalAppointments"; -const GET_DENTAL_APPOINTMENT_INVOICE = - "Services/Patients.svc/REST/HIS_eInvoiceForDentalByAppointmentNo"; +const GET_DENTAL_APPOINTMENT_INVOICE = "Services/Patients.svc/REST/HIS_eInvoiceForDentalByAppointmentNo"; -const SEND_DENTAL_APPOINTMENT_INVOICE_EMAIL = - "Services/Notifications.svc/REST/SendInvoiceForDental"; +const SEND_DENTAL_APPOINTMENT_INVOICE_EMAIL = "Services/Notifications.svc/REST/SendInvoiceForDental"; class AppGlobal { static var context; diff --git a/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart b/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart index 1b8f70e3..2c71ab14 100644 --- a/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart +++ b/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart @@ -144,7 +144,7 @@ class _AddBloodPressurePageState extends State { ), InkWell( onTap: () { - confirmSelectMeasureTimeDialog(projectViewModel.isArabic ? measureTimeEnList : measureTimeArList); + confirmSelectMeasureTimeDialog(projectViewModel.isArabic ? measureTimeArList : measureTimeEnList); }, child: Container( padding: EdgeInsets.all(12), From 3077624c583e7dab977c00dc3f2ed36a1113da1a Mon Sep 17 00:00:00 2001 From: mosazaid Date: Mon, 16 Aug 2021 10:08:32 +0300 Subject: [PATCH 2/9] fix bugs --- .../health_converter/blood_sugar.dart | 406 ++++++++++-------- 1 file changed, 217 insertions(+), 189 deletions(-) diff --git a/lib/pages/AlHabibMedicalService/health_converter/blood_sugar.dart b/lib/pages/AlHabibMedicalService/health_converter/blood_sugar.dart index e429418d..e9369b82 100644 --- a/lib/pages/AlHabibMedicalService/health_converter/blood_sugar.dart +++ b/lib/pages/AlHabibMedicalService/health_converter/blood_sugar.dart @@ -7,8 +7,10 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -const activeCardColor = Color(0xff70777A); -const inactiveCardColor = Color(0xffFAFAFd); +const activeCardColor = Color(0xff515a5d); +const activeTextColor = Color(0xffFAFAFA); +const inactiveCardColor = Color(0xffFAFAFA); +const inactiveTextColor = Color(0xff60686B); class BloodSugar extends StatefulWidget { @override @@ -20,6 +22,8 @@ Color color; class _BloodSugarState extends State { Color cardMGColor = inactiveCardColor; Color cardMMOLColor = inactiveCardColor; + Color textMGColor = inactiveTextColor; + Color textMMOLColor = inactiveTextColor; void updateColor(int type) { //MG/DLT card @@ -30,6 +34,8 @@ class _BloodSugarState extends State { } else { cardMGColor = inactiveCardColor; } + textMGColor = activeTextColor; + textMMOLColor = inactiveTextColor; } if (type == 2) { if (cardMMOLColor == inactiveCardColor) { @@ -38,6 +44,8 @@ class _BloodSugarState extends State { } else { cardMMOLColor = inactiveCardColor; } + textMGColor = inactiveTextColor; + textMMOLColor = activeTextColor; } } @@ -45,7 +53,7 @@ class _BloodSugarState extends State { if (textController.text.isEmpty) return; if (cardMGColor == activeCardColor) { inputValue = double.parse(textController.text); - inputValue = inputValue / 15; + inputValue = inputValue / 18; unit = 'mmol/l'; } else if (cardMMOLColor == activeCardColor) { inputValue = double.parse(textController.text); @@ -74,217 +82,237 @@ class _BloodSugarState extends State { isShowAppBar: true, isShowDecPage: false, appBarTitle: TranslationBase.of(context).bloodSugarConversion, - body: Padding( + body: Container( padding: const EdgeInsets.all(16.0), - child: SingleChildScrollView( - child: Container( - height: MediaQuery.of(context).size.height * 0.7, - child: Column( - //crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - width: 350.0, - child: Text( - TranslationBase.of(context).convertBloodSugarStatement, - //textAlign: TextAlign.center, - style: TextStyle(fontSize: 20.0), - ), - ), - SizedBox( - height: 15.0, - ), - Container( - color: Colors.white, - height: 120.0, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - //crossAxisAlignment: CrossAxisAlignment.end, - children: [ - Padding( - padding: const EdgeInsets.symmetric(horizontal: 15.0), - child: Row( - children: [ - Texts( - TranslationBase.of(context).convertFrom, - ) - ], - ), - ), - SizedBox( - height: 9.0, - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, + child: Column( + children: [ + Expanded( + child: SingleChildScrollView( + child: Column( + //crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.symmetric(horizontal: 8), + child: Text( + TranslationBase.of(context).convertBloodSugarStatement, + //textAlign: TextAlign.center, + style: TextStyle(fontSize: 20.0), + ), + ), + SizedBox( + height: 12.0, + ), + Container( + color: Colors.white, + child: Padding( + padding: const EdgeInsets.symmetric( + vertical: 16.0, horizontal: 8), + child: Column( children: [ - GestureDetector( - onTap: () { - setState(() { - updateColor(1); - if (textController.text.isNotEmpty) { - inputValue = - double.parse(textController.text); - inputValue = inputValue / 15; - } - unit = 'mmol/l'; - }); - }, - child: Container( - height: 65.0, - width: 150.0, - decoration: BoxDecoration( - boxShadow: [ - BoxShadow( - color: Colors.grey.withOpacity(0.5), - spreadRadius: 3, - blurRadius: 7, - offset: Offset( - 0, 3), // changes position of shadow + Padding( + padding: + const EdgeInsets.symmetric(horizontal: 16.0), + child: Row( + children: [ + Texts( + TranslationBase.of(context).convertFrom, + ) + ], + ), + ), + SizedBox( + height: 8.0, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + width: 16.0, + ), + Expanded( + child: GestureDetector( + onTap: () { + setState(() { + updateColor(1); + calculateBloodSugar(); + }); + }, + child: Container( + height: 65.0, + decoration: BoxDecoration( + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.5), + spreadRadius: 3, + blurRadius: 7, + offset: Offset(0, + 3), // changes position of shadow + ), + ], + color: cardMGColor, + borderRadius: + BorderRadius.circular(3.0), + ), + child: Padding( + padding: const EdgeInsets.symmetric( + vertical: 0.0, horizontal: 18.0), + child: Texts( + 'MG/DLt TO \nMMOL/L', + color: textMGColor, + ), + ), ), - ], - color: cardMGColor, - borderRadius: BorderRadius.circular(3.0), + ), ), - child: Padding( - padding: const EdgeInsets.symmetric( - vertical: 0.0, horizontal: 18.0), - child: Texts('MG/DLt TO \nMMOL/L'), + SizedBox( + width: 12.0, ), - ), - ), - GestureDetector( - onTap: () { - setState(() { - updateColor(2); - if (textController.text.isNotEmpty) { - inputValue = - double.parse(textController.text); - inputValue = inputValue / 18; - } - unit = 'mg/dlt'; - }); - }, - child: Container( - height: 65.0, - width: 150.0, - decoration: BoxDecoration( - color: cardMMOLColor, - borderRadius: BorderRadius.circular(3.0), - boxShadow: [ - BoxShadow( - color: Colors.grey.withOpacity(0.5), - spreadRadius: 3, - blurRadius: 7, - offset: Offset( - 0, 3), // changes position of shadow + Expanded( + child: GestureDetector( + onTap: () { + setState(() { + updateColor(2); + calculateBloodSugar(); + }); + }, + child: Container( + height: 65.0, + decoration: BoxDecoration( + color: cardMMOLColor, + borderRadius: + BorderRadius.circular(3.0), + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.5), + spreadRadius: 3, + blurRadius: 7, + offset: Offset(0, + 3), // changes position of shadow + ), + ], + ), + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 16.0), + child: Texts( + 'MMOL/L TO MG/DLt ', + color: textMMOLColor, + ), + ), ), - ], + ), ), - child: Padding( - padding: const EdgeInsets.symmetric( - horizontal: 16.0), - child: Texts('\nMMOL/L TO MG/DLt '), + SizedBox( + width: 16.0, ), - ), + ], ), ], ), - ], + ), ), - ), - ), - SizedBox( - height: 25.0, - ), - Container( - height: 65.0, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(6.0), - color: Colors.white, - ), - child: TextFormField( - controller: textController, - inputFormatters: [ + SizedBox( + height: 24.0, + ), + Container( + height: 65.0, + padding: EdgeInsets.symmetric(horizontal: 8), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(6.0), + color: Colors.white, + ), + child: TextFormField( + controller: textController, + inputFormatters: [ // FilteringTextInputFormatter.digitsOnly - ], - keyboardType: TextInputType.number, - decoration: InputDecoration( - labelText: TranslationBase.of(context).enterReadingValue, - border: OutlineInputBorder( - borderSide: BorderSide(color: Colors.black45)), - labelStyle: TextStyle( - color: Colors.black87, + ], + keyboardType: TextInputType.number, + decoration: InputDecoration( + labelText: + TranslationBase.of(context).enterReadingValue, + enabledBorder: UnderlineInputBorder( + borderSide: BorderSide(color: Colors.white), + ), + disabledBorder: UnderlineInputBorder( + borderSide: BorderSide(color: Colors.white), + ), + focusedBorder: UnderlineInputBorder( + borderSide: BorderSide(color: Colors.white), + ), + border: UnderlineInputBorder( + borderSide: BorderSide(color: Colors.white)), + labelStyle: TextStyle( + color: Colors.black87, + ), + ), ), ), - ), - ), - SizedBox( - height: 25.0, - ), - Visibility( - visible: _visible, - child: Container( - height: 115.0, - width: 350.0, - decoration: BoxDecoration( - color: Colors.white, - border: Border.all(color: Colors.black), - borderRadius: BorderRadius.circular(15.0), + SizedBox( + height: 24.0, ), - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Texts(TranslationBase.of(context).result + ": "), - Row( + Visibility( + visible: _visible, + child: Container( + height: 115.0, + width: 350.0, + decoration: BoxDecoration( + color: Colors.white, + border: Border.all(color: Colors.black), + borderRadius: BorderRadius.circular(15.0), + ), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, children: [ - Text( - inputValue.toStringAsFixed(3), - style: TextStyle(fontSize: 35.0), - ), - Padding( - padding: EdgeInsets.only(left: 4.0, top: 10.0), - child: Text( - unit.toString(), - style: TextStyle( - color: Color(0xffC5273A), - fontSize: 15.0, - fontWeight: FontWeight.w500, + Texts(TranslationBase.of(context).result + ": "), + Row( + children: [ + Text( + inputValue.toStringAsFixed(2), + style: TextStyle(fontSize: 35.0), ), - ), + Padding( + padding: + EdgeInsets.only(left: 4.0, top: 10.0), + child: Text( + unit.toString(), + style: TextStyle( + color: Color(0xffC5273A), + fontSize: 15.0, + fontWeight: FontWeight.w500, + ), + ), + ), + ], ), ], ), - ], + ), ), ), - ), - ), - SizedBox( - height: 30.0, + ], ), - Flexible( - child: Container( - height: 50.0, - width: 150.0, - child: SecondaryButton( - label: TranslationBase.of(context).calculate, - onTap: () { - setState(() { - _visible == false - ? _visible = !_visible - : _visible = _visible; - calculateBloodSugar(); - }); - }, - ), - ), - ), - ], + ), + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 16), + child: SecondaryButton( + label: TranslationBase.of(context).calculate, + color: Color(0XFF515A5D), + onTap: () { + setState(() { + _visible == false + ? _visible = !_visible + : _visible = _visible; + calculateBloodSugar(); + }); + }, + ), ), - ), + ], ), ), ); From b9d4195e2023f15baec4bc1c47d724e18dbe68a2 Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Mon, 16 Aug 2021 10:20:07 +0300 Subject: [PATCH 3/9] Blood pressure translation issue --- .../my_trackers/blood_pressure/AddBloodPressurePage.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart b/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart index 733fa9cb..2c71ab14 100644 --- a/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart +++ b/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart @@ -144,7 +144,7 @@ class _AddBloodPressurePageState extends State { ), InkWell( onTap: () { - confirmSelectMeasureTimeDialog(projectViewModel.isArabic ? measureTimeArList : measureTimeEnList); + confirmSelectMeasureTimeDialog(projectViewModel.isArabic ? measureTimeArList : measureTimeEnList); }, child: Container( padding: EdgeInsets.all(12), From 74d08263423ecd794d24204cc58606b8451cec5e Mon Sep 17 00:00:00 2001 From: Fatimah Alshammari Date: Mon, 16 Aug 2021 12:10:34 +0300 Subject: [PATCH 4/9] fixed issues --- lib/config/config.dart | 8 +- .../service/ancillary_orders_service.dart | 332 +++++++++--------- .../ancillary_orders_view_model.dart | 6 +- .../ancillary_order_proc_model.dart | 189 +++++----- .../ancillary-orders/ancillaryOrders.dart | 6 +- .../ancillaryOrdersDetails.dart | 12 +- .../blood_pressure/AddBloodPressurePage.dart | 65 ++-- lib/widgets/mobile-no/mobile_no.dart | 3 +- 8 files changed, 320 insertions(+), 301 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index 3aa66dd1..5c35f5f7 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -17,12 +17,12 @@ const BASE_URL = 'https://uat.hmgwebservices.com/'; //const BASE_URL = 'https://hmgwebservices.com/'; // Pharmacy UAT URLs -//const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; -//const PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; +const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; +const PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; // Pharmacy Production URLs -const BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/'; -const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/'; +// const BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/'; +// const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/'; const PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity'; diff --git a/lib/core/service/ancillary_orders_service.dart b/lib/core/service/ancillary_orders_service.dart index b9d14a06..da7fc753 100644 --- a/lib/core/service/ancillary_orders_service.dart +++ b/lib/core/service/ancillary_orders_service.dart @@ -20,6 +20,8 @@ class AncillaryOrdersService extends BaseService { _ancillaryLists = []; response['AncillaryOrderList'].forEach((item) { ancillaryLists.add(AncillaryOrdersListModel.fromJson(item)); + print("response of ancillary Lists__________"); + print(response); }); }, onFailure: (String error, int statusCode) { hasError = true; @@ -27,175 +29,183 @@ class AncillaryOrdersService extends BaseService { }, body: body); } - Future getOrdersDetails(appointmentNo, orderNo) async { + Future getOrdersDetails(appointmentNo, orderNo, projectID) async { Map body = Map(); - + body['AppointmentNo_Vida'] = appointmentNo; + body['OrderNo'] = orderNo; + body['ProjectID'] = projectID; +// "OrderNo=$orderNo&AppointmentNo_Vida=$appointmentNo&ProjectID=$projectID" hasError = false; - await baseAppClient.post(GET_ANCILLARY_ORDERS_DETAILS, onSuccess: (dynamic response, int statusCode) { - _ancillaryProcLists = []; - response['AncillaryOrderProcList'] = [ - { - "AncillaryOrderProcList": [ - { - "ApprovalLineItemNo": 0, - "ApprovalNo": 0, - "ApprovalStatus": "", - "ApprovalStatusID": 0, - "CompanyShare": 501.3, - "CompanyShareWithTax": 576.5, - "CompanyTaxAmount": 75.19, - "DiscountAmount": 55.7, - "DiscountCategory": 1, - "DiscountType": "P", - "DiscountTypeValue": 10, - "IsApprovalCreated": false, - "IsApprovalRequired": false, - "IsCovered": false, - "OrderDate": "/Date(1601758800000+0300)/", - "OrderLineItemNo": 1, - "OrderNo": 2020000001, - "PartnerID": 0, - "PartnerShare": 0, - "PartnerShareType": "P", - "PatientShare": 0, - "PatientShareWithTax": 0, - "PatientTaxAmount": 0, - "ProcPrice": 557, - "ProcedureCategoryID": 2, - "ProcedureCategoryName": "LABORATORY", - "ProcedureID": "02013001", - "ProcedureName": "11-DESOXYCORTISOL (COMPOUND S) - S.O", - "TaxAmount": 75.19, - "TaxPct": 15 - }, - { - "ApprovalLineItemNo": 0, - "ApprovalNo": 0, - "ApprovalStatus": "", - "ApprovalStatusID": 0, - "CompanyShare": 90, - "CompanyShareWithTax": 103.5, - "CompanyTaxAmount": 13.5, - "DiscountAmount": 10, - "DiscountCategory": 1, - "DiscountType": "P", - "DiscountTypeValue": 10, - "IsApprovalCreated": false, - "IsApprovalRequired": true, - "IsCovered": false, - "OrderDate": "/Date(1601758800000+0300)/", - "OrderLineItemNo": 4, - "OrderNo": 2020000001, - "PartnerID": 0, - "PartnerShare": 0, - "PartnerShareType": "P", - "PatientShare": 0, - "PatientShareWithTax": 0, - "PatientTaxAmount": 0, - "ProcPrice": 100, - "ProcedureCategoryID": 2, - "ProcedureCategoryName": "LABORATORY", - "ProcedureID": "02014011", - "ProcedureName": "CBC (COMPLETE BLOOD COUNT PROFILE)", - "TaxAmount": 13.5, - "TaxPct": 15 - }, - { - "ApprovalLineItemNo": 0, - "ApprovalNo": 0, - "ApprovalStatus": "", - "ApprovalStatusID": 0, - "CompanyShare": 347.76, - "CompanyShareWithTax": 399.92, - "CompanyTaxAmount": 52.16, - "DiscountAmount": 38.64, - "DiscountCategory": 1, - "DiscountType": "P", - "DiscountTypeValue": 10, - "IsApprovalCreated": false, - "IsApprovalRequired": false, - "IsCovered": false, - "OrderDate": "/Date(1601758800000+0300)/", - "OrderLineItemNo": 3, - "OrderNo": 2020000001, - "PartnerID": 0, - "PartnerShare": 0, - "PartnerShareType": "P", - "PatientShare": 0, - "PatientShareWithTax": 0, - "PatientTaxAmount": 0, - "ProcPrice": 386.4, - "ProcedureCategoryID": 2, - "ProcedureCategoryName": "LABORATORY", - "ProcedureID": "02019302", - "ProcedureName": "21-HYDROXYLASE ABS - S.O", - "TaxAmount": 52.16, - "TaxPct": 15 - }, - { - "ApprovalLineItemNo": 0, - "ApprovalNo": 0, - "ApprovalStatus": "", - "ApprovalStatusID": 0, - "CompanyShare": 1323, - "CompanyShareWithTax": 1521.45, - "CompanyTaxAmount": 198.45, - "DiscountAmount": 147, - "DiscountCategory": 1, - "DiscountType": "P", - "DiscountTypeValue": 10, - "IsApprovalCreated": false, - "IsApprovalRequired": true, - "IsCovered": false, - "OrderDate": "/Date(1601758800000+0300)/", - "OrderLineItemNo": 5, - "OrderNo": 2020000001, - "PartnerID": 0, - "PartnerShare": 0, - "PartnerShareType": "P", - "PatientShare": 0, - "PatientShareWithTax": 0, - "PatientTaxAmount": 0, - "ProcPrice": 1470, - "ProcedureCategoryID": 3, - "ProcedureCategoryName": "RADIOLOGY", - "ProcedureID": "03033065", - "ProcedureName": "CT SCAN - ABDOMEN (WITH CONTRAST)", - "TaxAmount": 198.45, - "TaxPct": 15 - } - ], - "AppointmentDate": "/Date(1601499600000+0300)/", - "AppointmentNo": 2016053756, - "ClinicID": 1, - "ClinicName": "INTERNAL MEDICINE CLINIC", - "CompanyID": 0, - "CompanyName": "Blood Donation Investigation", - "DoctorID": 1485, - "DoctorName": "ANAS ABDULLAH", - "ErrCode": null, - "GroupID": 2, - "InsurancePolicyNo": "45976500", - "Message": "Success", - "PatientCardID": "232332323", - "PatientID": 3072055, - "PatientName": "MAYA KHALED SADDIQ", - "PatientType": 1, - "PolicyID": 2, - "PolicyName": "Test", - "ProjectID": 15, - "SetupID": "010266", - "StatusCode": 1, - "SubCategoryID": 2, - "SubPolicyNo": "234234" - } - ]; +// _ancillaryProcLists.clear(); + _ancillaryProcLists = []; +// response['AncillaryOrderProcList'] = [ +// { +// "AncillaryOrderProcList": [ +// { +// "ApprovalLineItemNo": 0, +// "ApprovalNo": 0, +// "ApprovalStatus": "", +// "ApprovalStatusID": 0, +// "CompanyShare": 501.3, +// "CompanyShareWithTax": 576.5, +// "CompanyTaxAmount": 75.19, +// "DiscountAmount": 55.7, +// "DiscountCategory": 1, +// "DiscountType": "P", +// "DiscountTypeValue": 10, +// "IsApprovalCreated": false, +// "IsApprovalRequired": false, +// "IsCovered": false, +// "OrderDate": "/Date(1601758800000+0300)/", +// "OrderLineItemNo": 1, +// "OrderNo": 2020000001, +// "PartnerID": 0, +// "PartnerShare": 0, +// "PartnerShareType": "P", +// "PatientShare": 0, +// "PatientShareWithTax": 0, +// "PatientTaxAmount": 0, +// "ProcPrice": 557, +// "ProcedureCategoryID": 2, +// "ProcedureCategoryName": "LABORATORY", +// "ProcedureID": "02013001", +// "ProcedureName": "11-DESOXYCORTISOL (COMPOUND S) - S.O", +// "TaxAmount": 75.19, +// "TaxPct": 15 +// }, +// { +// "ApprovalLineItemNo": 0, +// "ApprovalNo": 0, +// "ApprovalStatus": "", +// "ApprovalStatusID": 0, +// "CompanyShare": 90, +// "CompanyShareWithTax": 103.5, +// "CompanyTaxAmount": 13.5, +// "DiscountAmount": 10, +// "DiscountCategory": 1, +// "DiscountType": "P", +// "DiscountTypeValue": 10, +// "IsApprovalCreated": false, +// "IsApprovalRequired": true, +// "IsCovered": false, +// "OrderDate": "/Date(1601758800000+0300)/", +// "OrderLineItemNo": 4, +// "OrderNo": 2020000001, +// "PartnerID": 0, +// "PartnerShare": 0, +// "PartnerShareType": "P", +// "PatientShare": 0, +// "PatientShareWithTax": 0, +// "PatientTaxAmount": 0, +// "ProcPrice": 100, +// "ProcedureCategoryID": 2, +// "ProcedureCategoryName": "LABORATORY", +// "ProcedureID": "02014011", +// "ProcedureName": "CBC (COMPLETE BLOOD COUNT PROFILE)", +// "TaxAmount": 13.5, +// "TaxPct": 15 +// }, +// { +// "ApprovalLineItemNo": 0, +// "ApprovalNo": 0, +// "ApprovalStatus": "", +// "ApprovalStatusID": 0, +// "CompanyShare": 347.76, +// "CompanyShareWithTax": 399.92, +// "CompanyTaxAmount": 52.16, +// "DiscountAmount": 38.64, +// "DiscountCategory": 1, +// "DiscountType": "P", +// "DiscountTypeValue": 10, +// "IsApprovalCreated": false, +// "IsApprovalRequired": false, +// "IsCovered": false, +// "OrderDate": "/Date(1601758800000+0300)/", +// "OrderLineItemNo": 3, +// "OrderNo": 2020000001, +// "PartnerID": 0, +// "PartnerShare": 0, +// "PartnerShareType": "P", +// "PatientShare": 0, +// "PatientShareWithTax": 0, +// "PatientTaxAmount": 0, +// "ProcPrice": 386.4, +// "ProcedureCategoryID": 2, +// "ProcedureCategoryName": "LABORATORY", +// "ProcedureID": "02019302", +// "ProcedureName": "21-HYDROXYLASE ABS - S.O", +// "TaxAmount": 52.16, +// "TaxPct": 15 +// }, +// { +// "ApprovalLineItemNo": 0, +// "ApprovalNo": 0, +// "ApprovalStatus": "", +// "ApprovalStatusID": 0, +// "CompanyShare": 1323, +// "CompanyShareWithTax": 1521.45, +// "CompanyTaxAmount": 198.45, +// "DiscountAmount": 147, +// "DiscountCategory": 1, +// "DiscountType": "P", +// "DiscountTypeValue": 10, +// "IsApprovalCreated": false, +// "IsApprovalRequired": true, +// "IsCovered": false, +// "OrderDate": "/Date(1601758800000+0300)/", +// "OrderLineItemNo": 5, +// "OrderNo": 2020000001, +// "PartnerID": 0, +// "PartnerShare": 0, +// "PartnerShareType": "P", +// "PatientShare": 0, +// "PatientShareWithTax": 0, +// "PatientTaxAmount": 0, +// "ProcPrice": 1470, +// "ProcedureCategoryID": 3, +// "ProcedureCategoryName": "RADIOLOGY", +// "ProcedureID": "03033065", +// "ProcedureName": "CT SCAN - ABDOMEN (WITH CONTRAST)", +// "TaxAmount": 198.45, +// "TaxPct": 15 +// } +// ], +// "AppointmentDate": "/Date(1601499600000+0300)/", +// "AppointmentNo": 2016053756, +// "ClinicID": 1, +// "ClinicName": "INTERNAL MEDICINE CLINIC", +// "CompanyID": 0, +// "CompanyName": "Blood Donation Investigation", +// "DoctorID": 1485, +// "DoctorName": "ANAS ABDULLAH", +// "ErrCode": null, +// "GroupID": 2, +// "InsurancePolicyNo": "45976500", +// "Message": "Success", +// "PatientCardID": "232332323", +// "PatientID": 3072055, +// "PatientName": "MAYA KHALED SADDIQ", +// "PatientType": 1, +// "PolicyID": 2, +// "PolicyName": "Test", +// "ProjectID": 15, +// "SetupID": "010266", +// "StatusCode": 1, +// "SubCategoryID": 2, +// "SubPolicyNo": "234234" +// } +// ]; response['AncillaryOrderProcList'].forEach((item) { ancillaryProcLists.add(AncillaryOrdersListProcListModel.fromJson(item)); +// ancillaryProcLists.add(AncillaryOrdersListProcListModel.fromJson(response['AncillaryOrderProcList'])); + print("----------------------------------"); + print("Test data"); + print(response); }); + //Future.value(_ancillaryProcLists); }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; diff --git a/lib/core/viewModels/ancillary_orders_view_model.dart b/lib/core/viewModels/ancillary_orders_view_model.dart index 77eb4237..4a140004 100644 --- a/lib/core/viewModels/ancillary_orders_view_model.dart +++ b/lib/core/viewModels/ancillary_orders_view_model.dart @@ -12,8 +12,10 @@ class AnciallryOrdersViewModel extends BaseViewModel { AncillaryOrdersService _ancillaryService = locator(); List get ancillaryLists => _ancillaryService.ancillaryLists; + List get ancillaryListsDetails => _ancillaryService.ancillaryProcLists; + Future getOrders() async { hasError = false; setState(ViewState.Busy); @@ -25,10 +27,10 @@ class AnciallryOrdersViewModel extends BaseViewModel { setState(ViewState.Idle); } - Future getOrdersDetails(appointmentNo, orderNo) async { + Future getOrdersDetails(appointmentNo, orderNo, projectID) async { hasError = false; setState(ViewState.Busy); - await _ancillaryService.getOrdersDetails(appointmentNo, orderNo); + await _ancillaryService.getOrdersDetails(appointmentNo, orderNo, projectID ); if (_ancillaryService.hasError) { error = _ancillaryService.error; setState(ViewState.ErrorLocal); diff --git a/lib/models/anicllary-orders/ancillary_order_proc_model.dart b/lib/models/anicllary-orders/ancillary_order_proc_model.dart index 7322d11a..1b557f21 100644 --- a/lib/models/anicllary-orders/ancillary_order_proc_model.dart +++ b/lib/models/anicllary-orders/ancillary_order_proc_model.dart @@ -1,60 +1,61 @@ class AncillaryOrdersListProcListModel { - List ancillaryOrderProcList; + List ancillaryOrderProcDetailsList; String appointmentDate; - dynamic appointmentNo; - dynamic clinicID; + int appointmentNo; + int clinicID; String clinicName; - dynamic companyID; + int companyID; String companyName; - dynamic doctorID; + int doctorID; String doctorName; Null errCode; - dynamic groupID; + int groupID; String insurancePolicyNo; String message; String patientCardID; - dynamic patientID; + int patientID; String patientName; - dynamic patientType; - dynamic policyID; + int patientType; + int policyID; String policyName; - dynamic projectID; + int projectID; String setupID; - dynamic statusCode; - dynamic subCategoryID; + int statusCode; + int subCategoryID; String subPolicyNo; AncillaryOrdersListProcListModel( - {this.ancillaryOrderProcList, - this.appointmentDate, - this.appointmentNo, - this.clinicID, - this.clinicName, - this.companyID, - this.companyName, - this.doctorID, - this.doctorName, - this.errCode, - this.groupID, - this.insurancePolicyNo, - this.message, - this.patientCardID, - this.patientID, - this.patientName, - this.patientType, - this.policyID, - this.policyName, - this.projectID, - this.setupID, - this.statusCode, - this.subCategoryID, - this.subPolicyNo}); + {this.ancillaryOrderProcDetailsList, + this.appointmentDate, + this.appointmentNo, + this.clinicID, + this.clinicName, + this.companyID, + this.companyName, + this.doctorID, + this.doctorName, + this.errCode, + this.groupID, + this.insurancePolicyNo, + this.message, + this.patientCardID, + this.patientID, + this.patientName, + this.patientType, + this.policyID, + this.policyName, + this.projectID, + this.setupID, + this.statusCode, + this.subCategoryID, + this.subPolicyNo}); AncillaryOrdersListProcListModel.fromJson(Map json) { - if (json['AncillaryOrderProcList'] != null) { - ancillaryOrderProcList = new List(); - json['AncillaryOrderProcList'].forEach((v) { - ancillaryOrderProcList.add(new AncillaryOrderProcList.fromJson(v)); + if (json['AncillaryOrderProcDetailsList'] != null) { + ancillaryOrderProcDetailsList = new List(); + json['AncillaryOrderProcDetailsList'].forEach((v) { + ancillaryOrderProcDetailsList + .add(new AncillaryOrderProcDetailsList.fromJson(v)); }); } appointmentDate = json['AppointmentDate']; @@ -84,9 +85,9 @@ class AncillaryOrdersListProcListModel { Map toJson() { final Map data = new Map(); - if (this.ancillaryOrderProcList != null) { - data['AncillaryOrderProcList'] = - this.ancillaryOrderProcList.map((v) => v.toJson()).toList(); + if (this.ancillaryOrderProcDetailsList != null) { + data['AncillaryOrderProcDetailsList'] = + this.ancillaryOrderProcDetailsList.map((v) => v.toJson()).toList(); } data['AppointmentDate'] = this.appointmentDate; data['AppointmentNo'] = this.appointmentNo; @@ -115,71 +116,71 @@ class AncillaryOrdersListProcListModel { } } -class AncillaryOrderProcList { - dynamic approvalLineItemNo; - dynamic approvalNo; +class AncillaryOrderProcDetailsList { + int approvalLineItemNo; + int approvalNo; String approvalStatus; - dynamic approvalStatusID; - dynamic companyShare; - dynamic companyShareWithTax; - dynamic companyTaxAmount; - dynamic discountAmount; - dynamic discountCategory; + int approvalStatusID; + int companyShare; + int companyShareWithTax; + int companyTaxAmount; + int discountAmount; + int discountCategory; String discountType; - dynamic discountTypeValue; + int discountTypeValue; bool isApprovalCreated; bool isApprovalRequired; bool isCovered; String orderDate; - dynamic orderLineItemNo; - dynamic orderNo; - dynamic partnerID; - dynamic partnerShare; + int orderLineItemNo; + int orderNo; + int partnerID; + int partnerShare; String partnerShareType; - dynamic patientShare; - dynamic patientShareWithTax; - dynamic patientTaxAmount; - dynamic procPrice; - dynamic procedureCategoryID; + int patientShare; + double patientShareWithTax; + double patientTaxAmount; + int procPrice; + int procedureCategoryID; String procedureCategoryName; String procedureID; String procedureName; dynamic taxAmount; - dynamic taxPct; + int taxPct; - AncillaryOrderProcList( + AncillaryOrderProcDetailsList( {this.approvalLineItemNo, - this.approvalNo, - this.approvalStatus, - this.approvalStatusID, - this.companyShare, - this.companyShareWithTax, - this.companyTaxAmount, - this.discountAmount, - this.discountCategory, - this.discountType, - this.discountTypeValue, - this.isApprovalCreated, - this.isApprovalRequired, - this.isCovered, - this.orderDate, - this.orderLineItemNo, - this.orderNo, - this.partnerID, - this.partnerShare, - this.partnerShareType, - this.patientShare, - this.patientShareWithTax, - this.patientTaxAmount, - this.procPrice, - this.procedureCategoryID, - this.procedureCategoryName, - this.procedureID, - this.procedureName, - this.taxAmount, - this.taxPct}); + this.approvalNo, + this.approvalStatus, + this.approvalStatusID, + this.companyShare, + this.companyShareWithTax, + this.companyTaxAmount, + this.discountAmount, + this.discountCategory, + this.discountType, + this.discountTypeValue, + this.isApprovalCreated, + this.isApprovalRequired, + this.isCovered, + this.orderDate, + this.orderLineItemNo, + this.orderNo, + this.partnerID, + this.partnerShare, + this.partnerShareType, + this.patientShare, + this.patientShareWithTax, + this.patientTaxAmount, + this.procPrice, + this.procedureCategoryID, + this.procedureCategoryName, + this.procedureID, + this.procedureName, + this.taxAmount, + this.taxPct}); - AncillaryOrderProcList.fromJson(Map json) { + AncillaryOrderProcDetailsList.fromJson(Map json) { approvalLineItemNo = json['ApprovalLineItemNo']; approvalNo = json['ApprovalNo']; approvalStatus = json['ApprovalStatus']; diff --git a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrders.dart b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrders.dart index eccc1309..4cb2b658 100644 --- a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrders.dart +++ b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrders.dart @@ -95,7 +95,7 @@ class _AnicllaryOrdersState extends State .map( (item) => InkWell( onTap: () { - ancillaryOrdersDetails(item); + ancillaryOrdersDetails(item, model.ancillaryLists[0].projectID); }, child: Container( decoration: BoxDecoration( @@ -166,11 +166,11 @@ class _AnicllaryOrdersState extends State .toList()); } - ancillaryOrdersDetails(item) { + ancillaryOrdersDetails(item, projectId) { Navigator.push( context, FadePage( - page: AnicllaryOrdersDetails(item.appointmentNo, item.orderNo), + page: AnicllaryOrdersDetails(item.appointmentNo, item.orderNo,projectId ), ), ); } diff --git a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart index 20d2966b..535ecb38 100644 --- a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart +++ b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart @@ -12,7 +12,9 @@ import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; class AnicllaryOrdersDetails extends StatefulWidget { final dynamic appoNo; final dynamic orderNo; - AnicllaryOrdersDetails(this.appoNo, this.orderNo); + final dynamic projectID; + + AnicllaryOrdersDetails(this.appoNo, this.orderNo, this.projectID); @override _AnicllaryOrdersState createState() => _AnicllaryOrdersState(); } @@ -31,7 +33,7 @@ class _AnicllaryOrdersState extends State Widget build(BuildContext context) { return BaseView( onModelReady: (model) => - model.getOrdersDetails(widget.appoNo, widget.orderNo), + model.getOrdersDetails(widget.appoNo, widget.orderNo, widget.projectID), builder: (_, model, widget) => AppScaffold( isShowAppBar: true, baseViewModel: model, @@ -89,7 +91,7 @@ class _AnicllaryOrdersState extends State fontSize: 20, ), Texts( - model.ancillaryListsDetails[0].patientID.toString(), + model.ancillaryLists[0].patientID.toString(), ) ], ), @@ -212,7 +214,7 @@ class _AnicllaryOrdersState extends State } Widget getAncillaryDetails(model) { - Map newMap = groupBy(model.ancillaryListsDetails[0].ancillaryOrderProcList, + Map newMap = groupBy(model.ancillaryListsDetails[0].ancillaryOrderProcDetailsList, (obj) => obj.procedureCategoryName); print(newMap); @@ -247,7 +249,7 @@ class _AnicllaryOrdersState extends State String getTotalValue(value) { double total = 0.0; - value.ancillaryListsDetails[0].ancillaryOrderProcList + value.ancillaryListsDetails[0].ancillaryOrderProcDetailsList .forEach((result) => {total += result.companyShareWithTax}); return total.toStringAsFixed(2); } diff --git a/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart b/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart index 1b8f70e3..786ed458 100644 --- a/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart +++ b/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart @@ -144,7 +144,7 @@ class _AddBloodPressurePageState extends State { ), InkWell( onTap: () { - confirmSelectMeasureTimeDialog(projectViewModel.isArabic ? measureTimeEnList : measureTimeArList); + confirmSelectMeasureTimeDialog(projectViewModel.isArabic ? measureTimeArList : measureTimeEnList); }, child: Container( padding: EdgeInsets.all(12), @@ -229,38 +229,41 @@ class _AddBloodPressurePageState extends State { widthFactor: 0.9, child: Column( children: [ - SecondaryButton( - loading: widget.model.state == ViewState.BusyLocal, - label: TranslationBase.of(context).save.toUpperCase(), - textColor: Colors.white, - color: isButtonDisabled ? Colors.grey[900] : Colors.grey, - onTap: () async { - if (_bloodSystolicValueController.text.isNotEmpty && - _bloodDiastolicValueController.text.isNotEmpty) { - GifLoaderDialogUtils.showMyDialog(context); + Container( + height: 50, + child: SecondaryButton( + loading: widget.model.state == ViewState.BusyLocal, + label: TranslationBase.of(context).save.toUpperCase(), + textColor: Colors.white, + color: isButtonDisabled ? Colors.grey[900] : Colors.grey, + onTap: () async { + if (_bloodSystolicValueController.text.isNotEmpty && + _bloodDiastolicValueController.text.isNotEmpty) { + GifLoaderDialogUtils.showMyDialog(context); - widget.model - .addORUpdateDiabtecResult( - isUpdate: widget.isUpdate, - bloodPressureDate: - '${bloodSugarDate.year}-${bloodSugarDate.month}-${bloodSugarDate.day} ${timeSugarDate.hour}:${timeSugarDate.minute}:00', - diastolicPressure: _bloodDiastolicValueController.text.toString(), - systolicePressure: _bloodSystolicValueController.text.toString(), - measuredArm: measuredArm, - ) - .then((value) { - GifLoaderDialogUtils.hideDialog(context); - if (widget.model.state == ViewState.BusyLocal) + widget.model + .addORUpdateDiabtecResult( + isUpdate: widget.isUpdate, + bloodPressureDate: + '${bloodSugarDate.year}-${bloodSugarDate.month}-${bloodSugarDate.day} ${timeSugarDate.hour}:${timeSugarDate.minute}:00', + diastolicPressure: _bloodDiastolicValueController.text.toString(), + systolicePressure: _bloodSystolicValueController.text.toString(), + measuredArm: measuredArm, + ) + .then((value) { + GifLoaderDialogUtils.hideDialog(context); + if (widget.model.state == ViewState.BusyLocal) + AppToast.showErrorToast(message: widget.model.error); + else + Navigator.pop(context); + ; + }).catchError((e) { + GifLoaderDialogUtils.hideDialog(context); AppToast.showErrorToast(message: widget.model.error); - else - Navigator.pop(context); - ; - }).catchError((e) { - GifLoaderDialogUtils.hideDialog(context); - AppToast.showErrorToast(message: widget.model.error); - }); - } - }), + }); + } + }), + ), ], ), ), diff --git a/lib/widgets/mobile-no/mobile_no.dart b/lib/widgets/mobile-no/mobile_no.dart index 44162743..f449cdb8 100644 --- a/lib/widgets/mobile-no/mobile_no.dart +++ b/lib/widgets/mobile-no/mobile_no.dart @@ -128,7 +128,8 @@ class _MobileNo extends State { controller: widget.controller, keyboardType: TextInputType.number, maxLength: 10, - inputFormatters: [ + inputFormatters: + [ FilteringTextInputFormatter.allow(RegExp("[0-9]")), ], // maxLengthEnforced: true, From d9fabbab17b3dff99909cf06ed6482078be2c725 Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Tue, 17 Aug 2021 11:31:52 +0300 Subject: [PATCH 5/9] Fix feedback --- ios/Podfile | 2 +- ios/Runner.xcodeproj/project.pbxproj | 18 ----- lib/core/model/sick_leave/sick_leave.dart | 4 +- .../service/feedback/feedback_service.dart | 9 ++- .../feedback/feedback_view_model.dart | 5 +- .../widgets/AppointmentActions.dart | 3 +- lib/pages/feedback/appointment_history.dart | 18 ++--- lib/pages/feedback/feedback_home_page.dart | 8 +- lib/pages/feedback/send_feedback_page.dart | 73 ++++++++++++++++--- .../medical/patient_sick_leave_page.dart | 2 +- 10 files changed, 93 insertions(+), 49 deletions(-) diff --git a/ios/Podfile b/ios/Podfile index 89424e2a..9fbc2933 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -# platform :ios, '11.0' +# platform :ios, '10.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 40202660..366647c0 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -220,7 +220,6 @@ 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, EFDAD5E1235DCA1DB6187148 /* [CP] Embed Pods Frameworks */, - 835BB6C21DD911F74065B670 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -320,23 +319,6 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; - 835BB6C21DD911F74065B670 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; diff --git a/lib/core/model/sick_leave/sick_leave.dart b/lib/core/model/sick_leave/sick_leave.dart index 6811a552..1d396e18 100644 --- a/lib/core/model/sick_leave/sick_leave.dart +++ b/lib/core/model/sick_leave/sick_leave.dart @@ -13,7 +13,7 @@ class SickLeave { int appointmentNo; int admissionNo; int actualDoctorRate; - String appointmentDate; + DateTime appointmentDate; String clinicName; String doctorImageURL; String doctorName; @@ -80,7 +80,7 @@ class SickLeave { appointmentNo = json['AppointmentNo']; admissionNo = json['AdmissionNo']; actualDoctorRate = json['ActualDoctorRate']; - appointmentDate = json['AppointmentDate']; + appointmentDate = DateUtil.convertStringToDate(json['AppointmentDate']); clinicName = json['ClinicName']; doctorImageURL = json['DoctorImageURL']; doctorName = json['DoctorName']; diff --git a/lib/core/service/feedback/feedback_service.dart b/lib/core/service/feedback/feedback_service.dart index 9355daf0..51537ef7 100644 --- a/lib/core/service/feedback/feedback_service.dart +++ b/lib/core/service/feedback/feedback_service.dart @@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/model/feedback/COC_items.dart'; import 'package:diplomaticquarterapp/core/model/feedback/request_insert_coc_item.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; @@ -11,14 +12,14 @@ import 'package:diplomaticquarterapp/uitl/utils.dart'; class FeedbackService extends BaseService { List cOCItemList = List(); RequestInsertCOCItem _requestInsertCOCItem = RequestInsertCOCItem(); - List appointHistoryList = List(); + List appointHistoryList = List(); Future sendCOCItem( {String title, String details, String cOCTypeName, String attachment, - AppointmentHistory appointHistory}) async { + AppoitmentAllHistoryResultList appointHistory}) async { hasError = false; var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); @@ -45,7 +46,7 @@ class FeedbackService extends BaseService { if (appointHistory != null) { body['AppoinmentNo'] = appointHistory.appointmentNo; - body['AppointmentDate'] = DateUtil.convertDateToString(appointHistory.appointmentDate); + body['AppointmentDate'] = appointHistory.appointmentDate; body['ClinicID'] = appointHistory.clinicID; body['ClinicName'] = appointHistory.clinicName; body['DoctorID'] = appointHistory.doctorID; @@ -88,7 +89,7 @@ class FeedbackService extends BaseService { onSuccess: (dynamic response, int statusCode) { appointHistoryList = []; response['AppoimentAllHistoryResultList'].forEach((appoint) { - appointHistoryList.add(AppointmentHistory.fromJson(appoint)); + appointHistoryList.add(AppoitmentAllHistoryResultList.fromJson(appoint)); }); }, onFailure: (String error, int statusCode) { hasError = true; diff --git a/lib/core/viewModels/feedback/feedback_view_model.dart b/lib/core/viewModels/feedback/feedback_view_model.dart index 6793c786..2a9dc90b 100644 --- a/lib/core/viewModels/feedback/feedback_view_model.dart +++ b/lib/core/viewModels/feedback/feedback_view_model.dart @@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/feedback/COC_items.dart'; import 'package:diplomaticquarterapp/core/service/feedback/feedback_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:flutter/cupertino.dart'; @@ -23,7 +24,7 @@ class FeedbackViewModel extends BaseViewModel { List get cOCItemList => _feedbackService.cOCItemList; - List get appointHistoryList => + List get appointHistoryList => _feedbackService.appointHistoryList; Future sendCOCItem( @@ -31,7 +32,7 @@ class FeedbackViewModel extends BaseViewModel { String details, String cOCTypeName, String attachment, - AppointmentHistory appointHistory}) async { + AppoitmentAllHistoryResultList appointHistory}) async { setState(ViewState.BusyLocal); await _feedbackService.sendCOCItem( title: title, diff --git a/lib/pages/MyAppointments/widgets/AppointmentActions.dart b/lib/pages/MyAppointments/widgets/AppointmentActions.dart index c37cf6ee..ff133d80 100644 --- a/lib/pages/MyAppointments/widgets/AppointmentActions.dart +++ b/lib/pages/MyAppointments/widgets/AppointmentActions.dart @@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_enh.dart'; import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart'; +import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/appoDetailsButtons.dart'; @@ -685,7 +686,7 @@ class _AppointmentActionsState extends State { } navigateToInsertComplaint() { - Navigator.push(context, FadePage(page: FeedbackHomePage())); + Navigator.push(context, FadePage(page: FeedbackHomePage(messageType: MessageType.ComplaintOnAnAppointment,appointment: widget.appo,))); } rateAppointment() { diff --git a/lib/pages/feedback/appointment_history.dart b/lib/pages/feedback/appointment_history.dart index a1dcdd33..92a26eb1 100644 --- a/lib/pages/feedback/appointment_history.dart +++ b/lib/pages/feedback/appointment_history.dart @@ -5,7 +5,7 @@ class AppointmentHistory { int projectID; int appointmentNo; DateTime appointmentDate; - Null appointmentDateN; + dynamic appointmentDateN; int appointmentType; String bookDate; int patientType; @@ -26,14 +26,14 @@ class AppointmentHistory { String confirmedOn; int arrivalChangedBy; DateTime arrivedOn; - Null editedBy; - Null editedOn; - Null doctorName; - Null doctorNameN; + dynamic editedBy; + dynamic editedOn; + dynamic doctorName; + dynamic doctorNameN; String statusDesc; - Null statusDescN; + dynamic statusDescN; bool vitalStatus; - Null vitalSignAppointmentNo; + dynamic vitalSignAppointmentNo; int episodeID; int actualDoctorRate; String clinicName; @@ -55,8 +55,8 @@ class AppointmentHistory { bool isMedicalReportRequested; bool isOnlineCheckedIN; String latitude; - Null listHISGetContactLensPerscription; - Null listHISGetGlassPerscription; + dynamic listHISGetContactLensPerscription; + dynamic listHISGetGlassPerscription; String longitude; int nextAction; int noOfPatientsRate; diff --git a/lib/pages/feedback/feedback_home_page.dart b/lib/pages/feedback/feedback_home_page.dart index f7f998bf..15f348f9 100644 --- a/lib/pages/feedback/feedback_home_page.dart +++ b/lib/pages/feedback/feedback_home_page.dart @@ -1,5 +1,7 @@ import 'dart:ui'; +import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/pages/feedback/send_feedback_page.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; @@ -10,6 +12,10 @@ import 'package:flutter/material.dart'; import 'status_feedback_page.dart'; class FeedbackHomePage extends StatefulWidget { + final AppoitmentAllHistoryResultList appointment; + final MessageType messageType; + const FeedbackHomePage({Key key, this.appointment, this.messageType= MessageType.NON}) : super(key: key); + @override _FeedbackHomePageState createState() => _FeedbackHomePageState(); } @@ -105,7 +111,7 @@ class _FeedbackHomePageState extends State child: TabBarView( physics: BouncingScrollPhysics(), controller: _tabController, - children: [SendFeedbackPage(), StatusFeedbackPage()], + children: [SendFeedbackPage(appointment: widget.appointment,messageType: widget.messageType,), StatusFeedbackPage()], ), ) ], diff --git a/lib/pages/feedback/send_feedback_page.dart b/lib/pages/feedback/send_feedback_page.dart index 967a3874..bbef1757 100644 --- a/lib/pages/feedback/send_feedback_page.dart +++ b/lib/pages/feedback/send_feedback_page.dart @@ -1,6 +1,8 @@ import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; @@ -20,6 +22,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:permission_handler/permission_handler.dart'; +import 'package:provider/provider.dart'; import 'package:speech_to_text/speech_recognition_error.dart'; import 'dart:convert'; import 'dart:io'; @@ -27,6 +30,10 @@ import 'appointment_history.dart'; import 'package:speech_to_text/speech_to_text.dart' as stt; class SendFeedbackPage extends StatefulWidget { + final AppoitmentAllHistoryResultList appointment; + final MessageType messageType; + const SendFeedbackPage({Key key, this.appointment, this.messageType = MessageType.NON}) : super(key: key); + @override _SendFeedbackPageState createState() => _SendFeedbackPageState(); } @@ -36,7 +43,7 @@ class _SendFeedbackPageState extends State { TextEditingController messageController = TextEditingController(); List images = []; String title; - AppointmentHistory appointHistory; + AppoitmentAllHistoryResultList appointHistory; bool isShowListAppointHistory = true; String message; final formKey = GlobalKey(); @@ -73,17 +80,23 @@ class _SendFeedbackPageState extends State { setMessageType(MessageType messageType) { setState(() { this.messageType = messageType; + this.appointHistory = widget.appointment; }); } @override void initState() { + setState(() { + this.messageType = widget.messageType; + this.appointHistory = widget.appointment; + }); requestPermissions(); super.initState(); } @override Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); return BaseView( allowAny: true, builder: (_, model, widget) => AppScaffold( @@ -144,14 +157,59 @@ class _SendFeedbackPageState extends State { InkWell( onTap: () { setState(() { - isShowListAppointHistory = true; + isShowListAppointHistory = true; }); }, child: Container( margin: EdgeInsets.all(8.0), - color: Colors.white, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8) + ), child: Row( children: [ + Container( + width: projectViewModel.isArabic ? 27 : 20, + height: projectViewModel.isArabic ? 105 : 90, + decoration: BoxDecoration( + //Colors.red[900] Color(0xff404545) + color: appointHistory.isLiveCareAppointment + ? Color(0xff404545) + : !appointHistory.isInOutPatient + ? Colors.red[900] + : Theme.of(context).primaryColor, + borderRadius: BorderRadius.only( + topLeft: projectViewModel.isArabic + ? Radius.circular(0) + : Radius.circular(8), + bottomLeft: projectViewModel.isArabic + ? Radius.circular(0) + : Radius.circular(8), + topRight: projectViewModel.isArabic + ? Radius.circular(8) + : Radius.circular(0), + bottomRight: projectViewModel.isArabic + ? Radius.circular(8) + : Radius.circular(0), + ), + ), + child: RotatedBox( + quarterTurns: 3, + child: Center( + child: Text( + appointHistory.isLiveCareAppointment + ? TranslationBase.of(context).liveCare.toUpperCase() + : !appointHistory.isInOutPatient + ? TranslationBase.of(context) + .inPatient + .toUpperCase() + : TranslationBase.of(context) + .outpatient + .toUpperCase(), + style: TextStyle(color: Colors.white,fontSize: 12), + ), + )), + ), Expanded( flex: 4, child: Column( @@ -182,9 +240,7 @@ class _SendFeedbackPageState extends State { ), Texts( DateUtil - .getMonthDayYearDateFormatted( - appointHistory - .appointmentDate), + .getMonthDayYearDateFormatted(DateUtil.convertStringToDate(appointHistory.appointmentDate)), variant: 'caption3', ), StarRating( @@ -278,10 +334,7 @@ class _SendFeedbackPageState extends State { bold: true, ), Texts( - DateUtil.getMonthDayYearDateFormatted(model - .appointHistoryList[ - index] - .appointmentDate), + DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(model.appointHistoryList[index].appointmentDate)), variant: 'caption3', ), StarRating( diff --git a/lib/pages/medical/patient_sick_leave_page.dart b/lib/pages/medical/patient_sick_leave_page.dart index 196b5d79..dcedc714 100644 --- a/lib/pages/medical/patient_sick_leave_page.dart +++ b/lib/pages/medical/patient_sick_leave_page.dart @@ -47,7 +47,7 @@ class _PatientSickLeavePageState extends State { itemBuilder: (context, index) => DoctorCard( isLiveCareAppointment: model.sickLeaveList[index].isLiveCareAppointment, name: model.sickLeaveList[index].doctorName, - date:projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr(model.sickLeaveList[index].requestDate):DateUtil.getMonthDayYearDateFormatted(model.sickLeaveList[index].requestDate), + date:projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr(model.sickLeaveList[index].appointmentDate):DateUtil.getMonthDayYearDateFormatted(model.sickLeaveList[index].appointmentDate), profileUrl: model.sickLeaveList[index].doctorImageURL, rat: model.sickLeaveList[index].actualDoctorRate.toDouble(), subName: model.sickLeaveList[index].projectName, From 34ccb132dc04a0dd6d402fbccefedf8ab3034d0a Mon Sep 17 00:00:00 2001 From: Fatimah Alshammari Date: Tue, 17 Aug 2021 11:41:01 +0300 Subject: [PATCH 6/9] fixed issues --- lib/config/localized_values.dart | 1 + .../service/ancillary_orders_service.dart | 158 ------------------ .../ancillary_order_proc_model.dart | 38 ++--- .../ancillaryOrdersDetails.dart | 62 ++++++- .../ancillary-orders/ordersPayment.dart | 20 +++ lib/uitl/translations_delegate_base.dart | 1 + 6 files changed, 96 insertions(+), 184 deletions(-) create mode 100644 lib/pages/AlHabibMedicalService/ancillary-orders/ordersPayment.dart diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index e45af168..e23a27bf 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1178,6 +1178,7 @@ const Map localizedValues = { }, "offerAndPackages": {"en": "Offers And Packages", "ar": "العروض والباقات"}, "InvoiceNo": {"en": "Invoice No", "ar": "رقم الفاتورة"}, + "InvoiceDate": {"en": "Invoice Date", "ar": "تاريخ الفاتورة"}, "SpecialResult": {"en": " Special Result", "ar": "نتيجة خاصة"}, "GeneralResult": {"en": "General Result", "ar": "نتيجة عامة"}, "show-more-btn": {"en": "Flow Chart", "ar": "النتائج التراكمية"}, diff --git a/lib/core/service/ancillary_orders_service.dart b/lib/core/service/ancillary_orders_service.dart index da7fc753..8d9d3b31 100644 --- a/lib/core/service/ancillary_orders_service.dart +++ b/lib/core/service/ancillary_orders_service.dart @@ -38,165 +38,7 @@ class AncillaryOrdersService extends BaseService { hasError = false; await baseAppClient.post(GET_ANCILLARY_ORDERS_DETAILS, onSuccess: (dynamic response, int statusCode) { -// _ancillaryProcLists.clear(); _ancillaryProcLists = []; -// response['AncillaryOrderProcList'] = [ -// { -// "AncillaryOrderProcList": [ -// { -// "ApprovalLineItemNo": 0, -// "ApprovalNo": 0, -// "ApprovalStatus": "", -// "ApprovalStatusID": 0, -// "CompanyShare": 501.3, -// "CompanyShareWithTax": 576.5, -// "CompanyTaxAmount": 75.19, -// "DiscountAmount": 55.7, -// "DiscountCategory": 1, -// "DiscountType": "P", -// "DiscountTypeValue": 10, -// "IsApprovalCreated": false, -// "IsApprovalRequired": false, -// "IsCovered": false, -// "OrderDate": "/Date(1601758800000+0300)/", -// "OrderLineItemNo": 1, -// "OrderNo": 2020000001, -// "PartnerID": 0, -// "PartnerShare": 0, -// "PartnerShareType": "P", -// "PatientShare": 0, -// "PatientShareWithTax": 0, -// "PatientTaxAmount": 0, -// "ProcPrice": 557, -// "ProcedureCategoryID": 2, -// "ProcedureCategoryName": "LABORATORY", -// "ProcedureID": "02013001", -// "ProcedureName": "11-DESOXYCORTISOL (COMPOUND S) - S.O", -// "TaxAmount": 75.19, -// "TaxPct": 15 -// }, -// { -// "ApprovalLineItemNo": 0, -// "ApprovalNo": 0, -// "ApprovalStatus": "", -// "ApprovalStatusID": 0, -// "CompanyShare": 90, -// "CompanyShareWithTax": 103.5, -// "CompanyTaxAmount": 13.5, -// "DiscountAmount": 10, -// "DiscountCategory": 1, -// "DiscountType": "P", -// "DiscountTypeValue": 10, -// "IsApprovalCreated": false, -// "IsApprovalRequired": true, -// "IsCovered": false, -// "OrderDate": "/Date(1601758800000+0300)/", -// "OrderLineItemNo": 4, -// "OrderNo": 2020000001, -// "PartnerID": 0, -// "PartnerShare": 0, -// "PartnerShareType": "P", -// "PatientShare": 0, -// "PatientShareWithTax": 0, -// "PatientTaxAmount": 0, -// "ProcPrice": 100, -// "ProcedureCategoryID": 2, -// "ProcedureCategoryName": "LABORATORY", -// "ProcedureID": "02014011", -// "ProcedureName": "CBC (COMPLETE BLOOD COUNT PROFILE)", -// "TaxAmount": 13.5, -// "TaxPct": 15 -// }, -// { -// "ApprovalLineItemNo": 0, -// "ApprovalNo": 0, -// "ApprovalStatus": "", -// "ApprovalStatusID": 0, -// "CompanyShare": 347.76, -// "CompanyShareWithTax": 399.92, -// "CompanyTaxAmount": 52.16, -// "DiscountAmount": 38.64, -// "DiscountCategory": 1, -// "DiscountType": "P", -// "DiscountTypeValue": 10, -// "IsApprovalCreated": false, -// "IsApprovalRequired": false, -// "IsCovered": false, -// "OrderDate": "/Date(1601758800000+0300)/", -// "OrderLineItemNo": 3, -// "OrderNo": 2020000001, -// "PartnerID": 0, -// "PartnerShare": 0, -// "PartnerShareType": "P", -// "PatientShare": 0, -// "PatientShareWithTax": 0, -// "PatientTaxAmount": 0, -// "ProcPrice": 386.4, -// "ProcedureCategoryID": 2, -// "ProcedureCategoryName": "LABORATORY", -// "ProcedureID": "02019302", -// "ProcedureName": "21-HYDROXYLASE ABS - S.O", -// "TaxAmount": 52.16, -// "TaxPct": 15 -// }, -// { -// "ApprovalLineItemNo": 0, -// "ApprovalNo": 0, -// "ApprovalStatus": "", -// "ApprovalStatusID": 0, -// "CompanyShare": 1323, -// "CompanyShareWithTax": 1521.45, -// "CompanyTaxAmount": 198.45, -// "DiscountAmount": 147, -// "DiscountCategory": 1, -// "DiscountType": "P", -// "DiscountTypeValue": 10, -// "IsApprovalCreated": false, -// "IsApprovalRequired": true, -// "IsCovered": false, -// "OrderDate": "/Date(1601758800000+0300)/", -// "OrderLineItemNo": 5, -// "OrderNo": 2020000001, -// "PartnerID": 0, -// "PartnerShare": 0, -// "PartnerShareType": "P", -// "PatientShare": 0, -// "PatientShareWithTax": 0, -// "PatientTaxAmount": 0, -// "ProcPrice": 1470, -// "ProcedureCategoryID": 3, -// "ProcedureCategoryName": "RADIOLOGY", -// "ProcedureID": "03033065", -// "ProcedureName": "CT SCAN - ABDOMEN (WITH CONTRAST)", -// "TaxAmount": 198.45, -// "TaxPct": 15 -// } -// ], -// "AppointmentDate": "/Date(1601499600000+0300)/", -// "AppointmentNo": 2016053756, -// "ClinicID": 1, -// "ClinicName": "INTERNAL MEDICINE CLINIC", -// "CompanyID": 0, -// "CompanyName": "Blood Donation Investigation", -// "DoctorID": 1485, -// "DoctorName": "ANAS ABDULLAH", -// "ErrCode": null, -// "GroupID": 2, -// "InsurancePolicyNo": "45976500", -// "Message": "Success", -// "PatientCardID": "232332323", -// "PatientID": 3072055, -// "PatientName": "MAYA KHALED SADDIQ", -// "PatientType": 1, -// "PolicyID": 2, -// "PolicyName": "Test", -// "ProjectID": 15, -// "SetupID": "010266", -// "StatusCode": 1, -// "SubCategoryID": 2, -// "SubPolicyNo": "234234" -// } -// ]; response['AncillaryOrderProcList'].forEach((item) { ancillaryProcLists.add(AncillaryOrdersListProcListModel.fromJson(item)); diff --git a/lib/models/anicllary-orders/ancillary_order_proc_model.dart b/lib/models/anicllary-orders/ancillary_order_proc_model.dart index 1b557f21..5524f58a 100644 --- a/lib/models/anicllary-orders/ancillary_order_proc_model.dart +++ b/lib/models/anicllary-orders/ancillary_order_proc_model.dart @@ -117,36 +117,36 @@ class AncillaryOrdersListProcListModel { } class AncillaryOrderProcDetailsList { - int approvalLineItemNo; - int approvalNo; + dynamic approvalLineItemNo; + dynamic approvalNo; String approvalStatus; - int approvalStatusID; - int companyShare; - int companyShareWithTax; - int companyTaxAmount; - int discountAmount; - int discountCategory; + dynamic approvalStatusID; + dynamic companyShare; + dynamic companyShareWithTax; + dynamic companyTaxAmount; + dynamic discountAmount; + dynamic discountCategory; String discountType; - int discountTypeValue; + dynamic discountTypeValue; bool isApprovalCreated; bool isApprovalRequired; bool isCovered; String orderDate; - int orderLineItemNo; - int orderNo; - int partnerID; - int partnerShare; + dynamic orderLineItemNo; + dynamic orderNo; + dynamic partnerID; + dynamic partnerShare; String partnerShareType; - int patientShare; - double patientShareWithTax; - double patientTaxAmount; - int procPrice; - int procedureCategoryID; + dynamic patientShare; + dynamic patientShareWithTax; + dynamic patientTaxAmount; + dynamic procPrice; + dynamic procedureCategoryID; String procedureCategoryName; String procedureID; String procedureName; dynamic taxAmount; - int taxPct; + dynamic taxPct; AncillaryOrderProcDetailsList( {this.approvalLineItemNo, diff --git a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart index 535ecb38..6f3ef552 100644 --- a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart +++ b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart @@ -8,6 +8,8 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import "package:collection/collection.dart"; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ancillary-orders/ordersPayment.dart'; class AnicllaryOrdersDetails extends StatefulWidget { final dynamic appoNo; @@ -66,7 +68,12 @@ class _AnicllaryOrdersState extends State children: [ Button( label: TranslationBase.of(context).payNow, - onTap: () {}, + backgroundColor: Colors.red[800], + onTap: () { + Navigator.push(context, + FadePage(page: OrdersPayment(), + ),); + }, ) ], ) @@ -128,7 +135,8 @@ class _AnicllaryOrdersState extends State children: [ Texts( TranslationBase.of(context).invoiceNo, - fontWeight: FontWeight.bold, +// fontWeight: FontWeight.bold, + color: Colors.red[500], ), Texts(" : "), Texts( @@ -139,8 +147,9 @@ class _AnicllaryOrdersState extends State Row( children: [ Texts( - TranslationBase.of(context).date, - fontWeight: FontWeight.bold, + TranslationBase.of(context).invoiceDate, +// fontWeight: FontWeight.bold, + color: Colors.red[500], ), Texts(" : "), Texts( @@ -154,8 +163,9 @@ class _AnicllaryOrdersState extends State Row( children: [ Texts( - TranslationBase.of(context).date, - fontWeight: FontWeight.bold, + TranslationBase.of(context).doctorName, +// fontWeight: FontWeight.bold, + color: Colors.red[500], ), Texts(" : "), Texts( @@ -208,7 +218,43 @@ class _AnicllaryOrdersState extends State Divider( color: Colors.red[800], thickness: 3, - ) + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Row( + children: [ + + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + + children: [ + Texts( + TranslationBase.of(context).price, + color: Colors.grey[500], + fontSize: 14, + ), + SizedBox(width: 15), + Texts( + TranslationBase.of(context).vat, + color: Colors.grey[500], + fontSize: 14, + ), + SizedBox(width: 15), + Texts( + TranslationBase.of(context).total, + color: Colors.grey[500], + fontSize: 14, + ), + ] ), + ], + ), + Divider( + color: Colors.black26, + ), + ], )); } @@ -279,4 +325,6 @@ class _AnicllaryOrdersState extends State }).toList(), ); } + + } diff --git a/lib/pages/AlHabibMedicalService/ancillary-orders/ordersPayment.dart b/lib/pages/AlHabibMedicalService/ancillary-orders/ordersPayment.dart new file mode 100644 index 00000000..fee4ff40 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/ancillary-orders/ordersPayment.dart @@ -0,0 +1,20 @@ +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/material.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; + +class OrdersPayment extends StatefulWidget { + @override + _OrdersPaymentState createState() => _OrdersPaymentState(); +} + +class _OrdersPaymentState extends State { + @override + Widget build(BuildContext context) { + return Container(); + } +} diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 795e9228..0655ce25 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -1061,6 +1061,7 @@ class TranslationBase { localizedValues['offerAndPackages'][locale.languageCode]; String get invoiceNo => localizedValues['InvoiceNo'][locale.languageCode]; + String get invoiceDate => localizedValues['InvoiceNo'][locale.languageCode]; String get specialResult => localizedValues['SpecialResult'][locale.languageCode]; String get generalResult => From 864f849425246413b39b3d90ba704e4ed6b30310 Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Tue, 17 Aug 2021 12:10:10 +0300 Subject: [PATCH 7/9] Baby age in ovulation period --- .../ovulation_period/ovulation_period.dart | 62 ++++++++++--------- .../ovulation_result_page.dart | 2 +- .../AlHabibMedicalService/parking_page.dart | 44 ++++++------- 3 files changed, 57 insertions(+), 51 deletions(-) diff --git a/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_period.dart b/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_period.dart index b05637bc..a6708855 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_period.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_period.dart @@ -19,6 +19,7 @@ class OvulationPeriod extends StatefulWidget { class _OvulationPeriodState extends State { DateTime bloodSugarDate = DateTime.now(); DateTime timeSugarDate = DateTime.now(); + DateTime selectedDateTime = DateTime.now(); int cycleLength = 0; int lutealPhaseLength = 0; String selectedDate; @@ -37,13 +38,30 @@ class _OvulationPeriodState extends State { } String getDate() { - return "${DateUtil.getMonth(bloodSugarDate.month)} ${bloodSugarDate.day}, ${bloodSugarDate.year}"; + return "${DateUtil.getMonth(selectedDateTime.month)} ${selectedDateTime.day}, ${selectedDateTime.year}"; } // void calculate() {} // // void calculateFertility(DateTime selectedDate) {const diff = Date.} + calculateBabyInformation() { + setState(() { + bloodSugarDate = selectedDateTime; + dateFrom = selectedDateTime.add(Duration(days: 10)); + updatedDt = DateFormat.yMMMEd().format(dateFrom); + dateTo = selectedDateTime.add(Duration(days: 20)); + conceivedDate = selectedDateTime.add(Duration(days: 14)); + deliveryDue = selectedDateTime.add(Duration(days: 280)); + + // babyAge = Jiffy([DateTime.now()]).diff(Jiffy([date]), Units.WEEK); + babyAgeWeeks = Jiffy([DateTime.now().year, DateTime.now().month, DateTime.now().day]) + .diff(Jiffy([selectedDateTime.year, selectedDateTime.month, dateTo.day]), Units.WEEK); + babyAgeDays = Jiffy([DateTime.now().year, DateTime.now().month, DateTime.now().day]) + .diff(Jiffy([selectedDateTime.year, selectedDateTime.month, dateTo.day]), Units.DAY); + }); + } + @override Widget build(BuildContext context) { return AppScaffold( @@ -78,18 +96,7 @@ class _OvulationPeriodState extends State { onConfirm: (date) { print('confirm $date'); setState(() { - bloodSugarDate = date; - dateFrom = date.add(Duration(days: 10)); - updatedDt = DateFormat.yMMMEd().format(dateFrom); - dateTo = date.add(Duration(days: 20)); - conceivedDate = date.add(Duration(days: 14)); - deliveryDue = date.add(Duration(days: 280)); - - // babyAge = Jiffy([DateTime.now()]).diff(Jiffy([date]), Units.WEEK); - babyAgeWeeks = Jiffy([DateTime.now().year, DateTime.now().month, DateTime.now().day]) - .diff(Jiffy([date.year, date.month, dateTo.day]), Units.WEEK); - babyAgeDays = Jiffy([DateTime.now().year, DateTime.now().month, DateTime.now().day]) - .diff(Jiffy([date.year, date.month, dateTo.day]), Units.DAY); + selectedDateTime = date; }); }, currentTime: DateTime.now(), @@ -321,22 +328,19 @@ class _OvulationPeriodState extends State { child: SecondaryButton( label: 'CALCULATE', onTap: () { - setState(() { - { - Navigator.push( - context, - FadePage( - page: OvulationResult( - conceivedDate: conceivedDate, - dateFrom: dateFrom, - dateTo: dateTo, - deliveryDue: deliveryDue, - babyAge: babyAgeWeeks, - babyAgeDays: babyAgeDays, - )), - ); - } - }); + calculateBabyInformation(); + Navigator.push( + context, + FadePage( + page: OvulationResult( + conceivedDate: conceivedDate, + dateFrom: dateFrom, + dateTo: dateTo, + deliveryDue: deliveryDue, + babyAge: babyAgeWeeks, + babyAgeDays: babyAgeDays, + )), + ); }, ), ), diff --git a/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_result_page.dart b/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_result_page.dart index 855e5af7..53ccb664 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_result_page.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_result_page.dart @@ -78,7 +78,7 @@ class OvulationResult extends StatelessWidget { fontWeight: FontWeight.w400, ), Texts( - babyAge.toString() + " Weeks," + "2", + babyAge <= 0 ? "baby age is not available" : babyAge.toString() + " Weeks," + "3", fontWeight: FontWeight.w800, fontSize: 21.0, ), diff --git a/lib/pages/AlHabibMedicalService/parking_page.dart b/lib/pages/AlHabibMedicalService/parking_page.dart index 19f06a56..f3620917 100644 --- a/lib/pages/AlHabibMedicalService/parking_page.dart +++ b/lib/pages/AlHabibMedicalService/parking_page.dart @@ -1,4 +1,5 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/qr_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; @@ -9,11 +10,13 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:maps_launcher/maps_launcher.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:provider/provider.dart'; import '../../d_q_icons_icons.dart'; class ParkingPage extends StatelessWidget { @override Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); return BaseView( onModelReady: (model) => model.getIsSaveParking(), builder: (_, model, widget) => AppScaffold( @@ -21,10 +24,7 @@ class ParkingPage extends StatelessWidget { appBarTitle: TranslationBase.of(context).parking, description: TranslationBase.of(context).parkingDescription, imagesInfo: [ - ImagesInfo( - imageAr: 'assets/images/bc_parking.png', - imageEn: 'assets/images/bc_parking.png', - isAsset: true) + ImagesInfo(imageAr: 'assets/images/bc_parking.png', imageEn: 'assets/images/bc_parking.png', isAsset: true) ], body: SingleChildScrollView( padding: EdgeInsets.all(12), @@ -50,7 +50,9 @@ class ParkingPage extends StatelessWidget { Row( children: [ Expanded( - child: Container(child: Icon(/*Icons.landscape*/DQIcons.parking_icon,size: 130),), + child: Container( + child: Icon(/*Icons.landscape*/ DQIcons.parking_icon, size: 130), + ), ), SizedBox( width: 15, @@ -85,15 +87,15 @@ class ParkingPage extends StatelessWidget { padding: EdgeInsets.all(8), width: double.infinity, decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10), - color: Colors.white, - shape: BoxShape.rectangle), + borderRadius: BorderRadius.circular(10), color: Colors.white, shape: BoxShape.rectangle), height: 70, child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Texts(TranslationBase.of(context).showMyPark), - Texts(model.qrParkingModel.floorDescriptionN), + Texts(projectViewModel.isArabic + ? model.qrParkingModel.floorDescriptionN + : model.qrParkingModel.floorDescription), ], ), ), @@ -102,9 +104,7 @@ class ParkingPage extends StatelessWidget { ), Container( decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10), - color: Colors.white, - shape: BoxShape.rectangle), + borderRadius: BorderRadius.circular(10), color: Colors.white, shape: BoxShape.rectangle), padding: EdgeInsets.all(8), width: double.infinity, height: 70, @@ -112,7 +112,9 @@ class ParkingPage extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Texts(TranslationBase.of(context).gate), - Texts(model.qrParkingModel.gateDescriptionN), + Texts(projectViewModel.isArabic + ? model.qrParkingModel.gateDescriptionN + : model.qrParkingModel.gateDescription), ], ), ), @@ -121,9 +123,7 @@ class ParkingPage extends StatelessWidget { ), Container( decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10), - color: Colors.white, - shape: BoxShape.rectangle), + borderRadius: BorderRadius.circular(10), color: Colors.white, shape: BoxShape.rectangle), padding: EdgeInsets.all(8), width: double.infinity, height: 70, @@ -131,7 +131,9 @@ class ParkingPage extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Texts(TranslationBase.of(context).building), - Texts(model.qrParkingModel.buildingDescriptionN), + Texts(projectViewModel.isArabic + ? model.qrParkingModel.buildingDescriptionN + : model.qrParkingModel.buildingDescription), ], ), ), @@ -141,16 +143,16 @@ class ParkingPage extends StatelessWidget { Container( padding: EdgeInsets.all(8), decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10), - color: Colors.white, - shape: BoxShape.rectangle), + borderRadius: BorderRadius.circular(10), color: Colors.white, shape: BoxShape.rectangle), width: double.infinity, height: 70, child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Texts(TranslationBase.of(context).branch), - Texts(model.qrParkingModel.branchDescriptionN), + Texts(projectViewModel.isArabic + ? model.qrParkingModel.branchDescriptionN + : model.qrParkingModel.branchDescription), ], ), ), From fe83b91602dae19d5d98d192ef4e1aaab18a6077 Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Tue, 17 Aug 2021 14:58:10 +0300 Subject: [PATCH 8/9] body fat texfield fix --- .../health_calculator/body_fat/body_fat.dart | 43 ++++++++++--------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart b/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart index 7f0d0c5c..44a3dc9e 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart @@ -50,6 +50,15 @@ class _BodyFatState extends State { TextEditingController waistController = TextEditingController(); TextEditingController hipController = TextEditingController(); + @override + void initState() { + neckController.text = neck.toString(); + hipController.text = hip.toString(); + waistController.text = waist.toString(); + heightController.text = heightCm.toString(); + super.initState(); + } + void updateColorHeight(int type) { //MG/DLT card if (type == 1) { @@ -319,11 +328,6 @@ class _BodyFatState extends State { child: TextFormField( keyboardType: TextInputType.number, controller: heightController, - decoration: InputDecoration( - labelText: heightCm.toString(), - labelStyle: TextStyle( - color: Colors.black, - )), ), ), ), @@ -350,6 +354,7 @@ class _BodyFatState extends State { onTap: () { setState(() { if (heightCm < 250) heightCm++; + heightController.text = heightCm.toString(); }); }, ), @@ -362,6 +367,7 @@ class _BodyFatState extends State { onTap: () { setState(() { if (heightCm > 0) heightCm--; + heightController.text = heightCm.toString(); }); }, ), @@ -381,6 +387,7 @@ class _BodyFatState extends State { onChanged: (double newValue) { setState(() { heightCm = newValue.round(); + heightController.text = heightCm.toString(); }); }, activeColor: Color(0xffC5272D), @@ -492,15 +499,10 @@ class _BodyFatState extends State { Expanded( child: Center( child: Padding( - padding: const EdgeInsets.only(left: 10.0), + padding: const EdgeInsets.only(left: 15.0, bottom: 0), child: TextFormField( keyboardType: TextInputType.number, controller: neckController, - decoration: InputDecoration( - labelText: neck.toString(), - labelStyle: TextStyle( - color: Colors.black, - )), ), ), ), @@ -527,6 +529,7 @@ class _BodyFatState extends State { onTap: () { setState(() { if (neck < 60) neck++; + neckController.text = neck.toString(); }); }, ), @@ -539,6 +542,7 @@ class _BodyFatState extends State { onTap: () { setState(() { if (neck > 5) neck--; + neckController.text = neck.toString(); }); }, ), @@ -558,6 +562,7 @@ class _BodyFatState extends State { onChanged: (double newValue) { setState(() { neck = newValue.round(); + neckController.text = neck.toString(); }); }, activeColor: Color(0xffC5272D), @@ -673,11 +678,6 @@ class _BodyFatState extends State { child: TextFormField( keyboardType: TextInputType.number, controller: waistController, - decoration: InputDecoration( - labelText: waist.toString(), - labelStyle: TextStyle( - color: Colors.black, - )), ), ), ), @@ -704,6 +704,7 @@ class _BodyFatState extends State { onTap: () { setState(() { if (waist < 200) waist++; + waistController.text = waist.toString(); }); }, ), @@ -716,6 +717,7 @@ class _BodyFatState extends State { onTap: () { setState(() { if (waist > 5) waist--; + waistController.text = waist.toString(); }); }, ), @@ -735,6 +737,7 @@ class _BodyFatState extends State { onChanged: (double newValue) { setState(() { waist = newValue.round(); + waistController.text = waist.toString(); }); }, activeColor: Color(0xffC5272D), @@ -850,11 +853,6 @@ class _BodyFatState extends State { child: TextFormField( keyboardType: TextInputType.number, controller: hipController, - decoration: InputDecoration( - labelText: hip.toString(), - labelStyle: TextStyle( - color: Colors.black, - )), ), ), ), @@ -881,6 +879,7 @@ class _BodyFatState extends State { onTap: () { setState(() { if (hip < 140) hip++; + hipController.text = hip.toString(); }); }, ), @@ -893,6 +892,7 @@ class _BodyFatState extends State { onTap: () { setState(() { if (hip > 5) hip--; + hipController.text = hip.toString(); }); }, ), @@ -912,6 +912,7 @@ class _BodyFatState extends State { onChanged: (double newValue) { setState(() { hip = newValue.round(); + hipController.text = hip.toString(); }); }, activeColor: Color(0xffC5272D), From 0121337d1b27280860cdc9939b9811dd1feaf522 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 17 Aug 2021 16:21:18 +0300 Subject: [PATCH 9/9] LiveCare Flow from book appointment flow implemented --- assets/images/new-design/doctor_white.png | Bin 0 -> 2350 bytes lib/config/localized_values.dart | 45 ++- lib/config/shared_pref_kay.dart | 1 + .../components/LiveCareBookAppointment.dart | 305 +++++++++++++++++- .../components/SearchByClinic.dart | 152 +++++---- lib/pages/livecare/widgets/clinic_list.dart | 76 +++-- lib/uitl/translations_delegate_base.dart | 10 + 7 files changed, 483 insertions(+), 106 deletions(-) create mode 100644 assets/images/new-design/doctor_white.png diff --git a/assets/images/new-design/doctor_white.png b/assets/images/new-design/doctor_white.png new file mode 100644 index 0000000000000000000000000000000000000000..bb5944cb5828fcf535bbd84be11ccf7b7cb7c533 GIT binary patch literal 2350 zcmV+}3DNe6P)Px#IAvH#W=%~1DgXcg2mk?xX#fNO00031000^Q000000-yo_1ONa40RR91KA-~t z1ONa40RR91MgRZ+0MALI&j0`jq)9|URCodHnvHSWND_sus|x@ZfhU8*Mj&hiVg|-V zuyh2%Mqpk9f+H|D0>TlP8v)@6#EroBJ*b;C90B|RL9V@fUG>yGuYYHT1S#2fZzhy) z-@av(dj|@G)|beZqy5OkoBpqusW)&d1b>bEuPB zE!A`>U^0QHiDqX`EB{&B!}imR}oB~M*Ffv+moqp>ElOPXD}alhr(hu|i3D<6Q~i>YiN z^l`T*;=l%^q8h5@eU!JhC2f4>*Z0`4dC6;_+&cOVQ?0ZFBC(7H{D zZmC!B>8+r=#xNJx8w`n0eo3tubO1}BSHWnR`lTLhlJ(F;T;vvCHRSK%y;hKq{1!En zeThu^Qom%7Tj&088|Njix5^_3mmJm)w{bQ*2Nfv6X!#L0K6+ISGW`G;-eOypZ#n-s8e@ z6Q*+`!EQw=pQ^NKMRmhebtkREfc^mbGF4$}`d8z6s+yD6VaN>ld%e1}0ksxDqMF&I z^{$%FfHO^MQjTp#zCN;Cim`QWmdB(SSoy^0$8(!2C(2)8fA_Z?4;;G03_%E zxr!6b)~~x~AK9I{zXGV%@OD6lo@cN@PgH+u(FN5WA5qRH3fgQjcEI|ugWQ&te zF$It`NiF%doyUGBkNr2b8A8Lj>~7kJz|okqaPF8UzIWrw!#A^f&**Th*46wp*DXob z-UK@X_aFx@nfs4v65_*DjeD@m$6f=;{8+84`DyMqT4Cz}rH4-{^|=F3piYahR&DiI zn6Ejv?j-Rv*KIu85Qo$X=kCUiHCHT9&N0~#kRPiziJwLf;0g3?cnLoTGmwhni(^A5 z2K3byuiEO7$_C;I_}}=CwK?vmSOD+9Cy>fEBKB?+zA@hdy^i7rzl0F;7{w{4wsjLv z3YSH3+sJlPv%Ui%&O6B_NhiDlsc4`D=w4#(OpC&o=Ij0 zF=EzJzjIk!&O-Iq79Xn>iz3bMT@&a-dx0g!9E3Q5b>;!7PjPUq`MbffXJBhw_tM8M zfWNfmi(?hq#y#DZL*i@KPyx)r62ww^Os^(VgSb=}SsEw~Jb_eJ5W(ZIl`mOFoCaHW z?EVjNajp+ud2XydHRe*A7|rQ3C?!v0c59rqB9O(7j0|`c`=S7o1}(Vg_PPe>;G}Go zK^Nc&r1At&Sj?+D@v(Sv%njMZ))rq6#b_{p+4Y`IR3yD29f&x|${S!WJLcu#7$2Bu z`5N=PQp_h?EWJ*uJvin2*2Lx(|J>)-rn6%O-H(2CFmXP1P!seFq@u&^{1y{fi%VrD ze=GzP;3*1}{c4stM|KpSr9L@TRI+~Md`b3`+xGdzk=t|?>}6}**0|cV)CX{HkS$T1 z$F$0g1>X}Gk}{4>ZIafOShz3#^Rk~@>&`^`Y4sjV66>`@*OBi(X3x=$LAFFX>#Y48 z9cTq#nos|D__N`oaZkh)X7{Pq$o!R)#08L4ubdF@Md#&K`~2dRYcZ9_unxvaW#CJ+ zc2k^uE+NVn|7?z#^RD5&=iu+@QOv^g`fj{&XQE%9Rua&+)*TUXf1PV>$eHtEp7Hp3v!!|On$(7KfP_b*ly!?@*jzRpX9{L5HAL7A9Bxa^_LOp zgNSM(K91>V+l&rP&kBE4L@95cZ1G!6_SnB0m-qOFDVjDwG8>A*S9B3Qe-MPv%_p_1 zAv@xGhe~2rtbYNIz#o)b?A~0T6@LvRbLURdB>2XQp#)-rDogrepxe&LFGB8TT^hG` zu1{N>HkgXIqAw@rh^Z{G-tkHVvmMc6;P=xldfYq8iVtmkZvK@guwEH=^d^W4KsA=2 z1|`V6)*(%t_9$s~aV)ye$sN&S5VKYm@(Auh@G$JmxCeA6?u#`J#kpt`g3C!8i0hqW z(`47H%X>u(R3onP2~9tHC~Mt7EVcVmO_0Z`p4VKaao1Q!0|x!Cr(jJ!A8N+aRYSJK zloq!(Ev3Qz#u~+n9FQ9R0lbU+;%*_@<2?v(qElboqO*F?a~qw0d&9o9^{w~K2(dIh4pRpvUBnG=%L)nd^D|u$qJrO zhL#9-rs4rY`#PZder}wMIUE1AGh`Y0O8aF U(?VD31poj507*qoM6N<$g0vcmF#rGn literal 0 HcmV?d00001 diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index c92f0a45..a6f3efd7 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1447,12 +1447,13 @@ const Map localizedValues = { }, "verification_message_code": {"en": "Please enter verification code", "ar": "الرجاء إدخال رمز التحقق"}, "select-location": {"en": "Select Location", "ar": "اختر موقعا"}, - "result-header": {"en": "Get The Result During 8 Hours", "ar": "احصل على النتيجة خلال 8 ساعة"}, + "result-header": { + "en": "Get the result in Few Hours", + "ar": "احصل على النتيجة خلال عدة ساعات" + }, "covid-info": { - "en": - "We are using the advance technology to test COVID-19, The sample for examination is taking between the nose and mouth (nasopharyngeal swab), the examination is done by ELITE In Genius of the company ELITECH GROUP MOLECULAR DIAGNOSTICS, Note that the device belongs to an Italian company and is manufactured in Japan with RC- PCR​", - "ar": - "يتوفر لدينا أحدث جهاز خاص بفحص مرض الكورونا (COVID-19) طريقة الفحص تؤخذ مسحة من البلعوم الأنفي ( عن طريف الأنف) ويتم الفحص بواسطة جهاز ELITE In Genius التابع لشركة ELITECH GROUP MOLECULAR DIAGNOSTICS علما بأن الجهاز تابع لشركة إيطالية ومصنع في اليابان بتقينة RC-PCR" + "en": "Dr. Sulaiman Al Habib hospitals are conducting a test for the emerging corona virus and issuing travel certificates 24/7 in a short time and with high accuracy. Those wishing to benefit from this service can visit one of Dr. Sulaiman Al Habib branches to conduct a corona test within few minutes, and obtain the result within several hours. Corona Virus Covid 19 testing service with PCR technology to detect the virus according to the highest international standards and with the latest high-precision RT-PCR devices (American GeneXpert and others), That is approved by the Food and Drug Authority as well as by the Saudi Center for Infectious Diseases Prevention.", + "ar": "تجري مستشفيات د. سليمان الحبيب فحص فيروس كورونا المستجد وتصدر شهادات السفر على مدار الساعة، طوال أيام الأسبوع، وبسرعة ودقة عالية. يمكن للراغبين في الاستفادة من هذه الخدمة زيارة أحد فروع مستشفيات د. سليمان الحبيب وإجراء فحص كورونا خلال بضع دقائق والحصول على النتائج خلال عدة ساعات خدمة فحص فيروس كورونا Covid 19 بتقنية PCR للكشف عن الفيروس وفقاً لأعلى المعايير العالمية وبأحدث أجهزة RT-PCR عالية الدقة (GeneXpert الأمريكي وغيره)، وهي طرق معتمدة من قبل هيئة الغذاء والدواء وكذلك من قبل المركز السعودي للوقاية من الأمراض المُعدية" }, "select-appo": { "en": "Kindly select one of the available appointments from below:", @@ -1597,7 +1598,39 @@ const Map localizedValues = { "ar": "لا داعي للانتظار او الحضور يمكنك الان الحصول على الاستشارة عن طريق مكالمة الفيديو ( خدمة لايف كير) في العيادة وسوف يقوم الطبيب بالتواصل معك فورا" }, "livecareModal-top": { - "en": "This Clinic is Accepting livecare services", + "en": "This Clinic is accepting LiveCare services", "ar": "هذه العيادة تقدم خدمة لايف كير" }, + "livecare-point-2": { + "en": "A Specialized doctor will contact you", + "ar": "سوف يقوم بخدمتك طبيب متخصص" + }, + "livecare-point-3": { + "en": "A Doctor will be able to see your full medical file history", + "ar": "سوف يتمكن الطبيب من الاطلاع على ملفك الطبي كاملا" + }, + "livecare-point-4": { + "en": "Free Medicine delivery Available", + "ar": "خدمة توصيل الادوية مجانا" + }, + "livecare-point-5": { + "en": "No need to visit the service is in your place", + "ar": "لا داعي للحضور سوف تحصل على الخدمة في مكانك" + }, + "book-immediate-livecare": { + "en": "I accept to get the service immediately", + "ar": "موافق اريد الحصول على الخدمة فورا" + }, + "book-video-livecare-2": { + "en": "I don't need to visit the clinic", + "ar": "اتصال فيديو لا احتاج الحضور الى العيادة" + }, + "no-thankyou": { + "en": "No Thanks", + "ar": "لا شكرا" + }, + "visit-clinic": { + "en": "Schedule appointment with the doctor", + "ar": "ارغب في حجز موعد مجدول مع الطبيب" + }, }; diff --git a/lib/config/shared_pref_kay.dart b/lib/config/shared_pref_kay.dart index 703f5e3c..4f83e7eb 100644 --- a/lib/config/shared_pref_kay.dart +++ b/lib/config/shared_pref_kay.dart @@ -31,3 +31,4 @@ const PHARMACY_SELECTED_ADDRESS = 'selected-address'; const PHARMACY_AUTORZIE_TOKEN = 'PHARMACY_AUTORZIE_TOKEN'; const H2O_UNIT = 'H2O_UNIT'; const H2O_REMINDER = 'H2O_REMINDER'; +const LIVECARE_CLINIC_DATA = 'LIVECARE_CLINIC_DATA'; diff --git a/lib/pages/BookAppointment/components/LiveCareBookAppointment.dart b/lib/pages/BookAppointment/components/LiveCareBookAppointment.dart index 4f64aa58..ee3e7b4a 100644 --- a/lib/pages/BookAppointment/components/LiveCareBookAppointment.dart +++ b/lib/pages/BookAppointment/components/LiveCareBookAppointment.dart @@ -1,14 +1,26 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; class LiveCareBookAppointment extends StatefulWidget { + final dynamic clinicName; + final dynamic liveCareClinicID; + final dynamic liveCareServiceID; + + LiveCareBookAppointment( + {this.clinicName, this.liveCareClinicID, this.liveCareServiceID}); + @override _LiveCareBookAppointmentState createState() => _LiveCareBookAppointmentState(); } class _LiveCareBookAppointmentState extends State { + AppSharedPreferences sharedPref = AppSharedPreferences(); + @override Widget build(BuildContext context) { return AppScaffold( @@ -34,7 +46,7 @@ class _LiveCareBookAppointmentState extends State { margin: EdgeInsets.all(15.0), padding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), decoration: BoxDecoration( - color: Colors.green, + color: Color(0xff20bc44), borderRadius: BorderRadius.all(Radius.circular(8.0))), child: Text(TranslationBase.of(context).livecareModalTop, textAlign: TextAlign.center, @@ -44,6 +56,297 @@ class _LiveCareBookAppointmentState extends State { fontWeight: FontWeight.w600, letterSpacing: 0.5)), ), + Container( + margin: EdgeInsets.all(15.0), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: SvgPicture.asset( + "assets/images/new-design/liveCare_mobile_care.svg", + width: 150.0), + ), + Container( + margin: EdgeInsets.only(left: 10.0, right: 10.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(bottom: 7.0), + child: Text( + TranslationBase.of(context).whyLivecare, + style: TextStyle( + fontSize: 20.0, + fontWeight: FontWeight.w600, + letterSpacing: 1.0, + color: Colors.black)), + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: SvgPicture.asset( + "assets/images/new-design/ionic-ios-checkmark-circle.svg"), + ), + Container( + width: + MediaQuery.of(context).size.width * 0.4, + margin: EdgeInsets.only( + left: 5.0, right: 5.0, bottom: 10.0), + child: Text( + TranslationBase.of(context) + .livecarePoint1, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 12.0, + letterSpacing: 0.5, + color: Colors.black)), + ), + ], + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: SvgPicture.asset( + "assets/images/new-design/ionic-ios-checkmark-circle.svg"), + ), + Container( + width: + MediaQuery.of(context).size.width * 0.4, + margin: EdgeInsets.only( + left: 5.0, right: 5.0, bottom: 10.0), + child: Text( + TranslationBase.of(context) + .livecarePoint5, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 12.0, + letterSpacing: 0.5, + color: Colors.black)), + ), + ], + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: SvgPicture.asset( + "assets/images/new-design/ionic-ios-checkmark-circle.svg"), + ), + Container( + width: + MediaQuery.of(context).size.width * 0.4, + margin: EdgeInsets.only( + left: 5.0, right: 5.0, bottom: 10.0), + child: Text( + TranslationBase.of(context) + .livecarePoint2, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 12.0, + letterSpacing: 0.5, + color: Colors.black)), + ), + ], + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: SvgPicture.asset( + "assets/images/new-design/ionic-ios-checkmark-circle.svg"), + ), + Container( + width: + MediaQuery.of(context).size.width * 0.4, + margin: EdgeInsets.only( + left: 5.0, right: 5.0, bottom: 10.0), + child: Text( + TranslationBase.of(context) + .livecarePoint3, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 12.0, + letterSpacing: 0.5, + color: Colors.black)), + ), + ], + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: SvgPicture.asset( + "assets/images/new-design/ionic-ios-checkmark-circle.svg"), + ), + Container( + width: + MediaQuery.of(context).size.width * 0.4, + margin: + EdgeInsets.only(left: 5.0, right: 5.0), + child: Text( + TranslationBase.of(context) + .livecarePoint4, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 12.0, + letterSpacing: 0.5, + color: Colors.black)), + ), + ], + ), + ], + ), + ) + ], + ), + ), + Container( + child: Text(TranslationBase.of(context).livecareSummary, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 12.0, + letterSpacing: 0.5, + color: Colors.black)), + ), + Container( + child: InkWell( + onTap: () { + sharedPref.setString( + LIVECARE_CLINIC_DATA, + widget.clinicName + + "-" + + widget.liveCareClinicID + + "-" + + widget.liveCareServiceID); + Navigator.pop(context, "livecare"); + }, + child: Container( + decoration: BoxDecoration( + color: Colors.grey[700], + borderRadius: + BorderRadius.all(Radius.circular(10.0))), + margin: EdgeInsets.only(top: 10.0), + padding: EdgeInsets.all(10.0), + child: Row( + children: [ + Container( + margin: EdgeInsets.only(left: 10.0, right: 10.0), + child: SvgPicture.asset( + "assets/images/new-design/liveCare_logo_icon_white.svg", + width: 70), + ), + Container( + width: MediaQuery.of(context).size.width * 0.58, + margin: EdgeInsets.fromLTRB(0.0, 5.0, 0.0, 0.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.fromLTRB( + 10.0, 0.0, 10.0, 0.0), + child: Text( + TranslationBase.of(context) + .bookImmediateLivecare, + overflow: TextOverflow.clip, + style: TextStyle( + fontWeight: FontWeight.w500, + fontSize: 16.0, + letterSpacing: 0.7, + color: Colors.white)), + ), + Container( + margin: + EdgeInsets.only(top: 5.0, left: 10.0), + child: Text( + TranslationBase.of(context) + .bookVideoLivecare2, + textAlign: TextAlign.start, + style: TextStyle( + fontSize: 13.0, + color: Colors.white)), + ) + ], + ), + ), + ], + )), + ), + ), + Container( + child: InkWell( + onTap: () { + Navigator.pop(context, "schedule"); + }, + child: Container( + decoration: BoxDecoration( + color: Colors.grey[700], + borderRadius: + BorderRadius.all(Radius.circular(10.0))), + margin: EdgeInsets.only(top: 10.0), + padding: EdgeInsets.all(10.0), + child: Row( + children: [ + Container( + margin: EdgeInsets.only(left: 10.0, right: 10.0), + child: Image.asset( + "assets/images/new-design/doctor_white.png", + width: 50), + ), + Container( + width: MediaQuery.of(context).size.width * 0.58, + margin: EdgeInsets.fromLTRB(0.0, 5.0, 0.0, 0.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.fromLTRB( + 28.0, 0.0, 28.0, 0.0), + child: Text( + TranslationBase.of(context).noThankyou, + overflow: TextOverflow.clip, + style: TextStyle( + fontWeight: FontWeight.w500, + fontSize: 16.0, + letterSpacing: 0.7, + color: Colors.white)), + ), + Container( + margin: EdgeInsets.only( + top: 5.0, left: 28.0, right: 28.0), + child: Text( + TranslationBase.of(context).visitClinic, + textAlign: TextAlign.start, + style: TextStyle( + fontSize: 13.0, + color: Colors.white)), + ) + ], + ), + ), + ], + )), + ), + ), + Container( + margin: EdgeInsets.only(top: 10.0), + child: InkWell( + onTap: () { + Navigator.pop(context, "false"); + }, + child: Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Text(TranslationBase.of(context).cancel, + style: TextStyle( + fontSize: 16.0, + letterSpacing: 0.5, + color: Color(0xffc5272d))), + ], + ), + ), + ), ], ), ), diff --git a/lib/pages/BookAppointment/components/SearchByClinic.dart b/lib/pages/BookAppointment/components/SearchByClinic.dart index 1b6172b0..cf562ece 100644 --- a/lib/pages/BookAppointment/components/SearchByClinic.dart +++ b/lib/pages/BookAppointment/components/SearchByClinic.dart @@ -7,6 +7,7 @@ import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.da import 'package:diplomaticquarterapp/models/Clinics/ClinicListResponse.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/DentalComplaints.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart'; +import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; @@ -243,92 +244,105 @@ class _SearchByClinicState extends State { // TODO Mosa_REMARk to come back later getDoctorsList(BuildContext context) { - GifLoaderDialogUtils.showMyDialog(context); SearchInfo searchInfo = new SearchInfo(); if (dropdownValue == "17") { searchInfo.ProjectID = int.parse(projectDropdownValue); searchInfo.ClinicID = int.parse(dropdownValue); searchInfo.date = DateTime.now(); - GifLoaderDialogUtils.hideDialog(context); navigateToDentalComplaints(context, searchInfo); } else if (dropdownValue.split("-")[1] == "true" - // && - // authProvider.isLogin && + // && authProvider.isLogin && // authUser.patientType == 1 - ) { + ) { Navigator.push( context, FadePage( - page: LiveCareBookAppointment(), + page: LiveCareBookAppointment( + clinicName: "Family Medicine", + liveCareClinicID: dropdownValue.split("-")[2], + liveCareServiceID: dropdownValue.split("-")[3]), ), - ); + ).then((value) { + print(value); + if (value == "false") dropdownValue = ""; + if (value == "livecare") { + Navigator.push(context, FadePage(page: LiveCareHome())); + } + if (value == "schedule") { + callDoctorsSearchAPI(); + } + }); } else { - List doctorsList = []; - List arr = []; - List arrDistance = []; - List result; - int numAll; - List _patientDoctorAppointmentListHospital = - List(); + callDoctorsSearchAPI(); + } + } - DoctorsListService service = new DoctorsListService(); - service - .getDoctorsList( - int.parse(dropdownValue.split("-")[0]), - projectDropdownValue != "" ? int.parse(projectDropdownValue) : 0, - nearestAppo, - context) - .then((res) { - GifLoaderDialogUtils.hideDialog(context); - if (res['MessageStatus'] == 1) { - setState(() { - if (res['DoctorList'].length != 0) { - // print(res['DoctorList']); - doctorsList.clear(); - res['DoctorList'].forEach((v) { - doctorsList.add(new DoctorList.fromJson(v)); - }); - doctorsList.forEach((element) { - List doctorByHospital = - _patientDoctorAppointmentListHospital - .where( - (elementClinic) => - elementClinic.filterName == element.projectName, - ) - .toList(); + callDoctorsSearchAPI() { + GifLoaderDialogUtils.showMyDialog(context); + List doctorsList = []; + List arr = []; + List arrDistance = []; + List result; + int numAll; + List _patientDoctorAppointmentListHospital = + List(); - if (doctorByHospital.length != 0) { - _patientDoctorAppointmentListHospital[ - _patientDoctorAppointmentListHospital - .indexOf(doctorByHospital[0])] - .patientDoctorAppointmentList - .add(element); - } else { - _patientDoctorAppointmentListHospital.add( - PatientDoctorAppointmentList( - filterName: element.projectName, - distanceInKMs: - element.projectDistanceInKiloMeters.toString(), - patientDoctorAppointment: element)); - } - }); - } else {} - }); + DoctorsListService service = new DoctorsListService(); + service + .getDoctorsList( + int.parse(dropdownValue.split("-")[0]), + projectDropdownValue != "" ? int.parse(projectDropdownValue) : 0, + nearestAppo, + context) + .then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + setState(() { + if (res['DoctorList'].length != 0) { + doctorsList.clear(); + res['DoctorList'].forEach((v) { + doctorsList.add(new DoctorList.fromJson(v)); + }); + doctorsList.forEach((element) { + List doctorByHospital = + _patientDoctorAppointmentListHospital + .where( + (elementClinic) => + elementClinic.filterName == element.projectName, + ) + .toList(); - result = LinkedHashSet.from(arr).toList(); - numAll = result.length; - navigateToSearchResults( - context, doctorsList, _patientDoctorAppointmentListHospital); - } else { - AppToast.showErrorToast(message: res['ErrorEndUserMessage']); - } - }).catchError((err) { - GifLoaderDialogUtils.hideDialog(context); - print(err); - AppToast.showErrorToast(message: err); - }); - } + if (doctorByHospital.length != 0) { + _patientDoctorAppointmentListHospital[ + _patientDoctorAppointmentListHospital + .indexOf(doctorByHospital[0])] + .patientDoctorAppointmentList + .add(element); + } else { + _patientDoctorAppointmentListHospital.add( + PatientDoctorAppointmentList( + filterName: element.projectName, + distanceInKMs: + element.projectDistanceInKiloMeters.toString(), + patientDoctorAppointment: element)); + } + }); + } else {} + }); + + result = LinkedHashSet.from(arr).toList(); + numAll = result.length; + navigateToSearchResults( + context, doctorsList, _patientDoctorAppointmentListHospital); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + AppToast.showErrorToast(message: err); + }); } Future navigateToDentalComplaints( diff --git a/lib/pages/livecare/widgets/clinic_list.dart b/lib/pages/livecare/widgets/clinic_list.dart index 0e8c64f1..0b4150aa 100644 --- a/lib/pages/livecare/widgets/clinic_list.dart +++ b/lib/pages/livecare/widgets/clinic_list.dart @@ -57,6 +57,8 @@ class _clinic_listState extends State { bool isLiveCareTypeSelected = false; + String liveCareClinicIDs; + @override void initState() { liveCareClinicsListResponse = new LiveCareClinicsListResponse(); @@ -64,7 +66,9 @@ class _clinic_listState extends State { new LiveCareScheduleClinicsListResponse(); WidgetsBinding.instance.addPostFrameCallback((_) { - if (!isLiveCareTypeSelected) openLiveCareSelectionDialog(); + if (!isLiveCareTypeSelected) { + openLiveCareSelectionDialog(); + } }); getLanguageID(); @@ -420,33 +424,43 @@ class _clinic_listState extends State { }); } - openLiveCareSelectionDialog() { - Navigator.of(context) - .push(new MaterialPageRoute( - builder: (BuildContext context) { - return LiveCareTypeSelect(); - }, - fullscreenDialog: true)) - .then((value) { - if (value == null) { - Navigator.pop(context); - } else { - print(value); - isLiveCareTypeSelected = true; - if (value == "immediate") { - setState(() { - currentSelectedLiveCareType = "immediate"; - }); - getLiveCareClinicsList(); - } - if (value == "schedule") { - setState(() { - currentSelectedLiveCareType = "schedule"; - }); - getLiveCareScheduleClinicsList(); + openLiveCareSelectionDialog() async { + liveCareClinicIDs = await sharedPref.getString(LIVECARE_CLINIC_DATA); + if (liveCareClinicIDs != null) { + selectedClinicID = int.parse(liveCareClinicIDs.split("-")[2]); + setState(() { + currentSelectedLiveCareType = "immediate"; + }); + getLiveCareClinicsList(); + startLiveCare(); + } else { + Navigator.of(context) + .push(new MaterialPageRoute( + builder: (BuildContext context) { + return LiveCareTypeSelect(); + }, + fullscreenDialog: true)) + .then((value) { + if (value == null) { + Navigator.pop(context); + } else { + print(value); + isLiveCareTypeSelected = true; + if (value == "immediate") { + setState(() { + currentSelectedLiveCareType = "immediate"; + }); + getLiveCareClinicsList(); + } + if (value == "schedule") { + setState(() { + currentSelectedLiveCareType = "schedule"; + }); + getLiveCareScheduleClinicsList(); + } } - } - }); + }); + } } Widget getLiveCareScheduleClinicList() { @@ -555,12 +569,14 @@ class _clinic_listState extends State { itemBuilder: (context, index) { return InkWell( onTap: () { - if(liveCareClinicsListResponse - .patientERGetClinicsList[index].isOnline == 1) { + if (liveCareClinicsListResponse + .patientERGetClinicsList[index].isOnline == + 1) { updateSelectedIndex(liveCareClinicsListResponse .patientERGetClinicsList[index]); } else { - AppToast.showErrorToast(message: "Clinic is offline"); + AppToast.showErrorToast( + message: "Clinic is offline"); } }, child: ClinicCard( diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index c5947431..32c2818e 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -1206,6 +1206,16 @@ class TranslationBase { String get livecareModalTop => localizedValues["livecareModal-top"][locale.languageCode]; + + String get livecarePoint2 => localizedValues["livecare-point-2"][locale.languageCode]; + String get livecarePoint3 => localizedValues["livecare-point-3"][locale.languageCode]; + String get livecarePoint4 => localizedValues["livecare-point-4"][locale.languageCode]; + String get livecarePoint5 => localizedValues["livecare-point-5"][locale.languageCode]; + String get bookImmediateLivecare => localizedValues["book-immediate-livecare"][locale.languageCode]; + String get bookVideoLivecare2 => localizedValues["book-video-livecare-2"][locale.languageCode]; + String get noThankyou => localizedValues["no-thankyou"][locale.languageCode]; + String get visitClinic => localizedValues["visit-clinic"][locale.languageCode]; + } class TranslationBaseDelegate extends LocalizationsDelegate {