diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 82805ecc..9cd98ee3 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -30,7 +30,7 @@ + + + + + diff --git a/assets/images/svgs/bottom_nav/home-active.svg b/assets/images/svgs/bottom_nav/home-active.svg new file mode 100644 index 00000000..8357b01b --- /dev/null +++ b/assets/images/svgs/bottom_nav/home-active.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/svgs/bottom_nav/home.svg b/assets/images/svgs/bottom_nav/home.svg new file mode 100644 index 00000000..725dd1f9 --- /dev/null +++ b/assets/images/svgs/bottom_nav/home.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/svgs/bottom_nav/qr reader.svg b/assets/images/svgs/bottom_nav/qr reader.svg new file mode 100644 index 00000000..403e3137 --- /dev/null +++ b/assets/images/svgs/bottom_nav/qr reader.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/assets/images/svgs/bottom_nav/reader-active.svg b/assets/images/svgs/bottom_nav/reader-active.svg new file mode 100644 index 00000000..36e7657c --- /dev/null +++ b/assets/images/svgs/bottom_nav/reader-active.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/assets/images/svgs/bottom_nav/reply-active.svg b/assets/images/svgs/bottom_nav/reply-active.svg new file mode 100644 index 00000000..3fc5bd03 --- /dev/null +++ b/assets/images/svgs/bottom_nav/reply-active.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/assets/images/svgs/bottom_nav/schedule-active.svg b/assets/images/svgs/bottom_nav/schedule-active.svg new file mode 100644 index 00000000..a48e1652 --- /dev/null +++ b/assets/images/svgs/bottom_nav/schedule-active.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/svgs/bottom_nav/schedule.svg b/assets/images/svgs/bottom_nav/schedule.svg new file mode 100644 index 00000000..98232af9 --- /dev/null +++ b/assets/images/svgs/bottom_nav/schedule.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/svgs/female avatar.svg b/assets/images/svgs/female avatar.svg new file mode 100644 index 00000000..1cf831e1 --- /dev/null +++ b/assets/images/svgs/female avatar.svg @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/svgs/female.svg b/assets/images/svgs/female.svg new file mode 100644 index 00000000..307729c2 --- /dev/null +++ b/assets/images/svgs/female.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/svgs/inpatient.svg b/assets/images/svgs/inpatient.svg new file mode 100644 index 00000000..0f6b79bb --- /dev/null +++ b/assets/images/svgs/inpatient.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/images/svgs/male avatar.svg b/assets/images/svgs/male avatar.svg new file mode 100644 index 00000000..ff177416 --- /dev/null +++ b/assets/images/svgs/male avatar.svg @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/svgs/male.svg b/assets/images/svgs/male.svg new file mode 100644 index 00000000..80cd0c7f --- /dev/null +++ b/assets/images/svgs/male.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/svgs/menu.svg b/assets/images/svgs/menu.svg new file mode 100644 index 00000000..6808f518 --- /dev/null +++ b/assets/images/svgs/menu.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/svgs/no data.svg b/assets/images/svgs/no data.svg new file mode 100644 index 00000000..c54f0430 --- /dev/null +++ b/assets/images/svgs/no data.svg @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/svgs/profile_screen/ECG.svg b/assets/images/svgs/profile_screen/ECG.svg new file mode 100644 index 00000000..cc697f9f --- /dev/null +++ b/assets/images/svgs/profile_screen/ECG.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/svgs/profile_screen/Order Procedures.svg b/assets/images/svgs/profile_screen/Order Procedures.svg new file mode 100644 index 00000000..9eb44dfb --- /dev/null +++ b/assets/images/svgs/profile_screen/Order Procedures.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/svgs/profile_screen/Progress notes.svg b/assets/images/svgs/profile_screen/Progress notes.svg new file mode 100644 index 00000000..5fc41757 --- /dev/null +++ b/assets/images/svgs/profile_screen/Progress notes.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/assets/images/svgs/profile_screen/Radiology.svg b/assets/images/svgs/profile_screen/Radiology.svg new file mode 100644 index 00000000..8f1d8a46 --- /dev/null +++ b/assets/images/svgs/profile_screen/Radiology.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/svgs/profile_screen/UCAF.svg b/assets/images/svgs/profile_screen/UCAF.svg new file mode 100644 index 00000000..79100a55 --- /dev/null +++ b/assets/images/svgs/profile_screen/UCAF.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/svgs/profile_screen/admission req.svg b/assets/images/svgs/profile_screen/admission req.svg new file mode 100644 index 00000000..1f454266 --- /dev/null +++ b/assets/images/svgs/profile_screen/admission req.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/assets/images/svgs/profile_screen/booked.svg b/assets/images/svgs/profile_screen/booked.svg new file mode 100644 index 00000000..bda90bcf --- /dev/null +++ b/assets/images/svgs/profile_screen/booked.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/assets/images/svgs/profile_screen/create episode.svg b/assets/images/svgs/profile_screen/create episode.svg new file mode 100644 index 00000000..88c1cc21 --- /dev/null +++ b/assets/images/svgs/profile_screen/create episode.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/images/svgs/profile_screen/diabetic chart.svg b/assets/images/svgs/profile_screen/diabetic chart.svg new file mode 100644 index 00000000..b558bc64 --- /dev/null +++ b/assets/images/svgs/profile_screen/diabetic chart.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/assets/images/svgs/profile_screen/diagnosis.svg b/assets/images/svgs/profile_screen/diagnosis.svg new file mode 100644 index 00000000..b0c9b83c --- /dev/null +++ b/assets/images/svgs/profile_screen/diagnosis.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/svgs/profile_screen/discharge summary.svg b/assets/images/svgs/profile_screen/discharge summary.svg new file mode 100644 index 00000000..2edd6a14 --- /dev/null +++ b/assets/images/svgs/profile_screen/discharge summary.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/assets/images/svgs/profile_screen/health summary.svg b/assets/images/svgs/profile_screen/health summary.svg new file mode 100644 index 00000000..186af7a6 --- /dev/null +++ b/assets/images/svgs/profile_screen/health summary.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/assets/images/svgs/profile_screen/insurance approval.svg b/assets/images/svgs/profile_screen/insurance approval.svg new file mode 100644 index 00000000..f6a5885f --- /dev/null +++ b/assets/images/svgs/profile_screen/insurance approval.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/images/svgs/profile_screen/lab results.svg b/assets/images/svgs/profile_screen/lab results.svg new file mode 100644 index 00000000..5e03a2df --- /dev/null +++ b/assets/images/svgs/profile_screen/lab results.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/svgs/profile_screen/livecare.svg b/assets/images/svgs/profile_screen/livecare.svg new file mode 100644 index 00000000..452ffc53 --- /dev/null +++ b/assets/images/svgs/profile_screen/livecare.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/assets/images/svgs/profile_screen/medical report.svg b/assets/images/svgs/profile_screen/medical report.svg new file mode 100644 index 00000000..f40a9607 --- /dev/null +++ b/assets/images/svgs/profile_screen/medical report.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/svgs/profile_screen/modify episode.svg b/assets/images/svgs/profile_screen/modify episode.svg new file mode 100644 index 00000000..cdf5d3ab --- /dev/null +++ b/assets/images/svgs/profile_screen/modify episode.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/images/svgs/profile_screen/operating report.svg b/assets/images/svgs/profile_screen/operating report.svg new file mode 100644 index 00000000..8d9766be --- /dev/null +++ b/assets/images/svgs/profile_screen/operating report.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/assets/images/svgs/profile_screen/order prescription.svg b/assets/images/svgs/profile_screen/order prescription.svg new file mode 100644 index 00000000..21cadf7c --- /dev/null +++ b/assets/images/svgs/profile_screen/order prescription.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/assets/images/svgs/profile_screen/order sheets.svg b/assets/images/svgs/profile_screen/order sheets.svg new file mode 100644 index 00000000..c9e61e92 --- /dev/null +++ b/assets/images/svgs/profile_screen/order sheets.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/svgs/profile_screen/patient sick leave.svg b/assets/images/svgs/profile_screen/patient sick leave.svg new file mode 100644 index 00000000..f585b177 --- /dev/null +++ b/assets/images/svgs/profile_screen/patient sick leave.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/images/svgs/profile_screen/pending orders.svg b/assets/images/svgs/profile_screen/pending orders.svg new file mode 100644 index 00000000..ffe95e3b --- /dev/null +++ b/assets/images/svgs/profile_screen/pending orders.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/assets/images/svgs/profile_screen/refer patient.svg b/assets/images/svgs/profile_screen/refer patient.svg new file mode 100644 index 00000000..65c8f61e --- /dev/null +++ b/assets/images/svgs/profile_screen/refer patient.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/assets/images/svgs/profile_screen/sick leave.svg b/assets/images/svgs/profile_screen/sick leave.svg new file mode 100644 index 00000000..0774eb79 --- /dev/null +++ b/assets/images/svgs/profile_screen/sick leave.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/images/svgs/profile_screen/vital signs.svg b/assets/images/svgs/profile_screen/vital signs.svg new file mode 100644 index 00000000..fe476c3c --- /dev/null +++ b/assets/images/svgs/profile_screen/vital signs.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/assets/images/svgs/profile_screen/walkin.svg b/assets/images/svgs/profile_screen/walkin.svg new file mode 100644 index 00000000..0ef3ecf9 --- /dev/null +++ b/assets/images/svgs/profile_screen/walkin.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/assets/images/svgs/verification/verify-face.svg b/assets/images/svgs/verification/verify-face.svg new file mode 100644 index 00000000..7969cad2 --- /dev/null +++ b/assets/images/svgs/verification/verify-face.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/assets/images/svgs/verification/verify-finger.svg b/assets/images/svgs/verification/verify-finger.svg new file mode 100644 index 00000000..e626bafc --- /dev/null +++ b/assets/images/svgs/verification/verify-finger.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/assets/images/svgs/verification/verify-sms.svg b/assets/images/svgs/verification/verify-sms.svg new file mode 100644 index 00000000..ae5fa9f7 --- /dev/null +++ b/assets/images/svgs/verification/verify-sms.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/assets/images/svgs/verification/verify-whtsapp.svg b/assets/images/svgs/verification/verify-whtsapp.svg new file mode 100644 index 00000000..09ac85c9 --- /dev/null +++ b/assets/images/svgs/verification/verify-whtsapp.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 66be39bf..80868187 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -215,7 +215,6 @@ TargetAttributes = { 97C146ED1CF9000F007C117D = { CreatedOnToolsVersion = 7.3.1; - DevelopmentTeam = 3A359E86ZF; LastSwiftMigration = 1100; }; }; @@ -400,7 +399,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -416,7 +415,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = 4; - DEVELOPMENT_TEAM = 3A359E86ZF; + DEVELOPMENT_TEAM = ""; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -485,7 +484,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -534,7 +533,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -551,7 +550,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = 4; - DEVELOPMENT_TEAM = 3A359E86ZF; + DEVELOPMENT_TEAM = ""; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -582,7 +581,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/RunnerRelease.entitlements; CURRENT_PROJECT_VERSION = 4; - DEVELOPMENT_TEAM = 3A359E86ZF; + DEVELOPMENT_TEAM = ""; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index a28140cf..bfbb2561 100644 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ - - - - + + - - = 400) { onFailure(Helpers.generateContactAdminMsg(), statusCode); } else { var parsed = json.decode(response.body.toString()); if (parsed['ErrorType'] == 4) { - helpers.navigateToUpdatePage(parsed['ErrorEndUserMessage'], parsed['AndroidLink'], parsed['IOSLink']); + helpers.navigateToUpdatePage(parsed['ErrorEndUserMessage'], + parsed['AndroidLink'], parsed['IOSLink']); } if (parsed['IsAuthenticated'] != null && !parsed['IsAuthenticated']) { if (body['OTP_SendType'] != null) { onFailure(getError(parsed), statusCode); } else if (!isAllowAny) { - await Provider.of(AppGlobal.CONTEX, listen: false).logout(); + await Provider.of(AppGlobal.CONTEX, + listen: false) + .logout(); Helpers.showErrorToast('Your session expired Please login again'); locator().pushNamedAndRemoveUntil(ROOT); @@ -147,10 +164,14 @@ class BaseAppClient { String url = BASE_URL + endPoint; try { - Map headers = {'Content-Type': 'application/json', 'Accept': 'application/json'}; + Map headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json' + }; String token = await sharedPref.getString(TOKEN); - var languageID = await sharedPref.getStringWithDefaultValue(APP_Language, 'en'); + var languageID = + await sharedPref.getStringWithDefaultValue(APP_Language, 'en'); body['SetupID'] = body.containsKey('SetupID') ? body['SetupID'] != null ? body['SetupID'] @@ -170,11 +191,12 @@ class BaseAppClient { : PATIENT_OUT_SA_PATIENT_REQ; if (body.containsKey('isDentalAllowedBackend')) { - body['isDentalAllowedBackend'] = body.containsKey('isDentalAllowedBackend') - ? body['isDentalAllowedBackend'] != null - ? body['isDentalAllowedBackend'] - : IS_DENTAL_ALLOWED_BACKEND - : IS_DENTAL_ALLOWED_BACKEND; + body['isDentalAllowedBackend'] = + body.containsKey('isDentalAllowedBackend') + ? body['isDentalAllowedBackend'] != null + ? body['isDentalAllowedBackend'] + : IS_DENTAL_ALLOWED_BACKEND + : IS_DENTAL_ALLOWED_BACKEND; } body['DeviceTypeID'] = Platform.isAndroid ? 1 : 2; @@ -196,7 +218,9 @@ class BaseAppClient { : PATIENT_TYPE_ID; body['TokenID'] = body.containsKey('TokenID') ? body['TokenID'] : token; - body['PatientID'] = body['PatientID'] != null ? body['PatientID'] : patient.patientId ?? patient.patientMRN; + body['PatientID'] = body['PatientID'] != null + ? body['PatientID'] + : patient.patientId ?? patient.patientMRN; body['PatientOutSA'] = 0; //user['OutSA']; //TODO change it body['SessionID'] = SESSION_ID; //getSe @@ -209,9 +233,11 @@ class BaseAppClient { print("URL : $url"); print("Body : ${json.encode(body)}"); - + var asd = json.encode(body); + var asd2; if (await Helpers.checkConnection()) { - final response = await http.post(url.trim(), body: json.encode(body), headers: headers); + final response = await http.post(url.trim(), + body: json.encode(body), headers: headers); final int statusCode = response.statusCode; print("statusCode :$statusCode"); if (statusCode < 200 || statusCode >= 400 || json == null) { @@ -223,7 +249,8 @@ class BaseAppClient { onSuccess(parsed, statusCode); } else { if (parsed['ErrorType'] == 4) { - helpers.navigateToUpdatePage(parsed['ErrorEndUserMessage'], parsed['AndroidLink'], parsed['IOSLink']); + helpers.navigateToUpdatePage(parsed['ErrorEndUserMessage'], + parsed['AndroidLink'], parsed['IOSLink']); } if (parsed['IsAuthenticated'] == null) { if (parsed['isSMSSent'] == true) { @@ -239,20 +266,28 @@ class BaseAppClient { onFailure(getError(parsed), statusCode); } } - } else if (parsed['MessageStatus'] == 1 || parsed['SMSLoginRequired'] == true) { + } else if (parsed['MessageStatus'] == 1 || + parsed['SMSLoginRequired'] == true) { onSuccess(parsed, statusCode); - } else if (parsed['MessageStatus'] == 2 && parsed['IsAuthenticated']) { + } else if (parsed['MessageStatus'] == 2 && + parsed['IsAuthenticated']) { if (parsed['SameClinicApptList'] != null) { onSuccess(parsed, statusCode); } else { - if (parsed['message'] == null && parsed['ErrorEndUserMessage'] == null) { + if (parsed['message'] == null && + parsed['ErrorEndUserMessage'] == null) { if (parsed['ErrorSearchMsg'] == null) { - onFailure("Server Error found with no available message", statusCode); + onFailure("Server Error found with no available message", + statusCode); } else { onFailure(parsed['ErrorSearchMsg'], statusCode); } } else { - onFailure(parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); + onFailure( + parsed['message'] ?? + parsed['ErrorEndUserMessage'] ?? + parsed['ErrorMessage'], + statusCode); } } } else { @@ -262,7 +297,9 @@ class BaseAppClient { if (parsed['message'] != null) { onFailure(parsed['message'] ?? parsed['message'], statusCode); } else { - onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); + onFailure( + parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], + statusCode); } } } @@ -285,8 +322,12 @@ class BaseAppClient { if (parsed["ValidationErrors"]["ValidationErrors"] != null && parsed["ValidationErrors"]["ValidationErrors"].length != 0) { - for (var i = 0; i < parsed["ValidationErrors"]["ValidationErrors"].length; i++) { - error = error + parsed["ValidationErrors"]["ValidationErrors"][i]["Messages"][0] + "\n"; + for (var i = 0; + i < parsed["ValidationErrors"]["ValidationErrors"].length; + i++) { + error = error + + parsed["ValidationErrors"]["ValidationErrors"][i]["Messages"][0] + + "\n"; } } } diff --git a/lib/config/config.dart b/lib/config/config.dart index b8e34330..03c74f52 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -5,89 +5,122 @@ const ONLY_NUMBERS = "[0-9]"; const ONLY_LETTERS = "[a-zA-Z &'\"]"; const ONLY_DATE = "[0-9/]"; const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/'; -const BASE_URL = 'https://hmgwebservices.com/'; -// const BASE_URL = 'https://uat.hmgwebservices.com/'; +// const BASE_URL = 'https://hmgwebservices.com/'; +const BASE_URL = 'https://uat.hmgwebservices.com/'; const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh"; const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList"; -const PATIENT_PROGRESS_NOTE_URL = "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient"; -const PATIENT_INSURANCE_APPROVALS_URL = "Services/DoctorApplication.svc/REST/GetApprovalStatusForInpatient"; -const PATIENT_ORDERS_URL = "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient"; -const PATIENT_REFER_TO_DOCTOR_URL = "Services/DoctorApplication.svc/REST/ReferToDoctor"; -const PATIENT_GET_DOCTOR_BY_CLINIC_URL = "Services/DoctorApplication.svc/REST/GetDoctorsByClinicID"; - -const PATIENT_GET_DOCTOR_BY_CLINIC_Hospital = "Services/Doctors.svc/REST/SearchDoctorsByTime"; - -const GET_CLINICS_FOR_DOCTOR = 'Services/DoctorApplication.svc/REST/GetClinicsForDoctor'; -const PATIENT_GET_LIST_REFERAL_URL = "Services/Lists.svc/REST/GetList_STPReferralFrequency"; -const PATIENT_GET_CLINIC_BY_PROJECT_URL = "Services/DoctorApplication.svc/REST/GetClinicsByProjectID"; +const PATIENT_PROGRESS_NOTE_URL = + "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient"; +const PATIENT_INSURANCE_APPROVALS_URL = + "Services/DoctorApplication.svc/REST/GetApprovalStatusForInpatient"; +const PATIENT_ORDERS_URL = + "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient"; +const PATIENT_REFER_TO_DOCTOR_URL = + "Services/DoctorApplication.svc/REST/ReferToDoctor"; +const PATIENT_GET_DOCTOR_BY_CLINIC_URL = + "Services/DoctorApplication.svc/REST/GetDoctorsByClinicID"; + +const PATIENT_GET_DOCTOR_BY_CLINIC_Hospital = + "Services/Doctors.svc/REST/SearchDoctorsByTime"; + +const GET_CLINICS_FOR_DOCTOR = + 'Services/DoctorApplication.svc/REST/GetClinicsForDoctor'; +const PATIENT_GET_LIST_REFERAL_URL = + "Services/Lists.svc/REST/GetList_STPReferralFrequency"; +const PATIENT_GET_CLINIC_BY_PROJECT_URL = + "Services/DoctorApplication.svc/REST/GetClinicsByProjectID"; const PROJECT_GET_INFO = "Services/DoctorApplication.svc/REST/GetProjectInfo"; const GET_CLINICS = "Services/DoctorApplication.svc/REST/GetClinics"; -const GET_REFERRAL_FACILITIES = 'Services/DoctorApplication.svc/REST/GetReferralFacilities'; +const GET_REFERRAL_FACILITIES = + 'Services/DoctorApplication.svc/REST/GetReferralFacilities'; const GET_PROJECTS = 'Services/DoctorApplication.svc/REST/GetProjectInfo'; -const GET_PATIENT_VITAL_SIGN = 'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign'; -const GET_PATIENT_VITAL_SIGN_DATA = 'Services/DoctorApplication.svc/REST/GetVitalSigns'; -const GET_PATIENT_LAB_OREDERS = 'Services/DoctorApplication.svc/REST/GetPatientLabOreders'; +const GET_PATIENT_VITAL_SIGN = + 'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign'; +const GET_PATIENT_VITAL_SIGN_DATA = + 'Services/DoctorApplication.svc/REST/GetVitalSigns'; +const GET_PATIENT_LAB_OREDERS = + 'Services/DoctorApplication.svc/REST/GetPatientLabOreders'; const GET_PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList'; const GET_RADIOLOGY = 'Services/DoctorApplication.svc/REST/GetPatientRadResult'; -const GET_LIVECARE_PENDINGLIST = 'Services/DoctorApplication.svc/REST/GetPendingPatientER'; +const GET_LIVECARE_PENDINGLIST = + 'Services/DoctorApplication.svc/REST/GetPendingPatientER'; const START_LIVE_CARE_CALL = 'LiveCareApi/DoctorApp/CallPatient'; const LIVE_CARE_STATISTICS_FOR_CERTAIN_DOCTOR_URL = "Lists.svc/REST/DashBoard_GetLiveCareDoctorsStatsticsForCertainDoctor"; -const GET_PRESCRIPTION_REPORT = 'Services/Patients.svc/REST/GetPrescriptionReport'; +const GET_PRESCRIPTION_REPORT = + 'Services/Patients.svc/REST/GetPrescriptionReport'; -const GT_MY_PATIENT_QUESTION = 'Services/DoctorApplication.svc/REST/GtMyPatientsQuestions'; +const GT_MY_PATIENT_QUESTION = + 'Services/DoctorApplication.svc/REST/GtMyPatientsQuestions'; -const PRM_SEARCH_PATIENT = 'Services/Patients.svc/REST/GetPatientInformation_PRM'; +const PRM_SEARCH_PATIENT = + 'Services/Patients.svc/REST/GetPatientInformation_PRM'; const GET_PATIENT = 'Services/DoctorApplication.svc/REST/'; -const GET_PRESCRIPTION_REPORT_FOR_IN_PATIENT = 'Services/DoctorApplication.svc/REST/GetPrescriptionReportForInPatient'; +const GET_PRESCRIPTION_REPORT_FOR_IN_PATIENT = + 'Services/DoctorApplication.svc/REST/GetPrescriptionReportForInPatient'; -const GET_MY_REFERRAL_PATIENT = 'Services/DoctorApplication.svc/REST/GtMyReferralPatient'; +const GET_MY_REFERRAL_PATIENT = + 'Services/DoctorApplication.svc/REST/GtMyReferralPatient'; const REFER_TO_DOCTOR = 'Services/DoctorApplication.svc/REST/ReferToDoctor'; -const ADD_REFERRED_DOCTOR_REMARKS = 'Services/DoctorApplication.svc/REST/AddReferredDoctorRemarks'; +const ADD_REFERRED_DOCTOR_REMARKS = + 'Services/DoctorApplication.svc/REST/AddReferredDoctorRemarks'; -const GET_MY_REFERRED_PATIENT = 'Services/DoctorApplication.svc/REST/GtMyReferredPatient'; +const GET_MY_REFERRED_PATIENT = + 'Services/DoctorApplication.svc/REST/GtMyReferredPatient'; -const GET_MY_REFERRED_OUT_PATIENT = 'Services/DoctorApplication.svc/REST/GtMyReferredOutPatient'; +const GET_MY_REFERRED_OUT_PATIENT = + 'Services/DoctorApplication.svc/REST/GtMyReferredOutPatient'; -const GET_PENDING_REFERRAL_PATIENT = 'Services/DoctorApplication.svc/REST/PendingReferrals'; +const GET_PENDING_REFERRAL_PATIENT = + 'Services/DoctorApplication.svc/REST/PendingReferrals'; -const CREATE_REFERRAL_PATIENT = 'Services/DoctorApplication.svc/REST/CreateReferral'; +const CREATE_REFERRAL_PATIENT = + 'Services/DoctorApplication.svc/REST/CreateReferral'; -const RESPONSE_PENDING_REFERRAL_PATIENT = 'Services/DoctorApplication.svc/REST/RespondReferral'; +const RESPONSE_PENDING_REFERRAL_PATIENT = + 'Services/DoctorApplication.svc/REST/RespondReferral'; const GET_PATIENT_REFERRAL = 'Services/DoctorApplication.svc/REST/GetRefferal'; const POST_UCAF = 'Services/DoctorApplication.svc/REST/PostUCAF'; -const GET_DOCTOR_WORKING_HOURS_TABLE = 'Services/Doctors.svc/REST/GetDoctorWorkingHoursTable'; +const GET_DOCTOR_WORKING_HOURS_TABLE = + 'Services/Doctors.svc/REST/GetDoctorWorkingHoursTable'; -const GET_PATIENT_LAB_RESULTS = 'Services/DoctorApplication.svc/REST/GetPatientLabResults'; +const GET_PATIENT_LAB_RESULTS = + 'Services/DoctorApplication.svc/REST/GetPatientLabResults'; const LOGIN_URL = 'Services/Sentry.svc/REST/MemberLogIN_New'; -const INSERT_DEVICE_IMEI = 'Services/DoctorApplication.svc/REST/DoctorApp_InsertOrUpdateDeviceDetails'; +const INSERT_DEVICE_IMEI = + 'Services/DoctorApplication.svc/REST/DoctorApp_InsertOrUpdateDeviceDetails'; // 'Services/Sentry.svc/REST/DoctorApplication_INSERTDeviceIMEI'; // const SELECT_DEVICE_IMEI = // 'Services/Sentry.svc/REST/DoctorApplication_SELECTDeviceIMEIbyIMEI'; -const SELECT_DEVICE_IMEI = 'Services/DoctorApplication.svc/REST/DoctorApp_GetDeviceDetailsByIMEI'; +const SELECT_DEVICE_IMEI = + 'Services/DoctorApplication.svc/REST/DoctorApp_GetDeviceDetailsByIMEI'; const SEND_ACTIVATION_CODE_BY_OTP_NOTIFICATION_TYPE = 'Services/Sentry.svc/REST/DoctorApplication_SendActivationCodebyOTPNotificationType'; -const SEND_ACTIVATION_CODE_FOR_DOCTOR_APP = 'Services/DoctorApplication.svc/REST/SendActivationCodeForDoctorApp'; +const SEND_ACTIVATION_CODE_FOR_DOCTOR_APP = + 'Services/DoctorApplication.svc/REST/SendActivationCodeForDoctorApp'; -const SEND_ACTIVATION_CODE_FOR_VERIFICATION_SCREEN = 'Services/DoctorApplication.svc/REST/SendVerificationCode'; -const MEMBER_CHECK_ACTIVATION_CODE_NEW = 'Services/Sentry.svc/REST/MemberCheckActivationCode_New'; +const SEND_ACTIVATION_CODE_FOR_VERIFICATION_SCREEN = + 'Services/DoctorApplication.svc/REST/SendVerificationCode'; +const MEMBER_CHECK_ACTIVATION_CODE_NEW = + 'Services/Sentry.svc/REST/MemberCheckActivationCode_New'; -const CHECK_ACTIVATION_CODE_FOR_DOCTOR_APP = 'Services/DoctorApplication.svc/REST/CheckActivationCodeForDoctorApp'; +const CHECK_ACTIVATION_CODE_FOR_DOCTOR_APP = + 'Services/DoctorApplication.svc/REST/CheckActivationCodeForDoctorApp'; const GET_DOC_PROFILES = 'Services/Doctors.svc/REST/GetDocProfiles'; const TRANSFERT_TO_ADMIN = 'LiveCareApi/DoctorApp/TransferToAdmin'; @@ -95,153 +128,263 @@ const SEND_SMS_INSTRUCTIONS = 'LiveCareApi/DoctorApp/SendSMSInstruction'; const GET_ALTERNATIVE_SERVICE = 'LiveCareApi/DoctorApp/GetAlternativeServices'; const END_CALL = 'LiveCareApi/DoctorApp/EndCall'; const END_CALL_WITH_CHARGE = 'LiveCareApi/DoctorApp/CompleteCallWithCharge'; -const GET_DASHBOARD = 'Services/DoctorApplication.svc/REST/GetDoctorDashboardKPI'; -const GET_SICKLEAVE_STATISTIC = 'Services/DoctorApplication.svc/REST/PreSickLeaveStatistics'; -const ARRIVED_PATIENT_URL = 'Services/DoctorApplication.svc/REST/PatientArrivalList'; +const GET_DASHBOARD = + 'Services/DoctorApplication.svc/REST/GetDoctorDashboardKPI'; +const GET_SICKLEAVE_STATISTIC = + 'Services/DoctorApplication.svc/REST/PreSickLeaveStatistics'; +const ARRIVED_PATIENT_URL = + 'Services/DoctorApplication.svc/REST/PatientArrivalList'; const ADD_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/PostSickLeave'; const GET_SICK_LEAVE = 'Services/Patients.svc/REST/GetPatientSickLeave'; const EXTEND_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/ExtendSickLeave'; const GET_OFFTIME = 'Services/DoctorApplication.svc/REST/GetMasterLookUpList'; -const GET_COVERING_DOCTORS = 'Services/DoctorApplication.svc/REST/GetCoveringDoctor'; +const GET_COVERING_DOCTORS = + 'Services/DoctorApplication.svc/REST/GetCoveringDoctor'; const ADD_RESCHDEULE = 'Services/DoctorApplication.svc/REST/PostRequisition'; -const UPDATE_RESCHDEULE = 'Services/DoctorApplication.svc/REST/PatchRequisition'; -const GET_RESCHEDULE_LEAVE = 'Services/DoctorApplication.svc/REST/GetRequisition'; -const GET_PRESCRIPTION_LIST = 'Services/DoctorApplication.svc/REST/GetPrescription'; - -const POST_PRESCRIPTION_LIST = 'Services/DoctorApplication.svc/REST/PostPrescription'; -const GET_PROCEDURE_LIST = 'Services/DoctorApplication.svc/REST/GetOrderedProcedure'; +const UPDATE_RESCHDEULE = + 'Services/DoctorApplication.svc/REST/PatchRequisition'; +const GET_RESCHEDULE_LEAVE = + 'Services/DoctorApplication.svc/REST/GetRequisition'; +const GET_PRESCRIPTION_LIST = + 'Services/DoctorApplication.svc/REST/GetPrescription'; + +const POST_PRESCRIPTION_LIST = + 'Services/DoctorApplication.svc/REST/PostPrescription'; +const GET_PROCEDURE_LIST = + 'Services/DoctorApplication.svc/REST/GetOrderedProcedure'; const POST_PROCEDURE_LIST = 'Services/DoctorApplication.svc/REST/PostProcedure'; -const GET_PATIENT_ARRIVAL_LIST = 'Services/DoctorApplication.svc/REST/PatientArrivalList'; +const GET_PATIENT_ARRIVAL_LIST = + 'Services/DoctorApplication.svc/REST/PatientArrivalList'; -const GET_PATIENT_IN_PATIENT_LIST = 'Services/DoctorApplication.svc/REST/GetMyInPatient'; +const GET_PATIENT_IN_PATIENT_LIST = + 'Services/DoctorApplication.svc/REST/GetMyInPatient'; -const Verify_Referral_Doctor_Remarks = 'Services/DoctorApplication.svc/REST/VerifyReferralDoctorRemarks'; +const Verify_Referral_Doctor_Remarks = + 'Services/DoctorApplication.svc/REST/VerifyReferralDoctorRemarks'; ///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_LAB_ORDERS_RESULT_HISTORY_BY_DESCRIPTION = 'Services/Patients.svc/REST/GetPatientLabOrdersResultsHistoryByDescription'; // SOAP const GET_ALLERGIES = 'Services/DoctorApplication.svc/REST/GetAllergies'; -const GET_MASTER_LOOKUP_LIST = 'Services/DoctorApplication.svc/REST/GetMasterLookUpList'; +const GET_MASTER_LOOKUP_LIST = + 'Services/DoctorApplication.svc/REST/GetMasterLookUpList'; const POST_EPISODE = 'Services/DoctorApplication.svc/REST/PostEpisode'; -const POST_EPISODE_FOR_IN_PATIENT = 'Services/DoctorApplication.svc/REST/PostEpisodeForInpatient'; +const POST_EPISODE_FOR_IN_PATIENT = + 'Services/DoctorApplication.svc/REST/PostEpisodeForInpatient'; const POST_ALLERGY = 'Services/DoctorApplication.svc/REST/PostAllergies'; const POST_HISTORY = 'Services/DoctorApplication.svc/REST/PostHistory'; -const POST_CHIEF_COMPLAINT = 'Services/DoctorApplication.svc/REST/PostChiefcomplaint'; -const POST_PHYSICAL_EXAM = 'Services/DoctorApplication.svc/REST/PostPhysicalExam'; -const POST_PROGRESS_NOTE = '/Services/DoctorApplication.svc/REST/PostProgressNote'; +const POST_CHIEF_COMPLAINT = + 'Services/DoctorApplication.svc/REST/PostChiefcomplaint'; +const POST_PHYSICAL_EXAM = + 'Services/DoctorApplication.svc/REST/PostPhysicalExam'; +const POST_PROGRESS_NOTE = + '/Services/DoctorApplication.svc/REST/PostProgressNote'; const POST_ASSESSMENT = 'Services/DoctorApplication.svc/REST/PostAssessment'; const PATCH_ALLERGY = 'Services/DoctorApplication.svc/REST/PatchAllergies'; const PATCH_HISTORY = 'Services/DoctorApplication.svc/REST/PatchHistory'; -const PATCH_CHIEF_COMPLAINT = 'Services/DoctorApplication.svc/REST/PatchChiefcomplaint'; +const PATCH_CHIEF_COMPLAINT = + 'Services/DoctorApplication.svc/REST/PatchChiefcomplaint'; -const PATCH_PHYSICAL_EXAM = 'Services/DoctorApplication.svc/REST/PatchPhysicalExam'; -const PATCH_PROGRESS_NOTE = 'Services/DoctorApplication.svc/REST/PatchProgressNote'; +const PATCH_PHYSICAL_EXAM = + 'Services/DoctorApplication.svc/REST/PatchPhysicalExam'; +const PATCH_PROGRESS_NOTE = + 'Services/DoctorApplication.svc/REST/PatchProgressNote'; const PATCH_ASSESSMENT = 'Services/DoctorApplication.svc/REST/PatchAssessment'; const GET_ALLERGY = 'Services/DoctorApplication.svc/REST/GetAllergies'; const GET_HISTORY = 'Services/DoctorApplication.svc/REST/GetHistory'; -const GET_CHIEF_COMPLAINT = 'Services/DoctorApplication.svc/REST/GetChiefcomplaint'; +const GET_CHIEF_COMPLAINT = + 'Services/DoctorApplication.svc/REST/GetChiefcomplaint'; const GET_PHYSICAL_EXAM = 'Services/DoctorApplication.svc/REST/GetPhysicalExam'; const GET_PROGRESS_NOTE = 'Services/DoctorApplication.svc/REST/GetProgressNote'; const GET_ASSESSMENT = 'Services/DoctorApplication.svc/REST/GetAssessment'; -const GET_ORDER_PROCEDURE = 'Services/DoctorApplication.svc/REST/GetOrderedProcedure'; +const GET_ORDER_PROCEDURE = + 'Services/DoctorApplication.svc/REST/GetOrderedProcedure'; -const GET_LIST_CATEGORISE = 'Services/DoctorApplication.svc/REST/GetProcedureCategories'; +const GET_LIST_CATEGORISE = + 'Services/DoctorApplication.svc/REST/GetProcedureCategories'; -const GET_CATEGORISE_PROCEDURE = 'Services/DoctorApplication.svc/REST/GetProcedure'; +const GET_CATEGORISE_PROCEDURE = + 'Services/DoctorApplication.svc/REST/GetProcedure'; const UPDATE_PROCEDURE = 'Services/DoctorApplication.svc/REST/PatchProcedure'; -const UPDATE_PRESCRIPTION = 'Services/DoctorApplication.svc/REST/PatchPrescription'; +const UPDATE_PRESCRIPTION = + 'Services/DoctorApplication.svc/REST/PatchPrescription'; const SEARCH_DRUG = 'Services/DoctorApplication.svc/REST/GetMedicationList'; -const DRUG_TO_DRUG = 'Services/DoctorApplication.svc/REST/DrugToDrugInteraction'; +const DRUG_TO_DRUG = + 'Services/DoctorApplication.svc/REST/DrugToDrugInteraction'; const GET_MEDICAL_FILE = 'Services/DoctorApplication.svc/REST/GetMedicalFile'; const GET_FLOORS = 'Services/DoctorApplication.svc/REST/GetFloors'; const GET_WARDS = 'Services/DoctorApplication.svc/REST/GetWards'; -const GET_ROOM_CATEGORIES = 'Services/DoctorApplication.svc/REST/GetRoomCategories'; -const GET_DIAGNOSIS_TYPES = 'Services/DoctorApplication.svc/REST/DiagnosisTypes'; +const GET_ROOM_CATEGORIES = + 'Services/DoctorApplication.svc/REST/GetRoomCategories'; +const GET_DIAGNOSIS_TYPES = + 'Services/DoctorApplication.svc/REST/DiagnosisTypes'; const GET_DIET_TYPES = 'Services/DoctorApplication.svc/REST/DietTypes'; const GET_ICD_CODES = 'Services/DoctorApplication.svc/REST/GetICDCodes'; -const POST_ADMISSION_REQUEST = 'Services/DoctorApplication.svc/REST/PostAdmissionRequest'; -const GET_ITEM_BY_MEDICINE = 'Services/DoctorApplication.svc/REST/GetItemByMedicineCode'; +const POST_ADMISSION_REQUEST = + 'Services/DoctorApplication.svc/REST/PostAdmissionRequest'; +const GET_ITEM_BY_MEDICINE = + 'Services/DoctorApplication.svc/REST/GetItemByMedicineCode'; -const GET_PROCEDURE_VALIDATION = 'Services/DoctorApplication.svc/REST/ValidateProcedures'; -const GET_BOX_QUANTITY = 'Services/DoctorApplication.svc/REST/CalculateBoxQuantity'; +const GET_PROCEDURE_VALIDATION = + 'Services/DoctorApplication.svc/REST/ValidateProcedures'; +const GET_BOX_QUANTITY = + 'Services/DoctorApplication.svc/REST/CalculateBoxQuantity'; ///GET ECG const GET_ECG = "Services/Patients.svc/REST/HIS_GetPatientMuseResults"; -const GET_MY_REFERRAL_INPATIENT = "Services/DoctorApplication.svc/REST/GtMyReferralPatient"; +const GET_MY_REFERRAL_INPATIENT = + "Services/DoctorApplication.svc/REST/GtMyReferralPatient"; -const GET_MY_REFERRAL_OUT_PATIENT = "Services/DoctorApplication.svc/REST/GtMyReferralForOutPatient"; +const GET_MY_REFERRAL_OUT_PATIENT = + "Services/DoctorApplication.svc/REST/GtMyReferralForOutPatient"; -const GET_MY_DISCHARGE_PATIENT = "Services/DoctorApplication.svc/REST/GtMyDischargeReferralPatient"; -const GET_DISCHARGE_PATIENT = "Services/DoctorApplication.svc/REST/GtMyDischargePatient"; +const GET_MY_DISCHARGE_PATIENT = + "Services/DoctorApplication.svc/REST/GtMyDischargeReferralPatient"; +const GET_DISCHARGE_PATIENT = + "Services/DoctorApplication.svc/REST/GtMyDischargePatient"; -const GET_PAtIENTS_INSURANCE_APPROVALS = "Services/Patients.svc/REST/GetApprovalStatus"; +const GET_PAtIENTS_INSURANCE_APPROVALS = + "Services/Patients.svc/REST/GetApprovalStatus"; const GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL'; const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders'; -const GET_IN_PATIENT_ORDERS = 'Services/DoctorApplication.svc/REST/GetPatientRadResult'; +const GET_IN_PATIENT_ORDERS = + 'Services/DoctorApplication.svc/REST/GetPatientRadResult'; ///Prescriptions const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList'; -const GET_PRESCRIPTIONS_ALL_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; -const GET_PRESCRIPTION_REPORT_NEW = '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_NEW = + '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_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList"; -const UPDATE_PROGRESS_NOTE_FOR_INPATIENT = "Services/DoctorApplication.svc/REST/UpdateProgressNoteForInPatient"; -const CREATE_PROGRESS_NOTE_FOR_INPATIENT = "Services/DoctorApplication.svc/REST/CreateProgressNoteForInPatient"; +const UPDATE_PROGRESS_NOTE_FOR_INPATIENT = + "Services/DoctorApplication.svc/REST/UpdateProgressNoteForInPatient"; +const CREATE_PROGRESS_NOTE_FOR_INPATIENT = + "Services/DoctorApplication.svc/REST/CreateProgressNoteForInPatient"; -const GET_PRESCRIPTION_IN_PATIENT = 'Services/DoctorApplication.svc/REST/GetPrescriptionReportForInPatient'; +const GET_PRESCRIPTION_IN_PATIENT = + 'Services/DoctorApplication.svc/REST/GetPrescriptionReportForInPatient'; -const GET_INSURANCE_IN_PATIENT = "Services/DoctorApplication.svc/REST/GetApprovalStatusForInpatient"; +const GET_INSURANCE_IN_PATIENT = + "Services/DoctorApplication.svc/REST/GetApprovalStatusForInpatient"; const GET_SICK_LEAVE_PATIENT = "Services/Patients.svc/REST/GetPatientSickLeave"; -const GET_MY_OUT_PATIENT = "Services/DoctorApplication.svc/REST/GetMyOutPatient"; +const GET_MY_OUT_PATIENT = + "Services/DoctorApplication.svc/REST/GetMyOutPatient"; -const PATIENT_MEDICAL_REPORT_GET_LIST = "Services/Patients.svc/REST/DAPP_ListMedicalReport"; -const PATIENT_MEDICAL_REPORT_GET_TEMPLATE = "Services/Patients.svc/REST/DAPP_GetTemplateByID"; -const PATIENT_MEDICAL_REPORT_INSERT = "Services/Patients.svc/REST/DAPP_InsertMedicalReport"; -const PATIENT_MEDICAL_REPORT_VERIFIED = "Services/Patients.svc/REST/DAPP_VerifiedMedicalReport"; +const PATIENT_MEDICAL_REPORT_GET_LIST = + "Services/Patients.svc/REST/DAPP_ListMedicalReport"; +const PATIENT_MEDICAL_REPORT_GET_TEMPLATE = + "Services/Patients.svc/REST/DAPP_GetTemplateByID"; +const PATIENT_MEDICAL_REPORT_INSERT = + "Services/Patients.svc/REST/DAPP_InsertMedicalReport"; +const PATIENT_MEDICAL_REPORT_VERIFIED = + "Services/Patients.svc/REST/DAPP_VerifiedMedicalReport"; -const GET_PROCEDURE_TEMPLETE = 'Services/Doctors.svc/REST/DAPP_ProcedureTemplateGet'; +const GET_PROCEDURE_TEMPLETE = + 'Services/Doctors.svc/REST/DAPP_ProcedureTemplateGet'; const GET_TEMPLETE_LIST = 'Services/Doctors.svc/REST/DAPP_TemplateGet'; -const GET_PROCEDURE_TEMPLETE_DETAILS = "Services/Doctors.svc/REST/DAPP_ProcedureTemplateDetailsGet"; -const GET_PENDING_PATIENT_ER_FOR_DOCTOR_APP = 'Services/DoctorApplication.svc/REST/GetPendingPatientERForDoctorApp'; +const GET_PROCEDURE_TEMPLETE_DETAILS = + "Services/Doctors.svc/REST/DAPP_ProcedureTemplateDetailsGet"; +const GET_PENDING_PATIENT_ER_FOR_DOCTOR_APP = + 'Services/DoctorApplication.svc/REST/GetPendingPatientERForDoctorApp'; -const DOCTOR_CHECK_HAS_LIVE_CARE = "Services/DoctorApplication.svc/REST/CheckDoctorHasLiveCare"; +const DOCTOR_CHECK_HAS_LIVE_CARE = + "Services/DoctorApplication.svc/REST/CheckDoctorHasLiveCare"; const LIVE_CARE_IS_LOGIN = "LiveCareApi/DoctorApp/UseIsLogin"; -const ADD_REFERRED_REMARKS_NEW = "Services/DoctorApplication.svc/REST/AddReferredDoctorRemarks_New"; -const GET_SPECIAL_CLINICAL_CARE_LIST = "Services/DoctorApplication.svc/REST/GetSpecialClinicalCareList"; -const GET_SPECIAL_CLINICAL_CARE_MAPPING_LIST = "Services/DoctorApplication.svc/REST/GetSpecialClinicalCareMappingList"; - -const INSERT_MEDICAL_REPORT = "Services/Patients.svc/REST/DAPP_InsertMedicalReport_New"; - -const UPDATE_MEDICAL_REPORT = "Services/Patients.svc/REST/DAPP_UpdateMedicalReport"; -const GET_SICK_LEAVE_DOCTOR_APP = "Services/DoctorApplication.svc/REST/GetAllSickLeaves"; +const ADD_REFERRED_REMARKS_NEW = + "Services/DoctorApplication.svc/REST/AddReferredDoctorRemarks_New"; +const GET_SPECIAL_CLINICAL_CARE_LIST = + "Services/DoctorApplication.svc/REST/GetSpecialClinicalCareList"; +const GET_SPECIAL_CLINICAL_CARE_MAPPING_LIST = + "Services/DoctorApplication.svc/REST/GetSpecialClinicalCareMappingList"; + +const INSERT_MEDICAL_REPORT = + "Services/Patients.svc/REST/DAPP_InsertMedicalReport_New"; + +const UPDATE_MEDICAL_REPORT = + "Services/Patients.svc/REST/DAPP_UpdateMedicalReport"; +const GET_SICK_LEAVE_DOCTOR_APP = + "Services/DoctorApplication.svc/REST/GetAllSickLeaves"; const ADD_PATIENT_TO_DOCTOR = "LiveCareApi/DoctorApp/AssignPatientToDoctor"; const REMOVE_PATIENT_FROM_DOCTOR = "LiveCareApi/DoctorApp/BackPatientToQueue"; -const CREATE_DOCTOR_RESPONSE = "Services/DoctorApplication.svc/REST/CreateDoctorResponse"; -const GET_DOCTOR_NOT_REPLIED_COUNTS = "Services/DoctorApplication.svc/REST/DoctorApp_GetDoctorNotRepliedCounts"; -const ALL_SPECIAL_LAB_RESULT = "services/Patients.svc/REST/GetPatientLabSpecialResultsALL"; -const GET_MEDICATION_FOR_IN_PATIENT = "Services/DoctorApplication.svc/REST/Doctor_GetMedicationForInpatient"; -const GET_EPISODE_FOR_INPATIENT = "/Services/DoctorApplication.svc/REST/DoctorApp_GetEpisodeForInpatient"; +const CREATE_DOCTOR_RESPONSE = + "Services/DoctorApplication.svc/REST/CreateDoctorResponse"; +const GET_DOCTOR_NOT_REPLIED_COUNTS = + "Services/DoctorApplication.svc/REST/DoctorApp_GetDoctorNotRepliedCounts"; +const ALL_SPECIAL_LAB_RESULT = + "services/Patients.svc/REST/GetPatientLabSpecialResultsALL"; +const GET_MEDICATION_FOR_IN_PATIENT = + "Services/DoctorApplication.svc/REST/Doctor_GetMedicationForInpatient"; +const GET_EPISODE_FOR_INPATIENT = + "/Services/DoctorApplication.svc/REST/DoctorApp_GetEpisodeForInpatient"; + +///Operation Details Services + +const GET_RESERVATIONS = + "Services/DoctorApplication.svc/REST/DoctorApp_GetReservationDetails"; +const GET_OPERATION_DETAILS = + "Services/DoctorApplication.svc/REST/DoctorApp_GetOperationDetails"; +const UPDATE_OPERATION_REPORT = + "Services/DoctorApplication.svc/REST/DoctorApp_CreateUpdateOperationReport"; + +const NURSING_PROGRESS_NOTE = + "Services/DoctorApplication.svc/REST/DoctorApp_GetNursingProgressNote"; +const GET_DIAGNOSIS_FOR_IN_PATIENT = + "Services/DoctorApplication.svc/REST/DoctorApp_GetDiagnosisForInPatient"; + +const GET_DIABETIC_CHART_VALUES = + "Services/DoctorApplication.svc/REST/DoctorApp_GetDiabeticChartValues"; + +const GET_PENDING_ORDERS = + "Services/DoctorApplication.svc/REST/DoctorApp_GetPendingOrdersForInPatient"; + +const GET_ADMISSION_ORDERS = + "/Services/DoctorApplication.svc/REST/DoctorApp_GetAdmissionOrders"; + +///Patient Registration Services +const CHECK_PATIENT_FOR_REGISTRATION = + "Services/Authentication.svc/REST/CheckPatientForRegisteration"; +const SEND_ACTIVATION_CODE_BY_OTP_NOT_TYPE_FOR_REGISTRATION = + "Services/Authentication.svc/REST/SendActivationCodebyOTPNotificationTypeForRegistration"; +const CHECK_ACTIVATION_CODE_FOR_PATIENT = + "Services/Authentication.svc/REST/CheckActivationCode"; +const PATIENT_REGISTRATION = + "Services/Authentication.svc/REST/PatientRegistration"; +const GET_PATIENT_INFO = "Services/NHIC.svc/REST/GetPatientInfo"; + +/// Discharge Summary +const GET_PENDING_DISCHARGE_SUMMARY = + "Services/DoctorApplication.svc/REST/DoctorApp_GetPendingDischargeSummary"; +const GET_ALL_DISCHARGE_SUMMARY = + "Services/DoctorApplication.svc/REST/DoctorApp_GetDischargeSummary"; var selectedPatientType = 1; @@ -312,5 +455,7 @@ const TIMER_MIN = 10; class AppGlobal { static var CONTEX; - static Color appPrimaryColor = Color(0xFFB9382C); + static Color appRedColor = Color(0xFFD02127); + static Color appGreenColor = Color(0xFF359846); + static Color appTextColor = Color(0xFF2B353E); } diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 9b91015f..09562b9f 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1,7 +1,10 @@ const Map> localizedValues = { "dashboardScreenToolbarTitle": {"ar": "الرئيسة", "en": "Home"}, "settings": {"en": "Settings", "ar": "الاعدادات"}, - "areYouSureYouWantTo": {"en": "Are you sure you want to", "ar": "هل انت متاكد من انك تريد أن"}, + "areYouSureYouWantTo": { + "en": "Are you sure you want to", + "ar": "هل انت متاكد من انك تريد أن" + }, "language": {"en": "App Language", "ar": "لغة التطبيق"}, "lanEnglish": {"en": "English", "ar": "English"}, "lanArabic": {"en": "العربية", "ar": "العربية"}, @@ -12,18 +15,27 @@ const Map> localizedValues = { "mobileNo": {"en": "Mobile No", "ar": "رقم الجوال"}, "messagesScreenToolbarTitle": {"en": "Messages", "ar": "الرسائل"}, "mySchedule": {"en": "Schedule", "ar": "جدولي"}, - "errorNoSchedule": {"en": "You don't have any Schedule", "ar": "ليس لديك أي جدول"}, + "errorNoSchedule": { + "en": "You don't have any Schedule", + "ar": "ليس لديك أي جدول" + }, "verify": {"en": "VERIFY", "ar": "تحقق"}, "referralDoctor": {"en": "Referral Doctor", "ar": "الطبيب المُحول إليه"}, "referringClinic": {"en": "Referring Clinic", "ar": "العيادة المُحول إليها"}, "frequency": {"en": "Frequency", "ar": "تكرر"}, "priority": {"en": "Priority", "ar": "الأولوية"}, "maxResponseTime": {"en": "Max Response Time", "ar": "الوقت الأقصى للرد"}, - "clinicDetailsandRemarks": {"en": "Clinic Details and Remarks", "ar": "ملاحضات وتفاصيل العيادة"}, + "clinicDetailsandRemarks": { + "en": "Clinic Details and Remarks", + "ar": "ملاحضات وتفاصيل العيادة" + }, "answerSuggestions": {"en": "Answer/Suggestions", "ar": "الرد / الاقتراحات"}, "outPatients": {"en": "Out Patient", "ar": "العيادات الخارجية"}, "myOutPatient": {"en": "My OutPatients", "ar": "مرضى العيادات الخارجية"}, - "myOutPatient_2lines": {"en": "My\nOutPatients", "ar": "مريض\nالعيادات الخارجية"}, + "myOutPatient_2lines": { + "en": "My\nOutPatients", + "ar": "مريض\nالعيادات الخارجية" + }, "searchPatient": {"en": "Search Patients", "ar": "البحث عن مريض"}, "searchPatientDashBoard": {"en": "Search\nPatients", "ar": "البحث\nعن مريض"}, "searchAbout": {"en": "Search", "ar": "البحث عن"}, @@ -40,14 +52,17 @@ const Map> localizedValues = { "radiology": {"en": "Radiology", "ar": "الأشعة"}, "service": {"en": "Service", "ar": "خدمة"}, "referral": {"en": "Referral", "ar": "الإحالة"}, - "inPatient": {"en": "InPatients", "ar": "مرضاي"}, - "myInPatient": {"en": "My\nInPatients", "ar": "مرضاي\nالمنومين"}, - "myInPatientTitle": {"en": "My InPatients", "ar": "مرضاي المنومين"}, + "inPatient": {"en": "In Patients", "ar": "مرضاي"}, + "myInPatient": {"en": "My\n In Patients", "ar": "مرضاي\nالمنومين"}, + "myInPatientTitle": {"en": "My Patients", "ar": "مرضاي المنومين"}, "inPatientLabel": {"en": "InPatients", "ar": "المريض المنوم"}, - "inPatientAll": {"en": "All InPatients", "ar": "جميع المرضى المنومين"}, + "inPatientAll": {"en": "All Patients", "ar": "جميع المرضى المنومين"}, "operations": {"en": "Operations", "ar": "عمليات"}, "patientServices": {"en": "Patient Services", "ar": "خدمات المرضى"}, - "searchMedicineDashboard": {"en": "Search\nMedicines", "ar": "بحث\nعن الدواء"}, + "searchMedicineDashboard": { + "en": "Search\nMedicines", + "ar": "بحث\nعن الدواء" + }, "searchMedicine": {"en": "Search Medicines", "ar": "بحث عن الدواء"}, "myReferralPatient": {"en": "My Referral Patient", "ar": "مرضى الاحالة"}, "referPatient": {"en": "Referral Patient", "ar": "إحالة مريض"}, @@ -63,14 +78,20 @@ const Map> localizedValues = { "patientFile": {"en": "Patient File", "ar": "ملف المريض"}, "familyMedicine": {"en": "Family Medicine Clinic", "ar": "عيادة طب الأسرة"}, "search": {"en": "Search", "ar": "بحث "}, - "onlyArrivedPatient": {"en": "Only Arrived Patient", "ar": "المريض الذي حضر للموعد"}, + "onlyArrivedPatient": { + "en": "Only Arrived Patient", + "ar": "المريض الذي حضر للموعد" + }, "searchMedicineNameHere": {"en": "Search Medicine ", "ar": "ابحث هنا"}, "youCanFind": {"en": "You Can Find ", "ar": "تستطيع ان تجد "}, "itemsInSearch": {"en": "items in search", "ar": "عناصر في البحث"}, "qr": {"en": "QR", "ar": "QR"}, "reader": {"en": "Reader", "ar": "قارىء رمز ال"}, "startScanning": {"en": "Start Scanning", "ar": "بدء المسح"}, - "scanQrCode": {"en": "scan Qr code to retrieve patient profile", "ar": "مسح رمزاال QR لاسترداد ملف تعريف المريض"}, + "scanQrCode": { + "en": "scan Qr code to retrieve patient profile", + "ar": "مسح رمزاال QR لاسترداد ملف تعريف المريض" + }, "scanQr": {"en": "Scan Qr", "ar": "اقراء ال QR"}, "profile": {"en": "Profile", "ar": "ملفي الشخصي"}, "gender": {"en": "Gender", "ar": "الجنس"}, @@ -95,9 +116,15 @@ const Map> localizedValues = { "bloodPressure": {"en": "Blood Pressure", "ar": "ضغط الدم"}, "oxygenation": {"en": "Oxygenation", "ar": "الأوكسجين"}, "painScale": {"en": "Pain Scale", "ar": "مقياس الألم"}, - "errorNoVitalSign": {"en": "You don't have any Vital Sign", "ar": "ليس لديك اي مؤشرات حيوية"}, + "errorNoVitalSign": { + "en": "You don't have any Vital Sign", + "ar": "ليس لديك اي مؤشرات حيوية" + }, "labOrders": {"en": "Lab Orders", "ar": "طلبات المختبر"}, - "errorNoLabOrders": {"en": "You don\"t have any lab orders", "ar": "ليس لديك اي طلبات للمختبر"}, + "errorNoLabOrders": { + "en": "You don\"t have any lab orders", + "ar": "ليس لديك اي طلبات للمختبر" + }, "answerThePatient": {"en": "answer the patient", "ar": "الرد على المريض "}, "pleaseEnterAnswer": {"en": "please enter answer", "ar": "الرجاء ادخال الرد"}, "replay": {"en": "Reply", "ar": "تاكيد"}, @@ -105,18 +132,30 @@ const Map> localizedValues = { "progress": {"en": "Progress", "ar": "التقدم"}, "note": {"en": "Note", "ar": "ملاحظة"}, "searchNote": {"en": "Search Note", "ar": "بحث عن ملاحظة"}, - "errorNoProgressNote": {"en": "You don\"t have any Progress Note", "ar": "ليس لديك اي ملاحظة تقدم"}, + "errorNoProgressNote": { + "en": "You don\"t have any Progress Note", + "ar": "ليس لديك اي ملاحظة تقدم" + }, "invoiceNo:": {"en": "Invoice No :", "ar": "رقم الفاتورة"}, "generalResult": {"en": "General Result ", "ar": "النتيجة العامة"}, "description": {"en": "Description", "ar": "الوصف"}, "value": {"en": "Value", "ar": "القيمة"}, "range": {"en": "Range", "ar": "النطاق"}, "enterId": {"en": "User ID", "ar": "معرف المستخدم"}, - "pleaseEnterYourID": {"en": "Please enter your ID", "ar": "الرجاء ادخال الهوية"}, + "pleaseEnterYourID": { + "en": "Please enter your ID", + "ar": "الرجاء ادخال الهوية" + }, "enterPassword": {"en": "Password", "ar": "كلمه السر"}, - "pleaseEnterPassword": {"en": "Please Enter Password", "ar": "الرجاء ادخال الرقم السري"}, + "pleaseEnterPassword": { + "en": "Please Enter Password", + "ar": "الرجاء ادخال الرقم السري" + }, "selectYourProject": {"en": "Branch", "ar": "فرع"}, - "pleaseEnterYourProject": {"en": "Please Enter Your Project", "ar": "الرجاء ادخال مستشفى"}, + "pleaseEnterYourProject": { + "en": "Please Enter Your Project", + "ar": "الرجاء ادخال مستشفى" + }, "login": {"en": "Login", "ar": "تسجيل دخول"}, "drSulaimanAlHabib": {"en": "Dr Sulaiman Al Habib", "ar": "د.سليمان الحبيب"}, "welcomeTo": {"en": "Welcome to", "ar": "مرحبا بك"}, @@ -143,7 +182,10 @@ const Map> localizedValues = { "youWillReceiveA": {"en": "You will receive a", "ar": "سوف تتلقى "}, "loginCode": {"en": "Login Code", "ar": "رمز تسجيل دخول"}, "smsBy": {"en": "By SMS", "ar": "عن طريق رسالة قصيرة"}, - "pleaseEnterTheCode": {"en": "Please enter the code", "ar": "الرجاء ادخال الرمز"}, + "pleaseEnterTheCode": { + "en": "Please enter the code", + "ar": "الرجاء ادخال الرمز" + }, "youDontHaveAnyPatient": { "en": "No data found for the selected search criteria", "ar": "لا توجد بيانات لمعايير البحث المختارة" @@ -155,8 +197,14 @@ const Map> localizedValues = { "tomorrow": {"en": "Tomorrow", "ar": "الغد"}, "nextWeek": {"en": "Next Week", "ar": "الاسبوع القادم"}, "all": {"en": "All", "ar": "الجميع"}, - "errorNoInsuranceApprovals": {"en": "You don\"t have any Insurance Approvals", "ar": "ليس لديك اي موفقات تأمين"}, - "searchInsuranceApprovals": {"en": "Search InsuranceApprovals", "ar": "بحث عن موافقات التأمين"}, + "errorNoInsuranceApprovals": { + "en": "You don\"t have any Insurance Approvals", + "ar": "ليس لديك اي موفقات تأمين" + }, + "searchInsuranceApprovals": { + "en": "Search InsuranceApprovals", + "ar": "بحث عن موافقات التأمين" + }, "status": {"en": "STATUS", "ar": "الحالة"}, "expiryDate": {"en": "EXPIRY DATE", "ar": "تاريخ الانتهاء"}, "producerName": {"en": "PRODUCER NAME", "ar": "اسم المنتج"}, @@ -169,10 +217,19 @@ const Map> localizedValues = { "routine": {"en": "Routine", "ar": "روتيني"}, "send": {"en": "Send", "ar": "ارسال"}, "referralFrequency": {"en": "Referral Frequency:", "ar": "تواتر الحالة:"}, - "selectReferralFrequency": {"en": "Select Referral Frequency:", "ar": "اختار تواتر الحالة:"}, - "clinicalDetailsAndRemarks": {"en": "Clinical Details and Remarks", "ar": "التفاصيل السرسرية والملاحظات"}, + "selectReferralFrequency": { + "en": "Select Referral Frequency:", + "ar": "اختار تواتر الحالة:" + }, + "clinicalDetailsAndRemarks": { + "en": "Clinical Details and Remarks", + "ar": "التفاصيل السرسرية والملاحظات" + }, "remarks": {"en": "Remarks", "ar": "ملاحظات"}, - "pleaseFill": {"en": "Please fill all fields..!", "ar": "الرجاء ملأ جميع الحقول..!"}, + "pleaseFill": { + "en": "Please fill all fields..!", + "ar": "الرجاء ملأ جميع الحقول..!" + }, "replay2": {"en": "Reply", "ar": "رد الطبيب"}, "logout": {"en": "Logout", "ar": "تسجيل خروج"}, "pharmaciesList": {"en": "Pharmacies List", "ar": "قائمة الصيدليات"}, @@ -184,7 +241,10 @@ const Map> localizedValues = { "searchOrders": {"en": "Search Orders", "ar": " بحث عن الطلبات"}, "prescriptionDetails": {"en": "Prescription Details", "ar": "تفاصبل الوصفة"}, "prescriptionInfo": {"en": "Prescription Info", "ar": "معلومات الوصفة"}, - "errorNoOrders": {"en": "You don\"t have any Orders", "ar": "لا يوجد لديك اي طلبات"}, + "errorNoOrders": { + "en": "You don\"t have any Orders", + "ar": "لا يوجد لديك اي طلبات" + }, "livecare": {"en": "Live Care", "ar": "Live Care"}, "beingBad": {"en": "being bad", "ar": "سيء"}, "beingGreat": {"en": "being great", "ar": "رائع"}, @@ -195,14 +255,26 @@ const Map> localizedValues = { "endcallwithcharge": {"en": "End with charge", "ar": "انهاء مع خصم المبلغ"}, "endcall": {"en": "End Call", "ar": "إنهاء المكالمة"}, "transfertoadmin": {"en": "Transfer to admin", "ar": "تحويل للمشرف"}, - "searchMedicineImageCaption": {"en": "Type the medicine name to search", "ar": " اكتب اسم الدواء للبحث"}, + "searchMedicineImageCaption": { + "en": "Type the medicine name to search", + "ar": " اكتب اسم الدواء للبحث" + }, "type": {"en": "Type", "ar": "اكتب"}, "fromDate": {"en": "From Date", "ar": "من تاريخ"}, "toDate": {"en": "To Date", "ar": "الى تاريخ"}, - "searchPatientImageCaptionTitle": {"en": "SEARCH PATIENT", "ar": "البحث عن المريض"}, - "searchPatientImageCaptionBody": {"en": "Add Details Of Patient To search", "ar": " أضف تفاصيل المريض للبحث"}, + "searchPatientImageCaptionTitle": { + "en": "SEARCH PATIENT", + "ar": "البحث عن المريض" + }, + "searchPatientImageCaptionBody": { + "en": "Add Details Of Patient To search", + "ar": " أضف تفاصيل المريض للبحث" + }, "welcome": {"en": "Welcome", "ar": "أهلا بك"}, - "youDoNotHaveAnyItem": {"en": "You don\"t have any Items", "ar": "لا يوجد اي نتائج"}, + "youDoNotHaveAnyItem": { + "en": "You don\"t have any Items", + "ar": "لا يوجد اي نتائج" + }, "typeMedicineName": {"en": "Type Medicine Name", "ar": "اكتب اسم الدواء"}, "moreThan3Letter": { "en": "Medicine Name Should Be More Than 3 letter", @@ -229,14 +301,20 @@ const Map> localizedValues = { "bed": {"en": "BED:", "ar": "السرير"}, "next": {"en": "Next", "ar": "التالي"}, "previous": {"en": "Previous", "ar": "السابق"}, - "healthRecordInformation": {"en": "HEALTH RECORD INFORMATION", "ar": "معلومات السجل الصحي"}, + "healthRecordInformation": { + "en": "HEALTH RECORD INFORMATION", + "ar": "معلومات السجل الصحي" + }, "prevoius-sickleave-issed": { "en": "Total previous sick leave issued by the doctor", "ar": "مجموع الإجازات المرضية السابقة التي أصدرها الطبيب" }, "clinicSelect": {"en": "Select Clinic", "ar": "اختر عيادة"}, "doctorSelect": {"en": "Select Doctor", "ar": "اختر طبيب"}, - "empty-message": {"en": "Please enter this field", "ar": "يرجى ادخال هذا الحقل"}, + "empty-message": { + "en": "Please enter this field", + "ar": "يرجى ادخال هذا الحقل" + }, "no-sickleve-applied": { "en": "No sick leave available, apply Now", "ar": "لا توجد إجازة مرضية متاحة ، تقدم بطلب الآن" @@ -251,13 +329,19 @@ const Map> localizedValues = { "leave-start-date": {"en": "Leave start date", "ar": "تاريخ بدء المغادرة"}, "days-sick-leave": {"en": "Leave Days: ", "ar": "أيام الإجازة "}, "extend": {"en": "Extend", "ar": "تمديد"}, - "extend-sickleave": {"en": "Extend Sick Leave", "ar": "قم بتمديد الإجازة المرضية"}, + "extend-sickleave": { + "en": "Extend Sick Leave", + "ar": "قم بتمديد الإجازة المرضية" + }, "chiefComplaintLength": { "en": "Chief Complaint length should be greater than 25", "ar": "يجب أن يكون طول شكوى الرئيسية أكبر من 25" }, "patient-target": {"en": "Target Patient", "ar": "المريض المستدف"}, - "no-priscription-listed": {"en": "No Prescription Listed", "ar": "لا يوجد وصفة طبية مدرجة"}, + "no-priscription-listed": { + "en": "No Prescription Listed", + "ar": "لا يوجد وصفة طبية مدرجة" + }, "referTo": {"en": "Refer To", "ar": "محال إلى"}, "referredFrom": {"en": "From : ", "ar": " : من"}, "branch": {"en": "Branch", "ar": "الفرع"}, @@ -272,9 +356,15 @@ const Map> localizedValues = { "summaryReport": {"en": "Summary", "ar": "ملخص"}, "accept": {"en": "ACCEPT", "ar": "قبول"}, "reject": {"en": "REJECT", "ar": "رفض"}, - "noAppointmentsErrorMsg": {"en": "There is no appointments for at this date", "ar": "لا توجد مواعيد في هذا التاريخ"}, + "noAppointmentsErrorMsg": { + "en": "There is no appointments for at this date", + "ar": "لا توجد مواعيد في هذا التاريخ" + }, "referralPatient": {"en": "Referral Patient", "ar": "المريض المحال "}, - "noPrescriptionListed": {"en": "NO PRESCRIPTION LISTED", "ar": "لأيوجد وصفة طبية"}, + "noPrescriptionListed": { + "en": "NO PRESCRIPTION LISTED", + "ar": "لأيوجد وصفة طبية" + }, "addNow": {"en": "ADD Now", "ar": "اضف الآن"}, "orderType": {"en": "Order Type", "ar": "نوع الطلب"}, "strength": {"en": "Strength", "ar": "شديد"}, @@ -284,8 +374,14 @@ const Map> localizedValues = { "instruction": {"en": "Instructions", "ar": "إرشادات"}, "addMedication": {"en": "Add Medication", "ar": "اضف دواء"}, "route": {"en": "Route", "ar": "طريقة الاستخدام"}, - "reschedule-leave": {"en": "Reschedule and leaves", "ar": "إعادة الجدولة والمغادرة"}, - "no-reschedule-leave": {"en": "No Reschedule and leaves", "ar": "لايوجد طلبات اعادة جدولة او مغادرة"}, + "reschedule-leave": { + "en": "Reschedule and leaves", + "ar": "إعادة الجدولة والمغادرة" + }, + "no-reschedule-leave": { + "en": "No Reschedule and leaves", + "ar": "لايوجد طلبات اعادة جدولة او مغادرة" + }, "weight": {"en": "Weight", "ar": "الوزن"}, "kg": {"en": "kg", "ar": "كغ"}, "height": {"en": "Height", "ar": "الطول"}, @@ -307,7 +403,10 @@ const Map> localizedValues = { "rhythm": {"en": "Rhythm", "ar": "الإيقاع"}, "respBeats": {"en": "RESP (beats/minute)", "ar": " (دقة/دقيقة)التنفس"}, "patternOfRespiration": {"en": "Pattern Of Respiration", "ar": "نمط التنفس"}, - "bloodPressureDiastoleAndSystole": {"en": "Blood Pressure (Sys, Dias)", "ar": "ضغط الدم (الانقباض, الإنبساط)"}, + "bloodPressureDiastoleAndSystole": { + "en": "Blood Pressure (Sys, Dias)", + "ar": "ضغط الدم (الانقباض, الإنبساط)" + }, "cuffLocation": {"en": "Cuff Location", "ar": "موقع الكف"}, "cuffSize": {"en": "Cuff Size", "ar": "حجم الكف"}, "patientPosition": {"en": "Patient Position", "ar": "موقع المريض"}, @@ -318,41 +417,80 @@ const Map> localizedValues = { "to": {"en": "To", "ar": "إلى"}, "coveringDoctor": {"en": "Covering Doctor: ", "ar": " :تغطية دكتور"}, "requestLeave": {"en": "Request Leave", "ar": "طلب إجازة"}, - "pleaseEnterDate": {"en": "Please enter leave start date", "ar": "الرجاء إدخال تاريخ بدء الإجازة"}, - "pleaseEnterNoOfDays": {"en": "Please enter sick leave days", "ar": "الرجاء إدخال أيام الإجازة المرضية"}, - "pleaseEnterRemarks": {"en": "Please enter remarks", "ar": "الرجاء إدخال الملاحظات"}, + "pleaseEnterDate": { + "en": "Please enter leave start date", + "ar": "الرجاء إدخال تاريخ بدء الإجازة" + }, + "pleaseEnterNoOfDays": { + "en": "Please enter sick leave days", + "ar": "الرجاء إدخال أيام الإجازة المرضية" + }, + "pleaseEnterRemarks": { + "en": "Please enter remarks", + "ar": "الرجاء إدخال الملاحظات" + }, "update": {"en": "Update", "ar": "تحديث"}, "admission": {"en": "Admission", "ar": "تنويم"}, "request": {"en": "Request", "ar": "طلب"}, "admissionRequest": {"en": "Admission Request", "ar": "طلب تنويم"}, "patientDetails": {"en": "Patient Details", "ar": "تفاصيل المريض"}, - "specialityAndDoctorDetail": {"en": "SPECIALITY AND DOCTOR DETAILS", "ar": "تفاصيل التخصص والطبيب"}, + "specialityAndDoctorDetail": { + "en": "SPECIALITY AND DOCTOR DETAILS", + "ar": "تفاصيل التخصص والطبيب" + }, "referringDate": {"en": "Referring Date", "ar": "تاريخ الإحالة"}, "referringDoctor": {"en": "Referring Doctor", "ar": "دكتور الإحالة"}, "otherInformation": {"en": "Other Information", "ar": "معلومات أخرى"}, "expectedDays": {"en": "Expected Days", "ar": "الأيام المتوقعة"}, - "expectedAdmissionDate": {"en": "Expected Admission Date", "ar": "تاريخ التنويم المتوقع"}, + "expectedAdmissionDate": { + "en": "Expected Admission Date", + "ar": "تاريخ التنويم المتوقع" + }, "admissionDate": {"en": "Admission Date", "ar": "تاريخ التنويم"}, - "isSickLeaveRequired": {"en": "Is Sick Leave Required", "ar": "هل الإجازة المرضية مطلوبة"}, + "isSickLeaveRequired": { + "en": "Is Sick Leave Required", + "ar": "هل الإجازة المرضية مطلوبة" + }, "patientPregnant": {"en": "Patient Pregnant", "ar": "المريض حامل"}, - "treatmentLine": {"en": "Main line of treatment", "ar": "الخط الرئيسي للعلاج"}, + "treatmentLine": { + "en": "Main line of treatment", + "ar": "الخط الرئيسي للعلاج" + }, "ward": {"en": "Ward", "ar": "جناح"}, - "preAnesthesiaReferred": {"en": "PRE ANESTHESIA REFERRED", "ar": "الاحالة قبل التخدير"}, + "preAnesthesiaReferred": { + "en": "PRE ANESTHESIA REFERRED", + "ar": "الاحالة قبل التخدير" + }, "admissionType": {"en": "Admission Type", "ar": "نوع التنويم"}, "diagnosis": {"en": "Diagnosis", "ar": "التشخيص"}, "allergies": {"en": "Allergies", "ar": "الحساسية"}, - "preOperativeOrders": {"en": "Pre Operative Orders", "ar": "أوامر ما قبل العملية"}, - "elementForImprovement": {"en": "Element For Improvement", "ar": "عنصر للتحسين"}, + "preOperativeOrders": { + "en": "Pre Operative Orders", + "ar": "أوامر ما قبل العملية" + }, + "elementForImprovement": { + "en": "Element For Improvement", + "ar": "عنصر للتحسين" + }, "dischargeDate": {"en": "Discharge Date", "ar": "تاريخ الخروج"}, "dietType": {"en": "Diet Type", "ar": "نوع النظام الغذائي"}, - "dietTypeRemarks": {"en": "Remarks on diet type", "ar": "ملاحظات على نوع النظام الغذائي"}, + "dietTypeRemarks": { + "en": "Remarks on diet type", + "ar": "ملاحظات على نوع النظام الغذائي" + }, "save": {"en": "SAVE", "ar": "حفظ"}, - "postPlansEstimatedCost": {"en": "POST PLANS & ESTIMATED COST", "ar": "خطط ما بعد العملية والتكلفة المقدرة"}, + "postPlansEstimatedCost": { + "en": "POST PLANS & ESTIMATED COST", + "ar": "خطط ما بعد العملية والتكلفة المقدرة" + }, "postPlans": {"en": "POST PLANS", "ar": "ما بعد العملية"}, "ucaf": {"en": "UCAF", "ar": "UCAF"}, "emergencyCase": {"en": "Emergency Case", "ar": "حالة طارئة"}, "durationOfIllness": {"en": "duration Of Illness", "ar": "مدة المرض"}, - "chiefComplaintsAndSymptoms": {"en": "CHIEF COMPLAINTS", "ar": "الشكوى الرئيسية"}, + "chiefComplaintsAndSymptoms": { + "en": "CHIEF COMPLAINTS", + "ar": "الشكوى الرئيسية" + }, "patientFeelsPainInHisBackAndCough": { "en": "Patient Feels pain in his back and cough", "ar": "يشعر المريض بألم في ظهره ويسعل" @@ -366,7 +504,10 @@ const Map> localizedValues = { "how": {"en": "How", "ar": "كيف"}, "when": {"en": "When", "ar": "متى"}, "where": {"en": "Where", "ar": "أين"}, - "specifyPossibleLineManagement": {"en": "Specify possible line of management", "ar": "حدد خط الإدارة المحتمل"}, + "specifyPossibleLineManagement": { + "en": "Specify possible line of management", + "ar": "حدد خط الإدارة المحتمل" + }, "significantSigns": {"en": "SIGNIFICANT SIGNS", "ar": "علامات مهمة"}, "backAbdomen": {"en": "Back : Abdomen", "ar": "الظهر: البطن"}, "reasons": {"en": "Reasons", "ar": "الأسباب"}, @@ -376,11 +517,20 @@ const Map> localizedValues = { "addChiefComplaints": {"en": "Add Chief Complaints", "ar": " اضافه الشكاوى"}, "histories": {"en": "Histories", "ar": "التاريخ المرضي"}, "allergiesSoap": {"en": "Allergies", "ar": "الحساسية"}, - "historyOfPresentIllness": {"en": "History of Present Illness", "ar": "تاريخ المرض الحالي"}, - "requiredMsg": {"en": "Please add required field correctly", "ar": "الرجاء إضافة الحقل المطلوب بشكل صحيح"}, + "historyOfPresentIllness": { + "en": "History of Present Illness", + "ar": "تاريخ المرض الحالي" + }, + "requiredMsg": { + "en": "Please add required field correctly", + "ar": "الرجاء إضافة الحقل المطلوب بشكل صحيح" + }, "addHistory": {"en": "Add History", "ar": "اضافه تاريخ مرضي"}, "searchHistory": {"en": "Search History", "ar": " البحث"}, - "addSelectedHistories": {"en": "Add Selected Histories", "ar": " اضافه تاريخ مرضي"}, + "addSelectedHistories": { + "en": "Add Selected Histories", + "ar": " اضافه تاريخ مرضي" + }, "addAllergies": {"en": "Add Allergies", "ar": "أضف الحساسية"}, "itemExist": {"en": "This item already exist", "ar": "هذا العنصر موجود"}, "selectAllergy": {"en": "Select Allergy", "ar": "أختر الحساسية"}, @@ -388,9 +538,18 @@ const Map> localizedValues = { "leaveCreated": {"en": "Leave has been created", "ar": "تم إنشاء الإجازة"}, "medications": {"en": "Medications", "ar": "الأدوية"}, "procedures": {"en": "Procedures", "ar": "الإجراءات"}, - "vitalSignEmptyMsg": {"en": "There is no vital signs for this patient", "ar": "لا توجد علامات حيوية لهذا المريض"}, - "referralEmptyMsg": {"en": "There is no referral data", "ar": "لا توجد بيانات إحالة"}, - "referralSuccessMsg": {"en": "You make referral successfully", "ar": "تمت الاحالة بنجاح"}, + "vitalSignEmptyMsg": { + "en": "There is no vital signs for this patient", + "ar": "لا توجد علامات حيوية لهذا المريض" + }, + "referralEmptyMsg": { + "en": "There is no referral data", + "ar": "لا توجد بيانات إحالة" + }, + "referralSuccessMsg": { + "en": "You make referral successfully", + "ar": "تمت الاحالة بنجاح" + }, "fromTime": {"en": "From Time", "ar": "من وقت"}, "toTime": {"en": "To Time", "ar": "الى وقت"}, "diagnoseType": {"en": "Diagnose Type", "ar": "نوع التشخيص"}, @@ -401,9 +560,18 @@ const Map> localizedValues = { "codeNo": {"en": "Code #", "ar": "# الرمز"}, "covered": {"en": "Covered", "ar": "مغطى"}, "approvalRequired": {"en": "Approval Required", "ar": "الموافقة مطلوبة"}, - "uncoveredByDoctor": {"en": "Uncovered By Doctor", "ar": "غير مغطى من قبل الدكتور"}, - "chiefComplaintEmptyMsg": {"en": "There is no Chief Complaint", "ar": "ليس هناك شكوى رئيسية"}, - "more-verify": {"en": "More Verification Options", "ar": "المزيد من خيارات التحقق"}, + "uncoveredByDoctor": { + "en": "Uncovered By Doctor", + "ar": "غير مغطى من قبل الدكتور" + }, + "chiefComplaintEmptyMsg": { + "en": "There is no Chief Complaint", + "ar": "ليس هناك شكوى رئيسية" + }, + "more-verify": { + "en": "More Verification Options", + "ar": "المزيد من خيارات التحقق" + }, "welcome-back": {"en": "Welcome back!", "ar": "مرحبا بك!"}, "account-info": { "en": "Would you like to login with current username?", @@ -420,24 +588,37 @@ const Map> localizedValues = { "verify-with-sms": {"en": " SMS", "ar": "الرسائل القصيرة"}, "verify-with-whatsapp": {"en": "WhatsApp", "ar": " الواتس اب"}, "verify-with": {"en": "Verify through ", "ar": " الواتس اب"}, - "last-login": {"en": "Last login details:", "ar": "تفاصيل تسجيل الدخول الأخير:"}, + "last-login": { + "en": "Last login details:", + "ar": "تفاصيل تسجيل الدخول الأخير:" + }, "last-login-with": {"en": "VERIFICATION TYPE:", "ar": "نوع التحقق:"}, "verify-fingerprint": { - "en": "To activate the fingerprint login service, please verify data by using one of the following options.", + "en": + "To activate the fingerprint login service, please verify data by using one of the following options.", "ar": "لتفعيل خدمة الدخول بالبصمة، يرجى اختيار احدى القنوات التالية" }, "verification_message": { "en": "Please enter the Verification Code sent to", "ar": "الرجاء ادخال رمز التحقق الذي تم إرساله إلى" }, - "validation_message": {"en": "The verification code expires in", "ar": "تنتهي صلاحية رمز التحقق خلال"}, + "validation_message": { + "en": "The verification code expires in", + "ar": "تنتهي صلاحية رمز التحقق خلال" + }, "addAssessment": {"en": "Add Assessment", "ar": "أضف التقييم"}, "assessment": {"en": "Assessment", "ar": " التقييم"}, - "physicalSystemExamination": {"en": "Physical System / Examination", "ar": "الفحص البدني / النظام"}, + "physicalSystemExamination": { + "en": "Physical System / Examination", + "ar": "الفحص البدني / النظام" + }, "searchExamination": {"en": "Search Examination", "ar": "بحث عن فحص"}, "addExamination": {"en": "Add Examination", "ar": "اضافة فحص"}, "doc": {"en": "Doc : ", "ar": " د : "}, - "patientNoDetailErrMsg": {"en": "There is no detail for this patient", "ar": "لا توجد تفاصيل لهذا المريض"}, + "patientNoDetailErrMsg": { + "en": "There is no detail for this patient", + "ar": "لا توجد تفاصيل لهذا المريض" + }, "allergicTO": {"en": "ALLERGIC TO ", "ar": "حساس من"}, "normal": {"en": "Normal", "ar": "عادي"}, "abnormal": {"en": "Abnormal", "ar": " غير عادي"}, @@ -456,25 +637,46 @@ const Map> localizedValues = { "visitDate": {"en": "Visit Date", "ar": "تاريخ الزيارة"}, "test": {"en": "Procedures/Test", "ar": "اجراءات/تحاليل"}, "regular": {"en": "Regular", "ar": "اعتيادي"}, - "addMoreProcedure": {"en": "Add More Procedures", "ar": "اضف المزيد من اجراءات"}, + "addMoreProcedure": { + "en": "Add More Procedures", + "ar": "اضف المزيد من اجراءات" + }, "searchProcedures": {"en": "Search Procedures", "ar": "البحث في اجراءات"}, "selectProcedures": {"en": "Select procedure", "ar": "اختر الاجراء"}, - "procedureCategorise": {"en": "Select Procedure Category", "ar": "اختر نوع الاجراء "}, - "addSelectedProcedures": {"en": "add Selected Procedures", "ar": "اضافة الاجراءات المختارة "}, + "procedureCategorise": { + "en": "Select Procedure Category", + "ar": "اختر نوع الاجراء " + }, + "addSelectedProcedures": { + "en": "add Selected Procedures", + "ar": "اضافة الاجراءات المختارة " + }, "addProcedures": {"en": "Add Procedure", "ar": "اضافة اجراء"}, "updateProcedure": {"en": "Update Procedure", "ar": "تحديث الاجراء"}, "orderProcedure": {"en": "order procedure", "ar": "طلب اجراء"}, "nameOrICD": {"en": "Name or ICD", "ar": "Name or ICD"}, "dType": {"en": "Type", "ar": "النوع"}, - "addAssessmentDetails": {"en": "Add Assessment Details", "ar": "أضف تفاصيل التقييم"}, + "addAssessmentDetails": { + "en": "Add Assessment Details", + "ar": "أضف تفاصيل التقييم" + }, "progressNoteSOAP": {"en": "Progress Note", "ar": "ملاحظة التقدم"}, "addProgressNote": {"en": "Add Progress Note", "ar": "أضف ملاحظة التقدم"}, "createdBy": {"en": "Created By :", "ar": "أضيفت عن طريق: "}, "editedBy": {"en": "Edited By :", "ar": "عدلت من : "}, "currentMedications": {"en": "Current Medications", "ar": "الأدوية الحالية"}, - "noItem": {"en": "No items exists in this list", "ar": "لا توجد عناصر في هذه القائمة"}, - "postUcafSuccessMsg": {"en": "UCAF request send successfully", "ar": "تم ارسال طلب UCAF بنجاح"}, - "vitalSignDetailEmpty": {"en": "There is no data for this vital sign", "ar": "لا توجد بيانات لهذه العلامة الحيوية"}, + "noItem": { + "en": "No items exists in this list", + "ar": "لا توجد عناصر في هذه القائمة" + }, + "postUcafSuccessMsg": { + "en": "UCAF request send successfully", + "ar": "تم ارسال طلب UCAF بنجاح" + }, + "vitalSignDetailEmpty": { + "en": "There is no data for this vital sign", + "ar": "لا توجد بيانات لهذه العلامة الحيوية" + }, "onlyOfftimeHoliday": { "en": "You can only apply holiday or offtime from mobile app", "ar": "يمكنك تقديم عطلة أو إجازة فقط" @@ -490,7 +692,10 @@ const Map> localizedValues = { "en": "You have to add at least one examination.", "ar": "يجب عليك إضافة فحص واحد على الأقل." }, - "progressNoteErrorMsg": {"en": "You have to add progress Note.", "ar": "يجب عليك إضافة ملاحظة التقدم."}, + "progressNoteErrorMsg": { + "en": "You have to add progress Note.", + "ar": "يجب عليك إضافة ملاحظة التقدم." + }, "chiefComplaintErrorMsg": { "en": "You have to add chief complaint fields correctly .", "ar": "يجب عليك إضافة الشكوى الرئيسية بشكل صحيح" @@ -514,20 +719,41 @@ const Map> localizedValues = { "referralStatusNotSeen": {"en": "NotSeen", "ar": "لم يحضر"}, "clinicSearch": {"en": "Search Clinic", "ar": "بحث عن عيادة"}, "doctorSearch": {"en": "Search Doctor", "ar": "بحث عن طبيب"}, - "referralResponse": {"en": "Referral Response : ", "ar": " : استجابة الإحالة"}, + "referralResponse": { + "en": "Referral Response : ", + "ar": " : استجابة الإحالة" + }, "estimatedCost": {"en": "Estimated Cost", "ar": "التكلفة المتوقعة"}, "diagnosisDetail": {"en": "Diagnosis Details", "ar": "تفاصيل التشخيص"}, - "referralSuccessMsgAccept": {"en": "Referral Accepted Successfully", "ar": "تم قبول الإحالة بنجاح"}, - "referralSuccessMsgReject": {"en": "Referral Rejected Successfully", "ar": "تم رفض الإحالة بنجاح"}, - "sickLeaveComments": {"en": "Sick leave comments", "ar": "ملاحظات الإجازة المرضية"}, + "referralSuccessMsgAccept": { + "en": "Referral Accepted Successfully", + "ar": "تم قبول الإحالة بنجاح" + }, + "referralSuccessMsgReject": { + "en": "Referral Rejected Successfully", + "ar": "تم رفض الإحالة بنجاح" + }, + "sickLeaveComments": { + "en": "Sick leave comments", + "ar": "ملاحظات الإجازة المرضية" + }, "pastMedicalHistory": {"en": "Past medical history", "ar": "التاريخ الطبي"}, - "pastSurgicalHistory": {"en": "Past surgical history", "ar": "التاريخ الجراحي"}, + "pastSurgicalHistory": { + "en": "Past surgical history", + "ar": "التاريخ الجراحي" + }, "complications": {"en": "Complications", "ar": "المضاعفات"}, "floor": {"en": "Floor", "ar": "الطابق"}, "roomCategory": {"en": "Room category", "ar": "فئة الغرفة"}, - "otherDepartmentsInterventions": {"en": "Other departments interventions", "ar": "ملاحظات الأقسام الأخرى"}, + "otherDepartmentsInterventions": { + "en": "Other departments interventions", + "ar": "ملاحظات الأقسام الأخرى" + }, "otherProcedure": {"en": "Other procedure", "ar": "إجراء آخر"}, - "admissionRequestSuccessMsg": {"en": "Admission Request Created Successfully", "ar": "تم إنشاء طلب التنويم بنجاح"}, + "admissionRequestSuccessMsg": { + "en": "Admission Request Created Successfully", + "ar": "تم إنشاء طلب التنويم بنجاح" + }, "orderNo": {"en": "Order No : ", "ar": "رقم الطلب"}, "infoStatus": {"en": "Info Status", "ar": "حالة المعلومات"}, "doctorResponse": {"en": "Doctor Response", "ar": "استجابة الطبيب"}, @@ -540,7 +766,10 @@ const Map> localizedValues = { "ptientsreferral": {"en": "Patients Referrals", "ar": "إحالات المريض"}, "myPatientsReferral": {"en": "Patient's\nReferrals", "ar": "إحالات\nالمريض"}, "arrivalpatient": {"en": "Arrival Patients", "ar": "المرضى الواصلون"}, - "searchmedicinepatient": {"en": "Search patient or Medicines", "ar": "ابحث عن المريض أو الأدوية"}, + "searchmedicinepatient": { + "en": "Search patient or Medicines", + "ar": "ابحث عن المريض أو الأدوية" + }, "appointmentDate": {"en": "Appointment Date", "ar": "تاريخ الموعد"}, "arrived_p": {"en": "Arrived", "ar": "وصل"}, "details": {"en": "Details", "ar": "التفاصيل"}, @@ -548,16 +777,28 @@ const Map> localizedValues = { "out-patient": {"en": "OutPatient", "ar": "عيادات خارجية"}, "BillNo": {"en": "Bill No :", "ar": "رقم الفاتورة"}, "labResults": {"en": "Lab Result", "ar": "نتيجة المختبر"}, - "sendSuc": {"en": "A copy has been sent to the email", "ar": "تم إرسال نسخة إلى البريد الإلكتروني"}, + "sendSuc": { + "en": "A copy has been sent to the email", + "ar": "تم إرسال نسخة إلى البريد الإلكتروني" + }, "SpecialResult": {"en": "Special Result", "ar": "نتيجة خاصة"}, - "noDataAvailable": {"en": "No data available", "ar": " لا يوجد بيانات متاحة "}, + "noDataAvailable": { + "en": "No data available", + "ar": " لا يوجد بيانات متاحة " + }, "show-more-btn": {"en": "Flowchart", "ar": "النتائج التراكمية"}, "open-rad": {"en": "Open Radiology Image", "ar": "فتح صور الاشعة"}, "fileNumber": {"en": "File Number: ", "ar": "رقم الملف : "}, - "searchPatient-name": {"en": "Search Name, Medical File, Phone Number", "ar": "اسم البحث ، الملف الطبي ، رقم الهاتف"}, + "searchPatient-name": { + "en": "Search Name, Medical File, Phone Number", + "ar": "اسم البحث ، الملف الطبي ، رقم الهاتف" + }, "reschedule": {"en": "Reschedule", "ar": "إعادة جدولة"}, "leaves": {"en": "Leaves", "ar": "يغادر"}, - "totalApproval": {"en": "Total approval unused", "ar": "اجمالي الموافقات الغير مستخدمة"}, + "totalApproval": { + "en": "Total approval unused", + "ar": "اجمالي الموافقات الغير مستخدمة" + }, "procedureStatus": {"en": "Procedure Status: ", "ar": "حالة الاجراء"}, "unusedCount": {"en": "Unused Count: ", "ar": "غير مستخدم: "}, "companyName": {"en": "Company Name ", "ar": "اسم الشركة: "}, @@ -566,16 +807,31 @@ const Map> localizedValues = { "prescriptions": {"en": "Prescriptions", "ar": "الوصفات الطبية"}, "notes": {"en": "Notes", "ar": "ملاحظات"}, "dailyDoses": {"en": "Daily Doses", "ar": "جرعات يومية"}, - "searchWithOther": {"en": "Search With Other Criteria", "ar": "المزيد من خيارات البحث"}, - "hideOtherCriteria": {"en": "Hide Other Criteria", "ar": "إخفاء الخيارات الأخرى"}, - "applyForReschedule": {"en": "Apply for leave or reschedule", "ar": "تقدم بطلب للحصول على إجازة أو إعادة جدولة"}, + "searchWithOther": { + "en": "Search With Other Criteria", + "ar": "المزيد من خيارات البحث" + }, + "hideOtherCriteria": { + "en": "Hide Other Criteria", + "ar": "إخفاء الخيارات الأخرى" + }, + "applyForReschedule": { + "en": "Apply for leave or reschedule", + "ar": "تقدم بطلب للحصول على إجازة أو إعادة جدولة" + }, "startDate": {"en": "Start Date: ", "ar": " :تاريخ البدء"}, "endDate": {"en": "End Date: ", "ar": " :تاريخ الانتهاء"}, "add-reschedule": {"en": "Add reschedule", "ar": "أضف إعادة الجدولة"}, "update-reschedule": {"en": "Update reschedule", "ar": "تحديث إعادة الجدولة"}, "sick_leave": {"en": "Sick Leave", "ar": "إجازة مرضية"}, - "addSickLeaveRequest": {"en": "Add Sick Leave Request", "ar": "إضافة طلب إجازة مرضية"}, - "extendSickLeaveRequest": {"en": "Extend Sick Leave Request", "ar": "تمديد طلب الإجازة المرضية"}, + "addSickLeaveRequest": { + "en": "Add Sick Leave Request", + "ar": "إضافة طلب إجازة مرضية" + }, + "extendSickLeaveRequest": { + "en": "Extend Sick Leave Request", + "ar": "تمديد طلب الإجازة المرضية" + }, "accepted": {"en": "Accepted", "ar": "موافق"}, "cancelled": {"en": "Cancelled", "ar": "ألغي"}, "unReplied": {"en": "UnReplied", "ar": "لم يتم الرد"}, @@ -585,10 +841,16 @@ const Map> localizedValues = { "remove": {"en": "Remove", "ar": "حذف"}, "changeOfSchedule": {"en": "Change of Schedule", "ar": "تغيير الجدول"}, "newSchedule": {"en": "New Schedule", "ar": "جدول جديد"}, - "enter_credentials": {"en": "Enter the user credentials below", "ar": "أدخل بيانات المستخدم أدناه"}, + "enter_credentials": { + "en": "Enter the user credentials below", + "ar": "أدخل بيانات المستخدم أدناه" + }, "step": {"en": "Step", "ar": "خطوة"}, "fieldRequired": {"en": "This field is required", "ar": "هذه الخانة مطلوبه"}, - "applyOrRescheduleLeave": {"en": "Apply Reschedule Leave", "ar": "التقدم بطلب أو إعادة جدولة الإجازة"}, + "applyOrRescheduleLeave": { + "en": "Apply Reschedule Leave", + "ar": "التقدم بطلب أو إعادة جدولة الإجازة" + }, "myQRCode": {"en": "My QR Code", "ar": " كود QR "}, "patientIDMobilenational": { "en": "Patient ID, National ID, Mobile Number", @@ -603,32 +865,68 @@ const Map> localizedValues = { "try-saying": {"en": "Try saying something", "ar": "حاول قول شيء ما"}, "refClinic": {"en": "Ref Clinic", "ar": "العيادة المرجعية"}, "acknowledged": {"en": "Acknowledged", "ar": "إقرار"}, - "didntCatch": {"en": "Didn't catch that. Try Speaking again", "ar": "لم يتم التقاط ذلك. حاول التحدث مرة أخرى"}, + "didntCatch": { + "en": "Didn't catch that. Try Speaking again", + "ar": "لم يتم التقاط ذلك. حاول التحدث مرة أخرى" + }, "showDetail": {"en": "Show Detail", "ar": "أظهر المعلومات"}, "viewProfile": {"en": "View Profile", "ar": "إعرض الملف"}, - "pleaseEnterProcedure": {"en": "Please Enter Procedure", "ar": "الرجاء إدخال الإجراء "}, - "fillTheMandatoryProcedureDetails": {"en": "Fill The Mandatory Procedure Details", "ar": "املأ تفاصيل الإجراء"}, - "atLeastThreeCharacters": {"en": "At least three Characters", "ar": "ثلاثة أحرف على الأقل "}, - "searchProcedureHere": {"en": "Search Procedure here...", "ar": "إجراء البحث هنا ... "}, - "noInsuranceApprovalFound": {"en": "No Insurance Approval Found", "ar": "لم يتم العثور على موافقة التأمين"}, + "pleaseEnterProcedure": { + "en": "Please Enter Procedure", + "ar": "الرجاء إدخال الإجراء " + }, + "fillTheMandatoryProcedureDetails": { + "en": "Fill The Mandatory Procedure Details", + "ar": "املأ تفاصيل الإجراء" + }, + "atLeastThreeCharacters": { + "en": "At least three Characters", + "ar": "ثلاثة أحرف على الأقل " + }, + "searchProcedureHere": { + "en": "Search Procedure here...", + "ar": "إجراء البحث هنا ... " + }, + "noInsuranceApprovalFound": { + "en": "No Insurance Approval Found", + "ar": "لم يتم العثور على موافقة التأمين" + }, "procedure": {"en": "Procedure", "ar": "اجراء"}, "stopDate": {"en": "Stop Date", "ar": "تاريخ التوقف"}, "processed": {"en": "processed", "ar": "معالجتها"}, "direction": {"en": "Direction", "ar": "توجيه"}, "refill": {"en": "Refill", "ar": "اعادة تعبئه"}, - "medicationHasBeenAdded": {"en": "Medication has been added", "ar": "تمت إضافة الدواء"}, - "newPrescriptionOrder": {"en": "New Prescription Order", "ar": "طلب وصفة طبية جديد "}, - "pleaseFillAllFields": {"en": "Please Fill All Fields", "ar": "الرجاء أملأ جميع الحقول"}, + "medicationHasBeenAdded": { + "en": "Medication has been added", + "ar": "تمت إضافة الدواء" + }, + "newPrescriptionOrder": { + "en": "New Prescription Order", + "ar": "طلب وصفة طبية جديد " + }, + "pleaseFillAllFields": { + "en": "Please Fill All Fields", + "ar": "الرجاء أملأ جميع الحقول" + }, "narcoticMedicineCanOnlyBePrescribedFromVida": { "en": "Narcotic medicine can only be prescribed from VIDA", "ar": "لا يمكن وصف الأدوية المخدرة إلا من VIDA " }, - "only5DigitsAllowedForStrength": {"en": "Only 5 Digits allowed for strength", "ar": "يسمح فقط بـ 5 أرقام للقوة"}, + "only5DigitsAllowedForStrength": { + "en": "Only 5 Digits allowed for strength", + "ar": "يسمح فقط بـ 5 أرقام للقوة" + }, "unit": {"en": "Unit", "ar": "وحدة"}, "boxQuantity": {"en": "Box Quantity", "ar": "كمية العبوة "}, "orderTestOr": {"en": "Order Test or", "ar": "اطلب اختبار أو"}, - "applyForRadiologyOrder": {"en": "Apply for Radiology Order", "ar": "التقدم بطلب للحصول على طلب الأشعة "}, - "applyForNewLabOrder": {"en": "Apply for New Lab Order", "ar": "تقدم بطلب جديد للمختبر الأشعة"}, + "applyForRadiologyOrder": { + "en": "Apply for Radiology Order", + "ar": "التقدم بطلب للحصول على طلب الأشعة " + }, + "applyForNewLabOrder": { + "en": "Apply for New Lab Order", + "ar": "تقدم بطلب جديد للمختبر الأشعة" + }, "addLabOrder": {"en": "Add Lab Order", "ar": "إضافة طلب مختبر"}, "addRadiologyOrder": {"en": "Add Radiology Order", "ar": "إضافة اشعة"}, "newRadiologyOrder": {"en": "New Radiology Order", "ar": "طلب أشعة جديد"}, @@ -640,14 +938,23 @@ const Map> localizedValues = { "en": "Apply for New Prescriptions Order", "ar": "التقدم بطلب للحصول على وصفات طبية جديدة " }, - "noPrescriptionsFound": {"en": "No Prescriptions Found", "ar": "لم يتم العثور على وصفات طبية"}, - "noMedicalFileFound": {"en": "No Medical File Found", "ar": "لم يتم العثور على ملف طبي"}, + "noPrescriptionsFound": { + "en": "No Prescriptions Found", + "ar": "لم يتم العثور على وصفات طبية" + }, + "noMedicalFileFound": { + "en": "No Medical File Found", + "ar": "لم يتم العثور على ملف طبي" + }, "insurance22": {"en": "Insurance", "ar": "موافقات"}, "approvals22": {"en": "Approvals", "ar": "التامين"}, "severe": {"en": "Severe", "ar": "الشدة"}, "graphDetails": {"en": "Graph Details", "ar": "تفاصيل الرسم البياني"}, "addNewOrderSheet": {"en": "Add a New Order Sheet", "ar": "أضف طلب جديد"}, - "addNewProgressNote": {"en": "Add a New Progress Note", "ar": "أضف ملاحظة جديدة"}, + "addNewProgressNote": { + "en": "Add a New Progress Note", + "ar": "أضف ملاحظة جديدة" + }, "notePending": {"en": "Pending", "ar": "قيد الانتظار"}, "noteCanceled": {"en": "Canceled", "ar": "ألغي"}, "noteVerified": {"en": "Verified", "ar": "تم التحقق"}, @@ -666,7 +973,10 @@ const Map> localizedValues = { "notRepliedYet": {"en": "Not Replied yet", "ar": "لم يتم الرد بعد"}, "clearText": {"en": "Clear Text", "ar": "نص واضح"}, "medicalReportAdd": {"en": "Add Medical Report", "ar": "إضافة تقرير طبي"}, - "medicalReportVerify": {"en": "Verify Medical Report", "ar": "تحقق من التقرير الطبي"}, + "medicalReportVerify": { + "en": "Verify Medical Report", + "ar": "تحقق من التقرير الطبي" + }, "comments": {"en": "Comments", "ar": "ملاحظات"}, "initiateCall": {"en": "Initiate Call ", "ar": "بدء الاتصال"}, "transferTo": {"en": "Transfer To ", "ar": "حول إلى"}, @@ -677,10 +987,22 @@ const Map> localizedValues = { "consultation": {"en": "Consultation", "ar": "استشارة"}, "resume": {"en": "Resume", "ar": "استأنف"}, "theCall": {"en": "The Call", "ar": "الاتصال"}, - "createNewMedicalReport": {"en": "Create New Medical Report", "ar": "إنشاء تقرير طبي جديد"}, - "historyPhysicalFinding": {"en": "History and Physical Finding", "ar": "التاريخ"}, - "laboratoryPhysicalData": {"en": "Laboratory and Physical Data", "ar": "المختبرات والبيانات الفيزيائية"}, - "impressionRecommendation": {"en": "Impression and Recommendation", "ar": "الانطباع والتوصية"}, + "createNewMedicalReport": { + "en": "Create New Medical Report", + "ar": "إنشاء تقرير طبي جديد" + }, + "historyPhysicalFinding": { + "en": "History and Physical Finding", + "ar": "التاريخ" + }, + "laboratoryPhysicalData": { + "en": "Laboratory and Physical Data", + "ar": "المختبرات والبيانات الفيزيائية" + }, + "impressionRecommendation": { + "en": "Impression and Recommendation", + "ar": "الانطباع والتوصية" + }, "onHold": {"en": "On Hold", "ar": "قيد الانتظار"}, "verified": {"en": "Verified", "ar": "تم التحقق"}, "endCall": {"en": "End Call", "ar": "انهاء"}, @@ -693,21 +1015,107 @@ const Map> localizedValues = { "edit": {"en": "Edit", "ar": "تعديل"}, "summeryReply": {"en": "Summary Reply", "ar": "ملخص الرد"}, "finish": {"en": "Finish", "ar": "انهاء"}, - "severityValidationError": {"en": "Please add allergy severity", "ar": "الرجاء إضافة شدة الحساسية"}, + "severityValidationError": { + "en": "Please add allergy severity", + "ar": "الرجاء إضافة شدة الحساسية" + }, "inProgress": {"en": "inProgress", "ar": "تحت المعالجه"}, "Completed": {"en": "Completed", "ar": "مكتمل"}, "Locked": {"en": "Locked", "ar": "مقفل"}, - "textCopiedSuccessfully": {"en": "Text copied successfully", "ar": "تم نسخ النص بنجاح"}, + "textCopiedSuccessfully": { + "en": "Text copied successfully", + "ar": "تم نسخ النص بنجاح" + }, "roomNo": {"en": "Room No", "ar": "رقم الغرفة"}, "replayCallStatus": {"en": "Called", "ar": "تم الاتصال"}, "patientArrived": {"en": "Patient Arrived", "ar": "وصل المريض"}, - "calledAndNoResponse": {"en": "Called And No Response", "ar": "تم الاتصال ولا يوجد رد"}, + "calledAndNoResponse": { + "en": "Called And No Response", + "ar": "تم الاتصال ولا يوجد رد" + }, "underProcess": {"en": "Under Process", "ar": "تحت التجهيز"}, "textResponse": {"en": "Text Response", "ar": "استجابة النص"}, "notReplied": {"en": "Not Replied", "ar": "لم يتم يرد"}, - "requestType":{ - "en":"Request Type", - "ar":"نوع الطلب"}, + "requestType": {"en": "Request Type", "ar": "نوع الطلب"}, "special": {"en": "Special", "ar": "خاص"}, - "allClinic": {"en": "All Clinics", "ar": "جميع العيادات"} + "allClinic": {"en": "All Clinics", "ar": "جميع العيادات"}, + "operationReports": {"en": "Operation Reports", "ar": "تقارير العملية"}, + "reports": {"en": "Reports", "ar": "تقارير "}, + "operation": {"en": "Operation", "ar": " العملية"}, + "registerNewPatient": { + "en": "Register\nNew Patient", + "ar": "تسجيل\n مريض جديد" + }, + "registeraPatient": {"en": "Register a Patient", "ar": "تسجيل المريض"}, + "occupation": {"en": "Occupation", "ar": "مهنة"}, + "healthID": {"en": "Health ID", "ar": "معرف الصحة"}, + "identityNumber": {"en": "Identity Number", "ar": "رقم الهوية"}, + "maritalStatus": {"en": "Marital Status", "ar": "الحالة الزوجية"}, + "nursing": {"en": "Nursing", "ar": "تمريض"}, + "diabetic": {"en": "Diabetic", "ar": "مرض السكري"}, + "chart": {"en": "Chart", "ar": "جدول"}, + "operationTimeStart": { + "en": "Operation Time Start :", + "ar": "بدء وقت العملية:" + }, + "operationDate": {"en": "operation Date :", "ar": "تاريخ العملية:"}, + "reservation": {"en": "Reservation Number :", "ar": " رقم الحجز :"}, + "anesthetist": {"en": "Anesthetist", "ar": "طبيب تخدير "}, + "bloodTransfusedDetail": { + "en": "blood Transfused Detail", + "ar": "تفاصيل نقل الدم " + }, + "circulatingNurse": {"en": "circulating Nurse", "ar": "ممرضة عمومية"}, + "scrubNurse": {"en": "Scrub Nurse", "ar": "ممرضة تدليك"}, + "otherSpecimen": {"en": "Other Specimen", "ar": "عينة أخرى"}, + "microbiologySpecimen": { + "en": "Microbiology Specimen", + "ar": "عينة علم الأحياء الدقيقة" + }, + "histopathSpecimen": {"en": "Histopath Specimen", "ar": "عينة الأنسجة"}, + "bloodLossDetail": {"en": "Blood Loss Detail", "ar": "تفاصيل فقدان الدم"}, + "complicationDetails1": { + "en": "Complication Details", + "ar": "تفاصيل المضاعفات" + }, + "postOperationInstruction": { + "en": "Post Operation Instruction", + "ar": "تعليمات ما بعد العملية" + }, + "surgeryProcedure": {"en": "Surgery Procedures", "ar": "إجراءات الجراحة"}, + "finding": {"en": "Finding", "ar": "العثور على"}, + "preOperationDiagnosis": { + "en": "Pre OperationOperation Diagnosis", + "ar": "التشخيص قبل العملية" + }, + "postOperationDiagnosis": { + "en": "Post Operation Diagnosis", + "ar": "تشخيص ما بعد العملية" + }, + "surgeon": {"en": "surgeon", "ar": "دكتور جراح"}, + "assistant": {"en": "assistant", "ar": "مساعد"}, + "askForIdentification": { + "en": "Please enter a mobile number or Identification number", + "ar": "الرجاء إدخال رقم الهاتف المحمول أو رقم التعريف" + }, + "iDNumber": {"en": "ID Number", "ar": "رقم معرف"}, + "calender": {"en": "Calender", "ar": "التقويم"}, + "gregorian": {"en": "Gregorian", "ar": "ميلادي"}, + "hijri": {"en": "Hijri", "ar": "هجري"}, + "birthdate": {"en": "Birthdate", "ar": "تاريخ الولادة"}, + "activation": {"en": "Activation", "ar": "تفعيل"}, + "confirmation": {"en": "Confirmation", "ar": "تفعيل"}, + "firstNameInAr": {"en": "First Name In Arabic", "ar": "الاسم الاول بالعربية"}, + "middleNameInAr": { + "en": "Middle Name In Arabic", + "ar": "الاسم الأوسط بالعربية" + }, + "lastNameInAr": {"en": "Last Name In Arabic", "ar": "الاسم الأخير بالعربية"}, + "investigation": {"en": "investigation", "ar": "التحقيقات"}, + "conditionOnDischarge": { + "en": "Condition On Discharge", + "ar": "الحالة عند الاخراج" + }, + "planedProcedure": {"en": "Planed Procedure", "ar": "الإجراء المخطط"}, + "moreDetails": {"en": "More Details", "ar": "المزيد من التفاصيل"}, }; diff --git a/lib/config/size_config.dart b/lib/config/size_config.dart index abb3ddd6..21859d3b 100644 --- a/lib/config/size_config.dart +++ b/lib/config/size_config.dart @@ -12,9 +12,8 @@ class SizeConfig { static double textMultiplier; static double imageSizeMultiplier; static double heightMultiplier; - static double widthMultiplier; - static bool isPortrait = true; + static double widthMultiplier; static bool isMobilePortrait = false; static bool isMobile = false; static bool isHeightShort = false; @@ -61,7 +60,7 @@ class SizeConfig { } _blockWidth = screenWidth / 100; _blockHeight = screenHeight / 100; - + textMultiplier = _blockHeight; imageSizeMultiplier = _blockWidth; heightMultiplier = _blockHeight; @@ -75,8 +74,6 @@ class SizeConfig { print('widthMultiplier $widthMultiplier'); print('isPortrait $isPortrait'); print('isMobilePortrait $isMobilePortrait'); - - } static getTextMultiplierBasedOnWidth({double width}) { @@ -102,5 +99,4 @@ class SizeConfig { } return heightMultiplier; } - } diff --git a/lib/core/enum/CalenderType.dart b/lib/core/enum/CalenderType.dart new file mode 100644 index 00000000..51f98512 --- /dev/null +++ b/lib/core/enum/CalenderType.dart @@ -0,0 +1,4 @@ +enum CalenderType{ + Gregorian, + Hijri, +} \ No newline at end of file diff --git a/lib/core/model/PatientRegistration/CheckActivationCodeModel.dart b/lib/core/model/PatientRegistration/CheckActivationCodeModel.dart new file mode 100644 index 00000000..4b95c1b0 --- /dev/null +++ b/lib/core/model/PatientRegistration/CheckActivationCodeModel.dart @@ -0,0 +1,112 @@ +class CheckActivationCodeModel { + int patientMobileNumber; + String mobileNo; + int projectOutSA; + int loginType; + String zipCode; + bool isRegister; + String logInTokenID; + int searchType; + int patientID; + int nationalID; + int patientIdentificationID; + bool forRegisteration; + String activationCode; + double versionID; + int channel; + int languageID; + String iPAdress; + String generalid; + int patientOutSA; + Null sessionID; + bool isDentalAllowedBackend; + int deviceTypeID; + String dOB; + int isHijri; + String healthId; + + CheckActivationCodeModel( + {this.patientMobileNumber, + this.mobileNo, + this.projectOutSA, + this.loginType, + this.zipCode, + this.isRegister, + this.logInTokenID, + this.searchType, + this.patientID, + this.nationalID, + this.patientIdentificationID, + this.forRegisteration, + this.activationCode, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.dOB, + this.isHijri, + this.healthId}); + + CheckActivationCodeModel.fromJson(Map json) { + patientMobileNumber = json['PatientMobileNumber']; + mobileNo = json['MobileNo']; + projectOutSA = json['ProjectOutSA']; + loginType = json['LoginType']; + zipCode = json['ZipCode']; + isRegister = json['isRegister']; + logInTokenID = json['LogInTokenID']; + searchType = json['SearchType']; + patientID = json['PatientID']; + nationalID = json['NationalID']; + patientIdentificationID = json['PatientIdentificationID']; + forRegisteration = json['ForRegisteration']; + activationCode = json['activationCode']; + versionID = json['VersionID']; + channel = json['Channel']; + languageID = json['LanguageID']; + iPAdress = json['IPAdress']; + generalid = json['generalid']; + patientOutSA = json['PatientOutSA']; + sessionID = json['SessionID']; + isDentalAllowedBackend = json['isDentalAllowedBackend']; + deviceTypeID = json['DeviceTypeID']; + dOB = json['DOB']; + isHijri = json['IsHijri']; + healthId = json['HealthId']; + } + + Map toJson() { + final Map data = new Map(); + data['PatientMobileNumber'] = this.patientMobileNumber; + data['MobileNo'] = this.mobileNo; + data['ProjectOutSA'] = this.projectOutSA; + data['LoginType'] = this.loginType; + data['ZipCode'] = this.zipCode; + data['isRegister'] = this.isRegister; + data['LogInTokenID'] = this.logInTokenID; + data['SearchType'] = this.searchType; + data['PatientID'] = this.patientID; + data['NationalID'] = this.nationalID; + data['PatientIdentificationID'] = this.patientIdentificationID; + data['ForRegisteration'] = this.forRegisteration; + data['activationCode'] = this.activationCode; + data['VersionID'] = this.versionID; + data['Channel'] = this.channel; + data['LanguageID'] = this.languageID; + data['IPAdress'] = this.iPAdress; + data['generalid'] = this.generalid; + data['PatientOutSA'] = this.patientOutSA; + data['SessionID'] = this.sessionID; + data['isDentalAllowedBackend'] = this.isDentalAllowedBackend; + data['DeviceTypeID'] = this.deviceTypeID; + data['DOB'] = this.dOB; + data['IsHijri'] = this.isHijri; + data['HealthId'] = this.healthId; + return data; + } +} diff --git a/lib/core/model/PatientRegistration/CheckPatientForRegistrationModel.dart b/lib/core/model/PatientRegistration/CheckPatientForRegistrationModel.dart new file mode 100644 index 00000000..3465cf8d --- /dev/null +++ b/lib/core/model/PatientRegistration/CheckPatientForRegistrationModel.dart @@ -0,0 +1,80 @@ +class CheckPatientForRegistrationModel { + int patientIdentificationID; + int patientMobileNumber; + String zipCode; + double versionID; + int channel; + int languageID; + String iPAdress; + String generalid; + int patientOutSA; + Null sessionID; + bool isDentalAllowedBackend; + int deviceTypeID; + String tokenID; + int patientID; + bool isRegister; + String dOB; + int isHijri; + + CheckPatientForRegistrationModel( + {this.patientIdentificationID, + this.patientMobileNumber, + this.zipCode, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.tokenID, + this.patientID, + this.isRegister, + this.dOB, + this.isHijri}); + + CheckPatientForRegistrationModel.fromJson(Map json) { + patientIdentificationID = json['PatientIdentificationID']; + patientMobileNumber = json['PatientMobileNumber']; + zipCode = json['ZipCode']; + versionID = json['VersionID']; + channel = json['Channel']; + languageID = json['LanguageID']; + iPAdress = json['IPAdress']; + generalid = json['generalid']; + patientOutSA = json['PatientOutSA']; + sessionID = json['SessionID']; + isDentalAllowedBackend = json['isDentalAllowedBackend']; + deviceTypeID = json['DeviceTypeID']; + tokenID = json['TokenID']; + patientID = json['PatientID']; + isRegister = json['isRegister']; + dOB = json['DOB']; + isHijri = json['IsHijri']; + } + + Map toJson() { + final Map data = new Map(); + data['PatientIdentificationID'] = this.patientIdentificationID; + data['PatientMobileNumber'] = this.patientMobileNumber; + data['ZipCode'] = this.zipCode; + data['VersionID'] = this.versionID; + data['Channel'] = this.channel; + data['LanguageID'] = this.languageID; + data['IPAdress'] = this.iPAdress; + data['generalid'] = this.generalid; + data['PatientOutSA'] = this.patientOutSA; + data['SessionID'] = this.sessionID; + data['isDentalAllowedBackend'] = this.isDentalAllowedBackend; + data['DeviceTypeID'] = this.deviceTypeID; + data['TokenID'] = this.tokenID; + data['PatientID'] = this.patientID; + data['isRegister'] = this.isRegister; + data['DOB'] = this.dOB; + data['IsHijri'] = this.isHijri; + return data; + } +} diff --git a/lib/core/model/PatientRegistration/GetPatientInfoRequestModel.dart b/lib/core/model/PatientRegistration/GetPatientInfoRequestModel.dart new file mode 100644 index 00000000..f05131ef --- /dev/null +++ b/lib/core/model/PatientRegistration/GetPatientInfoRequestModel.dart @@ -0,0 +1,60 @@ +class GetPatientInfoRequestModel { + String patientIdentificationID; + String dOB; + int isHijri; + double versionID; + int channel; + int languageID; + String iPAdress; + String generalid; + int patientOutSA; + Null sessionID; + bool isDentalAllowedBackend; + int deviceTypeID; + + GetPatientInfoRequestModel( + {this.patientIdentificationID, + this.dOB, + this.isHijri, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID}); + + GetPatientInfoRequestModel.fromJson(Map json) { + patientIdentificationID = json['PatientIdentificationID']; + dOB = json['DOB']; + isHijri = json['IsHijri']; + versionID = json['VersionID']; + channel = json['Channel']; + languageID = json['LanguageID']; + iPAdress = json['IPAdress']; + generalid = json['generalid']; + patientOutSA = json['PatientOutSA']; + sessionID = json['SessionID']; + isDentalAllowedBackend = json['isDentalAllowedBackend']; + deviceTypeID = json['DeviceTypeID']; + } + + Map toJson() { + final Map data = new Map(); + data['PatientIdentificationID'] = this.patientIdentificationID; + data['DOB'] = this.dOB; + data['IsHijri'] = this.isHijri; + data['VersionID'] = this.versionID; + data['Channel'] = this.channel; + data['LanguageID'] = this.languageID; + data['IPAdress'] = this.iPAdress; + data['generalid'] = this.generalid; + data['PatientOutSA'] = this.patientOutSA; + data['SessionID'] = this.sessionID; + data['isDentalAllowedBackend'] = this.isDentalAllowedBackend; + data['DeviceTypeID'] = this.deviceTypeID; + return data; + } +} diff --git a/lib/core/model/PatientRegistration/GetPatientInfoResponseModel.dart b/lib/core/model/PatientRegistration/GetPatientInfoResponseModel.dart new file mode 100644 index 00000000..158bd1e2 --- /dev/null +++ b/lib/core/model/PatientRegistration/GetPatientInfoResponseModel.dart @@ -0,0 +1,374 @@ +class GetPatientInfoResponseModel { + dynamic date; + int languageID; + int serviceName; + dynamic time; + dynamic androidLink; + dynamic authenticationTokenID; + dynamic data; + bool dataw; + int dietType; + dynamic errorCode; + dynamic errorEndUserMessage; + dynamic errorEndUserMessageN; + dynamic errorMessage; + int errorType; + int foodCategory; + dynamic iOSLink; + bool isAuthenticated; + int mealOrderStatus; + int mealType; + int messageStatus; + int numberOfResultRecords; + dynamic patientBlodType; + dynamic successMsg; + dynamic successMsgN; + dynamic vidaUpdatedResponse; + dynamic accessTokenObject; + int age; + dynamic clientIdentifierId; + int createdBy; + String dateOfBirth; + String firstNameAr; + String firstNameEn; + String gender; + dynamic genderAr; + dynamic genderEn; + String healthId; + String idNumber; + String idType; + bool isHijri; + int isInstertedOrUpdated; + int isNull; + int isPatientExistNHIC; + bool isRecordLockedByCurrentUser; + String lastNameAr; + String lastNameEn; + dynamic listActiveAccessToken; + String maritalStatus; + String maritalStatusCode; + String nationalDateOfBirth; + String nationality; + String nationalityCode; + String occupation; + dynamic pCDTransactionDataResultList; + dynamic pCDGetVidaPatientForManualVerificationList; + dynamic pCDNHICHMGPatientDetailsMatchCalulationList; + int pCDReturnValue; + String patientStatus; + String placeofBirth; + dynamic practitionerStatusCode; + dynamic practitionerStatusDescAr; + dynamic practitionerStatusDescEn; + int rowCount; + String secondNameAr; + String secondNameEn; + String thirdNameAr; + String thirdNameEn; + dynamic yakeenVidaPatientDataStatisticsByPatientIdList; + dynamic yakeenVidaPatientDataStatisticsList; + dynamic yakeenVidaPatientDataStatisticsPrefferedList; + dynamic accessToken; + int categoryCode; + dynamic categoryNameAr; + dynamic categoryNameEn; + int constraintCode; + dynamic constraintNameAr; + dynamic constraintNameEn; + dynamic content; + dynamic errorList; + dynamic licenseExpiryDate; + dynamic licenseIssuedDate; + dynamic licenseStatusCode; + dynamic licenseStatusDescAr; + dynamic licenseStatusDescEn; + dynamic organizations; + dynamic registrationNumber; + int specialtyCode; + dynamic specialtyNameAr; + dynamic specialtyNameEn; + + GetPatientInfoResponseModel( + {this.date, + this.languageID, + this.serviceName, + this.time, + this.androidLink, + this.authenticationTokenID, + this.data, + this.dataw, + this.dietType, + this.errorCode, + this.errorEndUserMessage, + this.errorEndUserMessageN, + this.errorMessage, + this.errorType, + this.foodCategory, + this.iOSLink, + this.isAuthenticated, + this.mealOrderStatus, + this.mealType, + this.messageStatus, + this.numberOfResultRecords, + this.patientBlodType, + this.successMsg, + this.successMsgN, + this.vidaUpdatedResponse, + this.accessTokenObject, + this.age, + this.clientIdentifierId, + this.createdBy, + this.dateOfBirth, + this.firstNameAr, + this.firstNameEn, + this.gender, + this.genderAr, + this.genderEn, + this.healthId, + this.idNumber, + this.idType, + this.isHijri, + this.isInstertedOrUpdated, + this.isNull, + this.isPatientExistNHIC, + this.isRecordLockedByCurrentUser, + this.lastNameAr, + this.lastNameEn, + this.listActiveAccessToken, + this.maritalStatus, + this.maritalStatusCode, + this.nationalDateOfBirth, + this.nationality, + this.nationalityCode, + this.occupation, + this.pCDTransactionDataResultList, + this.pCDGetVidaPatientForManualVerificationList, + this.pCDNHICHMGPatientDetailsMatchCalulationList, + this.pCDReturnValue, + this.patientStatus, + this.placeofBirth, + this.practitionerStatusCode, + this.practitionerStatusDescAr, + this.practitionerStatusDescEn, + this.rowCount, + this.secondNameAr, + this.secondNameEn, + this.thirdNameAr, + this.thirdNameEn, + this.yakeenVidaPatientDataStatisticsByPatientIdList, + this.yakeenVidaPatientDataStatisticsList, + this.yakeenVidaPatientDataStatisticsPrefferedList, + this.accessToken, + this.categoryCode, + this.categoryNameAr, + this.categoryNameEn, + this.constraintCode, + this.constraintNameAr, + this.constraintNameEn, + this.content, + this.errorList, + this.licenseExpiryDate, + this.licenseIssuedDate, + this.licenseStatusCode, + this.licenseStatusDescAr, + this.licenseStatusDescEn, + this.organizations, + this.registrationNumber, + this.specialtyCode, + this.specialtyNameAr, + this.specialtyNameEn}); + + GetPatientInfoResponseModel.fromJson(Map json) { + date = json['Date']; + languageID = json['LanguageID']; + serviceName = json['ServiceName']; + time = json['Time']; + androidLink = json['AndroidLink']; + authenticationTokenID = json['AuthenticationTokenID']; + data = json['Data']; + dataw = json['Dataw']; + dietType = json['DietType']; + errorCode = json['ErrorCode']; + errorEndUserMessage = json['ErrorEndUserMessage']; + errorEndUserMessageN = json['ErrorEndUserMessageN']; + errorMessage = json['ErrorMessage']; + errorType = json['ErrorType']; + foodCategory = json['FoodCategory']; + iOSLink = json['IOSLink']; + isAuthenticated = json['IsAuthenticated']; + mealOrderStatus = json['MealOrderStatus']; + mealType = json['MealType']; + messageStatus = json['MessageStatus']; + numberOfResultRecords = json['NumberOfResultRecords']; + patientBlodType = json['PatientBlodType']; + successMsg = json['SuccessMsg']; + successMsgN = json['SuccessMsgN']; + vidaUpdatedResponse = json['VidaUpdatedResponse']; + accessTokenObject = json['AccessTokenObject']; + age = json['Age']; + clientIdentifierId = json['ClientIdentifierId']; + createdBy = json['CreatedBy']; + dateOfBirth = json['DateOfBirth']; + firstNameAr = json['FirstNameAr']; + firstNameEn = json['FirstNameEn']; + gender = json['Gender']; + genderAr = json['GenderAr']; + genderEn = json['GenderEn']; + healthId = json['HealthId']; + idNumber = json['IdNumber']; + idType = json['IdType']; + isHijri = json['IsHijri']; + isInstertedOrUpdated = json['IsInstertedOrUpdated']; + isNull = json['IsNull']; + isPatientExistNHIC = json['IsPatientExistNHIC']; + isRecordLockedByCurrentUser = json['IsRecordLockedByCurrentUser']; + lastNameAr = json['LastNameAr']; + lastNameEn = json['LastNameEn']; + listActiveAccessToken = json['List_ActiveAccessToken']; + maritalStatus = json['MaritalStatus']; + maritalStatusCode = json['MaritalStatusCode']; + nationalDateOfBirth = json['NationalDateOfBirth']; + nationality = json['Nationality']; + nationalityCode = json['NationalityCode']; + occupation = json['Occupation']; + pCDTransactionDataResultList = json['PCDTransactionDataResultList']; + pCDGetVidaPatientForManualVerificationList = + json['PCD_GetVidaPatientForManualVerificationList']; + pCDNHICHMGPatientDetailsMatchCalulationList = + json['PCD_NHIC_HMG_PatientDetailsMatchCalulationList']; + pCDReturnValue = json['PCD_ReturnValue']; + patientStatus = json['PatientStatus']; + placeofBirth = json['PlaceofBirth']; + practitionerStatusCode = json['PractitionerStatusCode']; + practitionerStatusDescAr = json['PractitionerStatusDescAr']; + practitionerStatusDescEn = json['PractitionerStatusDescEn']; + rowCount = json['RowCount']; + secondNameAr = json['SecondNameAr']; + secondNameEn = json['SecondNameEn']; + thirdNameAr = json['ThirdNameAr']; + thirdNameEn = json['ThirdNameEn']; + yakeenVidaPatientDataStatisticsByPatientIdList = + json['YakeenVidaPatientDataStatisticsByPatientIdList']; + yakeenVidaPatientDataStatisticsList = + json['YakeenVidaPatientDataStatisticsList']; + yakeenVidaPatientDataStatisticsPrefferedList = + json['YakeenVidaPatientDataStatisticsPrefferedList']; + accessToken = json['accessToken']; + categoryCode = json['categoryCode']; + categoryNameAr = json['categoryNameAr']; + categoryNameEn = json['categoryNameEn']; + constraintCode = json['constraintCode']; + constraintNameAr = json['constraintNameAr']; + constraintNameEn = json['constraintNameEn']; + content = json['content']; + errorList = json['errorList']; + licenseExpiryDate = json['licenseExpiryDate']; + licenseIssuedDate = json['licenseIssuedDate']; + licenseStatusCode = json['licenseStatusCode']; + licenseStatusDescAr = json['licenseStatusDescAr']; + licenseStatusDescEn = json['licenseStatusDescEn']; + organizations = json['organizations']; + registrationNumber = json['registrationNumber']; + specialtyCode = json['specialtyCode']; + specialtyNameAr = json['specialtyNameAr']; + specialtyNameEn = json['specialtyNameEn']; + } + + Map toJson() { + final Map data = new Map(); + data['Date'] = this.date; + data['LanguageID'] = this.languageID; + data['ServiceName'] = this.serviceName; + data['Time'] = this.time; + data['AndroidLink'] = this.androidLink; + data['AuthenticationTokenID'] = this.authenticationTokenID; + data['Data'] = this.data; + data['Dataw'] = this.dataw; + data['DietType'] = this.dietType; + data['ErrorCode'] = this.errorCode; + data['ErrorEndUserMessage'] = this.errorEndUserMessage; + data['ErrorEndUserMessageN'] = this.errorEndUserMessageN; + data['ErrorMessage'] = this.errorMessage; + data['ErrorType'] = this.errorType; + data['FoodCategory'] = this.foodCategory; + data['IOSLink'] = this.iOSLink; + data['IsAuthenticated'] = this.isAuthenticated; + data['MealOrderStatus'] = this.mealOrderStatus; + data['MealType'] = this.mealType; + data['MessageStatus'] = this.messageStatus; + data['NumberOfResultRecords'] = this.numberOfResultRecords; + data['PatientBlodType'] = this.patientBlodType; + data['SuccessMsg'] = this.successMsg; + data['SuccessMsgN'] = this.successMsgN; + data['VidaUpdatedResponse'] = this.vidaUpdatedResponse; + data['AccessTokenObject'] = this.accessTokenObject; + data['Age'] = this.age; + data['ClientIdentifierId'] = this.clientIdentifierId; + data['CreatedBy'] = this.createdBy; + data['DateOfBirth'] = this.dateOfBirth; + data['FirstNameAr'] = this.firstNameAr; + data['FirstNameEn'] = this.firstNameEn; + data['Gender'] = this.gender; + data['GenderAr'] = this.genderAr; + data['GenderEn'] = this.genderEn; + data['HealthId'] = this.healthId; + data['IdNumber'] = this.idNumber; + data['IdType'] = this.idType; + data['IsHijri'] = this.isHijri; + data['IsInstertedOrUpdated'] = this.isInstertedOrUpdated; + data['IsNull'] = this.isNull; + data['IsPatientExistNHIC'] = this.isPatientExistNHIC; + data['IsRecordLockedByCurrentUser'] = this.isRecordLockedByCurrentUser; + data['LastNameAr'] = this.lastNameAr; + data['LastNameEn'] = this.lastNameEn; + data['List_ActiveAccessToken'] = this.listActiveAccessToken; + data['MaritalStatus'] = this.maritalStatus; + data['MaritalStatusCode'] = this.maritalStatusCode; + data['NationalDateOfBirth'] = this.nationalDateOfBirth; + data['Nationality'] = this.nationality; + data['NationalityCode'] = this.nationalityCode; + data['Occupation'] = this.occupation; + data['PCDTransactionDataResultList'] = this.pCDTransactionDataResultList; + data['PCD_GetVidaPatientForManualVerificationList'] = + this.pCDGetVidaPatientForManualVerificationList; + data['PCD_NHIC_HMG_PatientDetailsMatchCalulationList'] = + this.pCDNHICHMGPatientDetailsMatchCalulationList; + data['PCD_ReturnValue'] = this.pCDReturnValue; + data['PatientStatus'] = this.patientStatus; + data['PlaceofBirth'] = this.placeofBirth; + data['PractitionerStatusCode'] = this.practitionerStatusCode; + data['PractitionerStatusDescAr'] = this.practitionerStatusDescAr; + data['PractitionerStatusDescEn'] = this.practitionerStatusDescEn; + data['RowCount'] = this.rowCount; + data['SecondNameAr'] = this.secondNameAr; + data['SecondNameEn'] = this.secondNameEn; + data['ThirdNameAr'] = this.thirdNameAr; + data['ThirdNameEn'] = this.thirdNameEn; + data['YakeenVidaPatientDataStatisticsByPatientIdList'] = + this.yakeenVidaPatientDataStatisticsByPatientIdList; + data['YakeenVidaPatientDataStatisticsList'] = + this.yakeenVidaPatientDataStatisticsList; + data['YakeenVidaPatientDataStatisticsPrefferedList'] = + this.yakeenVidaPatientDataStatisticsPrefferedList; + data['accessToken'] = this.accessToken; + data['categoryCode'] = this.categoryCode; + data['categoryNameAr'] = this.categoryNameAr; + data['categoryNameEn'] = this.categoryNameEn; + data['constraintCode'] = this.constraintCode; + data['constraintNameAr'] = this.constraintNameAr; + data['constraintNameEn'] = this.constraintNameEn; + data['content'] = this.content; + data['errorList'] = this.errorList; + data['licenseExpiryDate'] = this.licenseExpiryDate; + data['licenseIssuedDate'] = this.licenseIssuedDate; + data['licenseStatusCode'] = this.licenseStatusCode; + data['licenseStatusDescAr'] = this.licenseStatusDescAr; + data['licenseStatusDescEn'] = this.licenseStatusDescEn; + data['organizations'] = this.organizations; + data['registrationNumber'] = this.registrationNumber; + data['specialtyCode'] = this.specialtyCode; + data['specialtyNameAr'] = this.specialtyNameAr; + data['specialtyNameEn'] = this.specialtyNameEn; + return data; + } +} diff --git a/lib/core/model/PatientRegistration/PatientRegistrationModel.dart b/lib/core/model/PatientRegistration/PatientRegistrationModel.dart new file mode 100644 index 00000000..83ff53d7 --- /dev/null +++ b/lib/core/model/PatientRegistration/PatientRegistrationModel.dart @@ -0,0 +1,185 @@ +class PatientRegistrationModel { + Patientobject patientobject; + String patientIdentificationID; + String patientMobileNumber; + String logInTokenID; + double versionID; + int channel; + int languageID; + String iPAdress; + String generalid; + int patientOutSA; + Null sessionID; + bool isDentalAllowedBackend; + int deviceTypeID; + String tokenID; + String dOB; + int isHijri; + String healthId; + String zipCode; + + PatientRegistrationModel( + {this.patientobject, + this.patientIdentificationID, + this.patientMobileNumber, + this.logInTokenID, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.tokenID, + this.dOB, + this.isHijri, + this.healthId, + this.zipCode}); + + PatientRegistrationModel.fromJson(Map json) { + patientobject = json['Patientobject'] != null + ? new Patientobject.fromJson(json['Patientobject']) + : null; + patientIdentificationID = json['PatientIdentificationID']; + patientMobileNumber = json['PatientMobileNumber']; + logInTokenID = json['LogInTokenID']; + versionID = json['VersionID']; + channel = json['Channel']; + languageID = json['LanguageID']; + iPAdress = json['IPAdress']; + generalid = json['generalid']; + patientOutSA = json['PatientOutSA']; + sessionID = json['SessionID']; + isDentalAllowedBackend = json['isDentalAllowedBackend']; + deviceTypeID = json['DeviceTypeID']; + tokenID = json['TokenID']; + dOB = json['DOB']; + isHijri = json['IsHijri']; + healthId = json['HealthId']; + zipCode = json['ZipCode']; + } + + Map toJson() { + final Map data = new Map(); + if (this.patientobject != null) { + data['Patientobject'] = this.patientobject.toJson(); + } + data['PatientIdentificationID'] = this.patientIdentificationID; + data['PatientMobileNumber'] = this.patientMobileNumber; + data['LogInTokenID'] = this.logInTokenID; + data['VersionID'] = this.versionID; + data['Channel'] = this.channel; + data['LanguageID'] = this.languageID; + data['IPAdress'] = this.iPAdress; + data['generalid'] = this.generalid; + data['PatientOutSA'] = this.patientOutSA; + data['SessionID'] = this.sessionID; + data['isDentalAllowedBackend'] = this.isDentalAllowedBackend; + data['DeviceTypeID'] = this.deviceTypeID; + data['TokenID'] = this.tokenID; + data['DOB'] = this.dOB; + data['IsHijri'] = this.isHijri; + data['HealthId'] = this.healthId; + data['ZipCode'] = this.zipCode; + return data; + } +} + +class Patientobject { + bool tempValue; + int patientIdentificationType; + String patientIdentificationNo; + int mobileNumber; + int patientOutSA; + String firstNameN; + String middleNameN; + String lastNameN; + String firstName; + String middleName; + String lastName; + String strDateofBirth; + String dateofBirth; + int gender; + String nationalityID; + String dateofBirthN; + String emailAddress; + String sourceType; + String preferredLanguage; + String marital; + String eHealthIDField; + + Patientobject( + {this.tempValue, + this.patientIdentificationType, + this.patientIdentificationNo, + this.mobileNumber, + this.patientOutSA, + this.firstNameN, + this.middleNameN, + this.lastNameN, + this.firstName, + this.middleName, + this.lastName, + this.strDateofBirth, + this.dateofBirth, + this.gender, + this.nationalityID, + this.dateofBirthN, + this.emailAddress, + this.sourceType, + this.preferredLanguage, + this.marital, + this.eHealthIDField}); + + Patientobject.fromJson(Map json) { + tempValue = json['TempValue']; + patientIdentificationType = json['PatientIdentificationType']; + patientIdentificationNo = json['PatientIdentificationNo']; + mobileNumber = json['MobileNumber']; + patientOutSA = json['PatientOutSA']; + firstNameN = json['FirstNameN']; + middleNameN = json['MiddleNameN']; + lastNameN = json['LastNameN']; + firstName = json['FirstName']; + middleName = json['MiddleName']; + lastName = json['LastName']; + strDateofBirth = json['StrDateofBirth']; + dateofBirth = json['DateofBirth']; + gender = json['Gender']; + nationalityID = json['NationalityID']; + dateofBirthN = json['DateofBirthN']; + emailAddress = json['EmailAddress']; + sourceType = json['SourceType']; + preferredLanguage = json['PreferredLanguage']; + marital = json['Marital']; + eHealthIDField = json['eHealthIDField']; + } + + Map toJson() { + final Map data = new Map(); + data['TempValue'] = this.tempValue; + data['PatientIdentificationType'] = this.patientIdentificationType; + data['PatientIdentificationNo'] = this.patientIdentificationNo; + data['MobileNumber'] = this.mobileNumber; + data['PatientOutSA'] = this.patientOutSA; + data['FirstNameN'] = this.firstNameN; + data['MiddleNameN'] = this.middleNameN; + data['LastNameN'] = this.lastNameN; + data['FirstName'] = this.firstName; + data['MiddleName'] = this.middleName; + data['LastName'] = this.lastName; + data['StrDateofBirth'] = this.strDateofBirth; + data['DateofBirth'] = this.dateofBirth; + data['Gender'] = this.gender; + data['NationalityID'] = this.nationalityID; + data['DateofBirthN'] = this.dateofBirthN; + data['EmailAddress'] = this.emailAddress; + data['SourceType'] = this.sourceType; + data['PreferredLanguage'] = this.preferredLanguage; + data['Marital'] = this.marital; + data['eHealthIDField'] = this.eHealthIDField; + return data; + } +} diff --git a/lib/core/model/PatientRegistration/SendActivationCodebyOTPNotificationTypeForRegistrationModel.dart b/lib/core/model/PatientRegistration/SendActivationCodebyOTPNotificationTypeForRegistrationModel.dart new file mode 100644 index 00000000..8244a95f --- /dev/null +++ b/lib/core/model/PatientRegistration/SendActivationCodebyOTPNotificationTypeForRegistrationModel.dart @@ -0,0 +1,109 @@ +class SendActivationCodeByOTPNotificationTypeForRegistrationModel { + int patientMobileNumber; + String mobileNo; + int projectOutSA; + int loginType; + String zipCode; + bool isRegister; + String logInTokenID; + int searchType; + int patientID; + int nationalID; + int patientIdentificationID; + int oTPSendType; + int languageID; + double versionID; + int channel; + String iPAdress; + String generalid; + int patientOutSA; + Null sessionID; + bool isDentalAllowedBackend; + int deviceTypeID; + String dOB; + int isHijri; + String healthId; + + SendActivationCodeByOTPNotificationTypeForRegistrationModel( + {this.patientMobileNumber, + this.mobileNo, + this.projectOutSA, + this.loginType, + this.zipCode, + this.isRegister, + this.logInTokenID, + this.searchType, + this.patientID, + this.nationalID, + this.patientIdentificationID, + this.oTPSendType, + this.languageID, + this.versionID, + this.channel, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.dOB, + this.isHijri, + this.healthId}); + + SendActivationCodeByOTPNotificationTypeForRegistrationModel.fromJson( + Map json) { + patientMobileNumber = json['PatientMobileNumber']; + mobileNo = json['MobileNo']; + projectOutSA = json['ProjectOutSA']; + loginType = json['LoginType']; + zipCode = json['ZipCode']; + isRegister = json['isRegister']; + logInTokenID = json['LogInTokenID']; + searchType = json['SearchType']; + patientID = json['PatientID']; + nationalID = json['NationalID']; + patientIdentificationID = json['PatientIdentificationID']; + oTPSendType = json['OTP_SendType']; + languageID = json['LanguageID']; + versionID = json['VersionID']; + channel = json['Channel']; + iPAdress = json['IPAdress']; + generalid = json['generalid']; + patientOutSA = json['PatientOutSA']; + sessionID = json['SessionID']; + isDentalAllowedBackend = json['isDentalAllowedBackend']; + deviceTypeID = json['DeviceTypeID']; + dOB = json['DOB']; + isHijri = json['IsHijri']; + healthId = json['HealthId']; + } + + Map toJson() { + final Map data = new Map(); + data['PatientMobileNumber'] = this.patientMobileNumber; + data['MobileNo'] = this.mobileNo; + data['ProjectOutSA'] = this.projectOutSA; + data['LoginType'] = this.loginType; + data['ZipCode'] = this.zipCode; + data['isRegister'] = this.isRegister; + data['LogInTokenID'] = this.logInTokenID; + data['SearchType'] = this.searchType; + data['PatientID'] = this.patientID; + data['NationalID'] = this.nationalID; + data['PatientIdentificationID'] = this.patientIdentificationID; + data['OTP_SendType'] = this.oTPSendType; + data['LanguageID'] = this.languageID; + data['VersionID'] = this.versionID; + data['Channel'] = this.channel; + data['IPAdress'] = this.iPAdress; + data['generalid'] = this.generalid; + data['PatientOutSA'] = this.patientOutSA; + data['SessionID'] = this.sessionID; + data['isDentalAllowedBackend'] = this.isDentalAllowedBackend; + data['DeviceTypeID'] = this.deviceTypeID; + data['DOB'] = this.dOB; + data['IsHijri'] = this.isHijri; + data['HealthId'] = this.healthId; + return data; + } +} diff --git a/lib/core/model/diabetic_chart/DiabeticType.dart b/lib/core/model/diabetic_chart/DiabeticType.dart new file mode 100644 index 00000000..26641e61 --- /dev/null +++ b/lib/core/model/diabetic_chart/DiabeticType.dart @@ -0,0 +1,21 @@ +class DiabeticType { + int value; + String nameEn; + String nameAr; + + DiabeticType({this.value, this.nameEn, this.nameAr}); + + DiabeticType.fromJson(Map json) { + value = json['value']; + nameEn = json['nameEn']; + nameAr = json['nameAr']; + } + + Map toJson() { + final Map data = new Map(); + data['value'] = this.value; + data['nameEn'] = this.nameEn; + data['nameAr'] = this.nameAr; + return data; + } +} diff --git a/lib/core/model/diabetic_chart/GetDiabeticChartValuesRequestModel.dart b/lib/core/model/diabetic_chart/GetDiabeticChartValuesRequestModel.dart new file mode 100644 index 00000000..7fad3106 --- /dev/null +++ b/lib/core/model/diabetic_chart/GetDiabeticChartValuesRequestModel.dart @@ -0,0 +1,44 @@ +class GetDiabeticChartValuesRequestModel { + int deviceTypeID; + int patientID; + int resultType; + int admissionNo; + String setupID; + bool patientOutSA; + int patientType; + int patientTypeID; + + GetDiabeticChartValuesRequestModel( + {this.deviceTypeID, + this.patientID, + this.resultType, + this.admissionNo, + this.setupID, + this.patientOutSA, + this.patientType, + this.patientTypeID}); + + GetDiabeticChartValuesRequestModel.fromJson(Map json) { + deviceTypeID = json['DeviceTypeID']; + patientID = json['PatientID']; + resultType = json['ResultType']; + admissionNo = json['AdmissionNo']; + setupID = json['SetupID']; + patientOutSA = json['PatientOutSA']; + patientType = json['PatientType']; + patientTypeID = json['PatientTypeID']; + } + + Map toJson() { + final Map data = new Map(); + data['DeviceTypeID'] = this.deviceTypeID; + data['PatientID'] = this.patientID; + data['ResultType'] = this.resultType; + data['AdmissionNo'] = this.admissionNo; + data['SetupID'] = this.setupID; + data['PatientOutSA'] = this.patientOutSA; + data['PatientType'] = this.patientType; + data['PatientTypeID'] = this.patientTypeID; + return data; + } +} diff --git a/lib/core/model/diabetic_chart/GetDiabeticChartValuesResponseModel.dart b/lib/core/model/diabetic_chart/GetDiabeticChartValuesResponseModel.dart new file mode 100644 index 00000000..fa2c1ca2 --- /dev/null +++ b/lib/core/model/diabetic_chart/GetDiabeticChartValuesResponseModel.dart @@ -0,0 +1,36 @@ +class GetDiabeticChartValuesResponseModel { + String resultType; + int admissionNo; + String dateChart; + int resultValue; + int createdBy; + String createdOn; + + GetDiabeticChartValuesResponseModel( + {this.resultType, + this.admissionNo, + this.dateChart, + this.resultValue, + this.createdBy, + this.createdOn}); + + GetDiabeticChartValuesResponseModel.fromJson(Map json) { + resultType = json['ResultType']; + admissionNo = json['AdmissionNo']; + dateChart = json['DateChart']; + resultValue = json['ResultValue']; + createdBy = json['CreatedBy']; + createdOn = json['CreatedOn']; + } + + Map toJson() { + final Map data = new Map(); + data['ResultType'] = this.resultType; + data['AdmissionNo'] = this.admissionNo; + data['DateChart'] = this.dateChart; + data['ResultValue'] = this.resultValue; + data['CreatedBy'] = this.createdBy; + data['CreatedOn'] = this.createdOn; + return data; + } +} diff --git a/lib/core/model/diagnosis/GetDiagnosisForInPatientRequestModel.dart b/lib/core/model/diagnosis/GetDiagnosisForInPatientRequestModel.dart new file mode 100644 index 00000000..310cfb50 --- /dev/null +++ b/lib/core/model/diagnosis/GetDiagnosisForInPatientRequestModel.dart @@ -0,0 +1,32 @@ +class GetDiagnosisForInPatientRequestModel { + int patientID; + int admissionNo; + String setupID; + int patientType; + int patientTypeID; + + GetDiagnosisForInPatientRequestModel( + {this.patientID, + this.admissionNo, + this.setupID, + this.patientType, + this.patientTypeID}); + + GetDiagnosisForInPatientRequestModel.fromJson(Map json) { + patientID = json['PatientID']; + admissionNo = json['AdmissionNo']; + setupID = json['SetupID']; + patientType = json['PatientType']; + patientTypeID = json['PatientTypeID']; + } + + Map toJson() { + final Map data = new Map(); + data['PatientID'] = this.patientID; + data['AdmissionNo'] = this.admissionNo; + data['SetupID'] = this.setupID; + data['PatientType'] = this.patientType; + data['PatientTypeID'] = this.patientTypeID; + return data; + } +} diff --git a/lib/core/model/diagnosis/GetDiagnosisForInPatientResponseModel.dart b/lib/core/model/diagnosis/GetDiagnosisForInPatientResponseModel.dart new file mode 100644 index 00000000..1ec48964 --- /dev/null +++ b/lib/core/model/diagnosis/GetDiagnosisForInPatientResponseModel.dart @@ -0,0 +1,52 @@ +class GetDiagnosisForInPatientResponseModel { + String iCDCode10ID; + int diagnosisTypeID; + int conditionID; + bool complexDiagnosis; + String asciiDesc; + int createdBy; + String createdOn; + int editedBy; + String editedOn; + String createdByName; + String editedByName; + + GetDiagnosisForInPatientResponseModel( + {this.iCDCode10ID, + this.diagnosisTypeID, + this.conditionID, + this.complexDiagnosis, + this.asciiDesc, + this.createdBy, + this.createdOn, + this.editedBy, + this.editedOn, this.createdByName}); + + GetDiagnosisForInPatientResponseModel.fromJson(Map json) { + iCDCode10ID = json['ICDCode10ID']; + diagnosisTypeID = json['DiagnosisTypeID']; + conditionID = json['ConditionID']; + complexDiagnosis = json['ComplexDiagnosis']; + asciiDesc = json['Ascii_Desc']; + createdBy = json['CreatedBy']; + createdOn = json['CreatedOn']; + editedBy = json['EditedBy']; + editedOn = json['EditedOn']; + createdByName = json['CreatedByName']; + editedByName = json['EditedByName']; + } + + Map toJson() { + final Map data = new Map(); + data['ICDCode10ID'] = this.iCDCode10ID; + data['DiagnosisTypeID'] = this.diagnosisTypeID; + data['ConditionID'] = this.conditionID; + data['ComplexDiagnosis'] = this.complexDiagnosis; + data['Ascii_Desc'] = this.asciiDesc; + data['CreatedBy'] = this.createdBy; + data['CreatedOn'] = this.createdOn; + data['EditedBy'] = this.editedBy; + data['EditedOn'] = this.editedOn; + return data; + } +} diff --git a/lib/core/model/labs/all_special_lab_result_model.dart b/lib/core/model/labs/all_special_lab_result_model.dart index ffea88de..ffdc5ee5 100644 --- a/lib/core/model/labs/all_special_lab_result_model.dart +++ b/lib/core/model/labs/all_special_lab_result_model.dart @@ -1,5 +1,5 @@ class AllSpecialLabResultModel { - int actualDoctorRate; + dynamic actualDoctorRate; dynamic admissionDate; dynamic admissionNumber; dynamic appointmentDate; diff --git a/lib/core/model/note/GetNursingProgressNoteRequestModel.dart b/lib/core/model/note/GetNursingProgressNoteRequestModel.dart new file mode 100644 index 00000000..4335053c --- /dev/null +++ b/lib/core/model/note/GetNursingProgressNoteRequestModel.dart @@ -0,0 +1,30 @@ +import 'package:doctor_app_flutter/config/config.dart'; + +class GetNursingProgressNoteRequestModel { + int patientID; + int admissionNo; + int patientTypeID; + int patientType; + String setupID; + + GetNursingProgressNoteRequestModel( + {this.patientID, this.admissionNo, this.patientTypeID = 1, this.patientType = 1, this.setupID }); + + GetNursingProgressNoteRequestModel.fromJson(Map json) { + patientID = json['PatientID']; + admissionNo = json['AdmissionNo']; + patientTypeID = json['PatientTypeID']; + patientType = json['PatientType']; + setupID = json['SetupID']; + } + + Map toJson() { + final Map data = new Map(); + data['PatientID'] = this.patientID; + data['AdmissionNo'] = this.admissionNo; + data['PatientTypeID'] = this.patientTypeID; + data['PatientType'] = this.patientType; + data['SetupID'] = this.setupID; + return data; + } +} diff --git a/lib/core/model/note/GetNursingProgressNoteResposeModel.dart b/lib/core/model/note/GetNursingProgressNoteResposeModel.dart new file mode 100644 index 00000000..fb7fbcec --- /dev/null +++ b/lib/core/model/note/GetNursingProgressNoteResposeModel.dart @@ -0,0 +1,44 @@ +class GetNursingProgressNoteResposeModel { + String notes; + dynamic conditionType; + int createdBy; + String createdOn; + dynamic editedBy; + dynamic editedOn; + + String createdByName; + + String editedByName; + + GetNursingProgressNoteResposeModel( + {this.notes, + this.conditionType, + this.createdBy, + this.createdOn, + this.editedBy, + this.editedOn, + this.editedByName, + this.createdByName}); + + GetNursingProgressNoteResposeModel.fromJson(Map json) { + notes = json['Notes']; + conditionType = json['ConditionType']; + createdBy = json['CreatedBy']; + createdOn = json['CreatedOn']; + editedBy = json['EditedBy']; + editedOn = json['EditedOn']; + createdByName = json['CreatedByName']; + editedByName = json['EditedByName']; + } + + Map toJson() { + final Map data = new Map(); + data['Notes'] = this.notes; + data['ConditionType'] = this.conditionType; + data['CreatedBy'] = this.createdBy; + data['CreatedOn'] = this.createdOn; + data['EditedBy'] = this.editedBy; + data['EditedOn'] = this.editedOn; + return data; + } +} diff --git a/lib/core/service/NavigationService.dart b/lib/core/service/NavigationService.dart index 26191ffc..5690c01e 100644 --- a/lib/core/service/NavigationService.dart +++ b/lib/core/service/NavigationService.dart @@ -15,4 +15,12 @@ class NavigationService { Future pushNamedAndRemoveUntil(String routeName) { return navigatorKey.currentState.pushNamedAndRemoveUntil(routeName,(asd)=>false); } + + Future pushAndRemoveUntil(Route newRoute) { + return navigatorKey.currentState.pushAndRemoveUntil(newRoute,(asd)=>false); + } + + pop() { + return navigatorKey.currentState.pop(); + } } \ No newline at end of file diff --git a/lib/core/service/PatientRegistrationService.dart b/lib/core/service/PatientRegistrationService.dart new file mode 100644 index 00000000..236bcd42 --- /dev/null +++ b/lib/core/service/PatientRegistrationService.dart @@ -0,0 +1,108 @@ +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/core/model/PatientRegistration/CheckActivationCodeModel.dart'; +import 'package:doctor_app_flutter/core/model/PatientRegistration/CheckPatientForRegistrationModel.dart'; +import 'package:doctor_app_flutter/core/model/PatientRegistration/GetPatientInfoRequestModel.dart'; +import 'package:doctor_app_flutter/core/model/PatientRegistration/GetPatientInfoResponseModel.dart'; +import 'package:doctor_app_flutter/core/model/PatientRegistration/PatientRegistrationModel.dart'; +import 'package:doctor_app_flutter/core/model/PatientRegistration/SendActivationCodebyOTPNotificationTypeForRegistrationModel.dart'; +import 'package:doctor_app_flutter/core/service/base/base_service.dart'; +import 'package:doctor_app_flutter/core/viewModel/PatientRegistrationViewModel.dart'; + +class PatientRegistrationService extends BaseService { + GetPatientInfoResponseModel getPatientInfoResponseModel; + String logInTokenID; + + checkPatientForRegistration( + CheckPatientForRegistrationModel registrationModel) async { + hasError = false; + await baseAppClient.post(CHECK_PATIENT_FOR_REGISTRATION, + onSuccess: (dynamic response, int statusCode) { + //TODO Elham* fix it + logInTokenID = "OjEi/qgRekGICZm5/a4jbQ=="; //response["LogInTokenID"]; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: registrationModel.toJson()); + } + + getPatientInfo(GetPatientInfoRequestModel getPatientInfoRequestMode) async { + hasError = false; + await baseAppClient.post(GET_PATIENT_INFO, + onSuccess: (dynamic response, int statusCode) { + getPatientInfoResponseModel = + GetPatientInfoResponseModel.fromJson(response); + print("ddd"); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: getPatientInfoRequestMode.toJson()); + } + + sendActivationCodeByOTPNotificationType( + {SendActivationCodeByOTPNotificationTypeForRegistrationModel + registrationModel, + int otpType, + PatientRegistrationViewModel model, + CheckPatientForRegistrationModel + checkPatientForRegistrationModel}) async { + registrationModel = + SendActivationCodeByOTPNotificationTypeForRegistrationModel( + oTPSendType: otpType, + patientIdentificationID: checkPatientForRegistrationModel + .patientIdentificationID, + patientMobileNumber: checkPatientForRegistrationModel + .patientMobileNumber, + zipCode: checkPatientForRegistrationModel.zipCode, + patientOutSA: 0, + healthId: model.getPatientInfoResponseModel.healthId, + dOB: checkPatientForRegistrationModel.dOB, + isRegister: checkPatientForRegistrationModel.isRegister, + isHijri: checkPatientForRegistrationModel.isHijri, + sessionID: null, + generalid: GENERAL_ID, + isDentalAllowedBackend: false, + projectOutSA: 0, + searchType: 1, + versionID: 7.1, + channel: 3, + nationalID: + model.checkPatientForRegistrationModel.patientIdentificationID, + patientID: 0, + mobileNo: model.checkPatientForRegistrationModel.patientMobileNumber + .toString(), + loginType: otpType, + logInTokenID: logInTokenID); + + hasError = false; + await baseAppClient.post(SEND_ACTIVATION_CODE_BY_OTP_NOT_TYPE_FOR_REGISTRATION, + onSuccess: (dynamic response, int statusCode) { + registrationModel = + SendActivationCodeByOTPNotificationTypeForRegistrationModel.fromJson( + response); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: registrationModel.toJson()); + } + + checkActivationCode(CheckActivationCodeModel registrationModel) async { + hasError = false; + await baseAppClient.post(CHECK_ACTIVATION_CODE_FOR_PATIENT, + onSuccess: (dynamic response, int statusCode) { + registrationModel = CheckActivationCodeModel.fromJson(response); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: registrationModel.toJson()); + } + + registrationPatient(PatientRegistrationModel registrationModel) async { + hasError = false; + await baseAppClient.post(PATIENT_REGISTRATION, + onSuccess: (dynamic response, int statusCode) {}, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: registrationModel.toJson()); + } +} diff --git a/lib/core/service/base/base_service.dart b/lib/core/service/base/base_service.dart index ade01d9b..58526da7 100644 --- a/lib/core/service/base/base_service.dart +++ b/lib/core/service/base/base_service.dart @@ -1,5 +1,4 @@ import 'package:doctor_app_flutter/client/base_app_client.dart'; -import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; @@ -44,38 +43,5 @@ class BaseService { } } - Future getPatientArrivalList(String date,{String fromDate, int patientMrn = -1, int appointmentNo = -1}) async{ - hasError = false; - Map body = Map(); - body['From'] = fromDate == null ? date : fromDate; - body['To'] = date; - body['PageIndex'] = 0; - body['PageSize'] = 0; - if(patientMrn != -1){ - body['PatientMRN'] = patientMrn; - } - if(appointmentNo != -1){ - body['AppointmentNo'] = appointmentNo; - } - - await baseAppClient.post( - ARRIVED_PATIENT_URL, - onSuccess: (dynamic response, int statusCode) { - patientArrivalList.clear(); - - if(response['patientArrivalList']['entityList'] != null){ - response['patientArrivalList']['entityList'].forEach((v) { - PatiantInformtion item = PatiantInformtion.fromJson(v); - patientArrivalList.add(item); - }); - } - }, - onFailure: (String error, int statusCode) { - hasError = true; - this.error = error; - }, - body: body, - ); - } } diff --git a/lib/core/service/patient/patient_service.dart b/lib/core/service/patient/patient_service.dart index 25e9481b..f79e342c 100644 --- a/lib/core/service/patient/patient_service.dart +++ b/lib/core/service/patient/patient_service.dart @@ -1,7 +1,13 @@ import 'package:doctor_app_flutter/client/base_app_client.dart'; import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; +import 'package:doctor_app_flutter/core/model/diabetic_chart/GetDiabeticChartValuesRequestModel.dart'; +import 'package:doctor_app_flutter/core/model/diabetic_chart/GetDiabeticChartValuesResponseModel.dart'; +import 'package:doctor_app_flutter/core/model/diagnosis/GetDiagnosisForInPatientRequestModel.dart'; +import 'package:doctor_app_flutter/core/model/diagnosis/GetDiagnosisForInPatientResponseModel.dart'; import 'package:doctor_app_flutter/core/model/note/CreateNoteModel.dart'; +import 'package:doctor_app_flutter/core/model/note/GetNursingProgressNoteRequestModel.dart'; +import 'package:doctor_app_flutter/core/model/note/GetNursingProgressNoteResposeModel.dart'; import 'package:doctor_app_flutter/core/model/note/note_model.dart'; import 'package:doctor_app_flutter/core/model/note/update_note_model.dart'; import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart'; @@ -51,11 +57,21 @@ class PatientService extends BaseService { List get labResultList => _labResultList; - // TODO: replace var with model List _patientProgressNoteList = []; List get patientProgressNoteList => _patientProgressNoteList; + List _patientNursingProgressNoteList = []; + + List get patientNursingProgressNoteList => _patientNursingProgressNoteList; + + List _diagnosisForInPatientList = []; + + List get diagnosisForInPatientList => _diagnosisForInPatientList; + List _diabeticChartValuesList = []; + + List get diabeticChartValuesList => _diabeticChartValuesList; + // TODO: replace var with model var _insuranceApporvalsList = []; @@ -465,4 +481,63 @@ class PatientService extends BaseService { body: _doctorsByClinicIdRequest.toJson(), ); } + + + Future getNursingProgressNote(GetNursingProgressNoteRequestModel getNursingProgressNoteRequestModel) async { + hasError = false; + + await baseAppClient.post( + NURSING_PROGRESS_NOTE, + onSuccess: (dynamic response, int statusCode) { + _patientNursingProgressNoteList = []; + response['List_NursingProgressNote'].forEach((v) { + _patientNursingProgressNoteList.add( GetNursingProgressNoteResposeModel.fromJson(v)); + }); + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + body: getNursingProgressNoteRequestModel.toJson(), + ); + } + + Future getDiagnosisForInPatient(GetDiagnosisForInPatientRequestModel getDiagnosisForInPatientRequestModel) async { + hasError = false; + + await baseAppClient.post( + GET_DIAGNOSIS_FOR_IN_PATIENT, + onSuccess: (dynamic response, int statusCode) { + _diagnosisForInPatientList = []; + response['List_DiagnosisForInPatient'].forEach((v) { + _diagnosisForInPatientList.add( GetDiagnosisForInPatientResponseModel.fromJson(v)); + }); + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + body: getDiagnosisForInPatientRequestModel.toJson(), + ); + } + + + Future getDiabeticChartValues(GetDiabeticChartValuesRequestModel getDiabeticChartValuesRequestModel) async { + hasError = false; + + await baseAppClient.post( + GET_DIABETIC_CHART_VALUES, + onSuccess: (dynamic response, int statusCode) { + _diabeticChartValuesList = []; + response['List_DiabeticChartValues'].forEach((v) { + _diabeticChartValuesList.add( GetDiabeticChartValuesResponseModel.fromJson(v)); + }); + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + body: getDiabeticChartValuesRequestModel.toJson(), + ); + } } diff --git a/lib/core/service/patient/profile/discharge_summary_servive.dart b/lib/core/service/patient/profile/discharge_summary_servive.dart new file mode 100644 index 00000000..a92ef0eb --- /dev/null +++ b/lib/core/service/patient/profile/discharge_summary_servive.dart @@ -0,0 +1,54 @@ +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/core/service/base/base_service.dart'; +import 'package:doctor_app_flutter/models/discharge_summary/GetDischargeSummaryReqModel.dart'; +import 'package:doctor_app_flutter/models/discharge_summary/GetDischargeSummaryResModel.dart'; +import 'package:doctor_app_flutter/models/operation_report/create_update_operation_report_request_model.dart'; +import 'package:doctor_app_flutter/models/operation_report/get_operation_details_request_modle.dart'; +import 'package:doctor_app_flutter/models/operation_report/get_operation_details_response_modle.dart'; +import 'package:doctor_app_flutter/models/operation_report/get_reservations_response_model.dart'; +import 'package:doctor_app_flutter/models/operation_report/get_reservations_request_model.dart'; + +class DischargeSummaryService extends BaseService { + List _pendingDischargeSummaryList = []; + List get pendingDischargeSummaryList => + _pendingDischargeSummaryList; + + List _allDischargeSummaryList = []; + List get allDischargeSummaryList => + _allDischargeSummaryList; + + Future getPendingDischargeSummary( + {GetDischargeSummaryReqModel getDischargeSummaryReqModel}) async { + hasError = false; + await baseAppClient.post(GET_PENDING_DISCHARGE_SUMMARY, + onSuccess: (dynamic response, int statusCode) { + _pendingDischargeSummaryList.clear(); + response['List_PendingDischargeSummary'].forEach( + (v) { + _pendingDischargeSummaryList + .add(GetDischargeSummaryResModel.fromJson(v)); + }, + ); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: getDischargeSummaryReqModel.toJson()); + } + + Future getAllDischargeSummary( + {GetDischargeSummaryReqModel getDischargeSummaryReqModel}) async { + hasError = false; + await baseAppClient.post(GET_ALL_DISCHARGE_SUMMARY, + onSuccess: (dynamic response, int statusCode) { + _allDischargeSummaryList.clear(); + response['List_DischargeSummary'].forEach( + (v) { + _allDischargeSummaryList.add(GetDischargeSummaryResModel.fromJson(v)); + }, + ); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: getDischargeSummaryReqModel.toJson()); + } +} diff --git a/lib/core/service/patient/profile/operation_report_servive.dart b/lib/core/service/patient/profile/operation_report_servive.dart new file mode 100644 index 00000000..7ac4ade7 --- /dev/null +++ b/lib/core/service/patient/profile/operation_report_servive.dart @@ -0,0 +1,68 @@ +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/core/service/base/base_service.dart'; +import 'package:doctor_app_flutter/models/operation_report/create_update_operation_report_request_model.dart'; +import 'package:doctor_app_flutter/models/operation_report/get_operation_details_request_modle.dart'; +import 'package:doctor_app_flutter/models/operation_report/get_operation_details_response_modle.dart'; +import 'package:doctor_app_flutter/models/operation_report/get_reservations_response_model.dart'; +import 'package:doctor_app_flutter/models/operation_report/get_reservations_request_model.dart'; + +class OperationReportService extends BaseService { + List _reservationList = []; + List get reservationList => _reservationList; + + List _operationDetailsList = []; + List get operationDetailsList => _operationDetailsList; + + Future getReservations( + {GetReservationsRequestModel getReservationsRequestModel, + int patientId}) async { + getReservationsRequestModel = + GetReservationsRequestModel(patientID: patientId, doctorID: ""); + + hasError = false; + await baseAppClient.post(GET_RESERVATIONS, + onSuccess: (dynamic response, int statusCode) { + print("Success"); + _reservationList.clear(); + response['List_OTReservationDetails'].forEach( + (v) { + _reservationList.add(GetReservationsResponseModel.fromJson(v)); + }, + ); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: getReservationsRequestModel.toJson()); + } + + Future getOperationReportDetails( + {GetOperationDetailsRequestModel getOperationReportRequestModel, + }) async { + + hasError = false; + await baseAppClient.post(GET_OPERATION_DETAILS, + onSuccess: (dynamic response, int statusCode) { + print("Success"); + _operationDetailsList.clear(); + response['List_OperationDetails'].forEach( + (v) { + _operationDetailsList.add(GetOperationDetailsResponseModel.fromJson(v)); + }, + ); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: getOperationReportRequestModel.toJson()); + } + + Future updateOperationReport( + CreateUpdateOperationReportRequestModel + createUpdateOperationReport) async { + await baseAppClient.post(UPDATE_OPERATION_REPORT, + onSuccess: (dynamic response, int statusCode) {}, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: createUpdateOperationReport.toJson(), isFallLanguage: true); + } +} diff --git a/lib/core/service/pending_order_service.dart b/lib/core/service/pending_order_service.dart new file mode 100644 index 00000000..e6f35bb8 --- /dev/null +++ b/lib/core/service/pending_order_service.dart @@ -0,0 +1,68 @@ +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/core/service/base/base_service.dart'; +import 'package:doctor_app_flutter/models/admisson_orders/admission_orders_model.dart'; +import 'package:doctor_app_flutter/models/admisson_orders/admission_orders_request_model.dart'; +import 'package:doctor_app_flutter/models/pending_orders/pending_order_request_model.dart'; +import 'package:doctor_app_flutter/models/pending_orders/pending_orders_model.dart'; + +class PendingOrderService extends BaseService { + List _pendingOrderList = List(); + List get pendingOrderList => _pendingOrderList; + + List _admissionOrderList = List(); + List get admissionOrderList => _admissionOrderList; + + Future getPendingOrders( + {PendingOrderRequestModel pendingOrderRequestModel, + int patientId, + int admissionNo}) async { + pendingOrderRequestModel = PendingOrderRequestModel( + patientID: patientId, + admissionNo: admissionNo, + patientTypeID: 1, + patientType: 1, + setupID: "010266"); + + hasError = false; + await baseAppClient.post(GET_PENDING_ORDERS, + onSuccess: (dynamic response, int statusCode) { + print("Success"); + _pendingOrderList.clear(); + response['List_PendingOrders'].forEach( + (v) { + _pendingOrderList.add(PendingOrderModel.fromJson(v)); + }, + ); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: pendingOrderRequestModel.toJson()); + } + + Future getAdmissionOrders( + {AdmissionOrdersRequestModel admissionOrdersRequestModel, + int patientId, + int admissionNo}) async { + admissionOrdersRequestModel = AdmissionOrdersRequestModel( + patientID: patientId, + admissionNo: admissionNo, + patientTypeID: 1, + patientType: 1, + setupID: "010266"); + + hasError = false; + await baseAppClient.post(GET_ADMISSION_ORDERS, + onSuccess: (dynamic response, int statusCode) { + print("Success"); + //admissionOrderList.clear(); + response['List_AdmissionOrders'].forEach( + (v) { + _admissionOrderList.add(AdmissionOrdersModel.fromJson(v)); + }, + ); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: admissionOrdersRequestModel.toJson()); + } +} diff --git a/lib/core/viewModel/PatientRegistrationViewModel.dart b/lib/core/viewModel/PatientRegistrationViewModel.dart new file mode 100644 index 00000000..866f99a8 --- /dev/null +++ b/lib/core/viewModel/PatientRegistrationViewModel.dart @@ -0,0 +1,209 @@ +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/core/enum/viewstate.dart'; +import 'package:doctor_app_flutter/core/model/PatientRegistration/CheckActivationCodeModel.dart'; +import 'package:doctor_app_flutter/core/model/PatientRegistration/CheckPatientForRegistrationModel.dart'; +import 'package:doctor_app_flutter/core/model/PatientRegistration/GetPatientInfoRequestModel.dart'; +import 'package:doctor_app_flutter/core/model/PatientRegistration/GetPatientInfoResponseModel.dart'; +import 'package:doctor_app_flutter/core/model/PatientRegistration/PatientRegistrationModel.dart'; +import 'package:doctor_app_flutter/core/model/PatientRegistration/SendActivationCodebyOTPNotificationTypeForRegistrationModel.dart'; +import 'package:doctor_app_flutter/core/service/PatientRegistrationService.dart'; +import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; + +import '../../locator.dart'; + +class PatientRegistrationViewModel extends BaseViewModel { + PatientRegistrationService _patientRegistrationService = + locator(); + + GetPatientInfoResponseModel get getPatientInfoResponseModel => + _patientRegistrationService.getPatientInfoResponseModel; + + CheckPatientForRegistrationModel checkPatientForRegistrationModel; + + Future checkPatientForRegistration( + CheckPatientForRegistrationModel registrationModel) async { + checkPatientForRegistrationModel = registrationModel; + + checkPatientForRegistrationModel = + CheckPatientForRegistrationModel.fromJson(registrationModel.toJson()); + setState(ViewState.BusyLocal); + await _patientRegistrationService + .checkPatientForRegistration(registrationModel); + if (_patientRegistrationService.hasError) { + error = _patientRegistrationService.error; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } + + Future getPatientInfo( + GetPatientInfoRequestModel getPatientInfoRequestModel) async { + setState(ViewState.BusyLocal); + + /// TODO Elham* return call service when it working + _patientRegistrationService.getPatientInfoResponseModel = + GetPatientInfoResponseModel.fromJson({ + "Date": null, + "LanguageID": 0, + "ServiceName": 0, + "Time": null, + "AndroidLink": null, + "AuthenticationTokenID": null, + "Data": null, + "Dataw": false, + "DietType": 0, + "ErrorCode": null, + "ErrorEndUserMessage": null, + "ErrorEndUserMessageN": null, + "ErrorMessage": null, + "ErrorType": 0, + "FoodCategory": 0, + "IOSLink": null, + "IsAuthenticated": false, + "MealOrderStatus": 0, + "MealType": 0, + "MessageStatus": 1, + "NumberOfResultRecords": 0, + "PatientBlodType": null, + "SuccessMsg": null, + "SuccessMsgN": null, + "VidaUpdatedResponse": null, + "AccessTokenObject": null, + "Age": 33, + "ClientIdentifierId": null, + "CreatedBy": 0, + "DateOfBirth": "07/31/1988", + "FirstNameAr": "سفيان", + "FirstNameEn": "SUFIAN", + "Gender": "M", + "GenderAr": null, + "GenderEn": null, + "HealthId": "30000018540264", + "IdNumber": "1062938285", + "IdType": "NationalId", + "IsHijri": false, + "IsInstertedOrUpdated": 0, + "IsNull": 0, + "IsPatientExistNHIC": 0, + "IsRecordLockedByCurrentUser": false, + "LastNameAr": "عثمان", + "LastNameEn": "OTHMAN", + "List_ActiveAccessToken": null, + "MaritalStatus": "غير معروف", + "MaritalStatusCode": "U", + "NationalDateOfBirth": "18/12/1408", + "Nationality": "السعودية", + "NationalityCode": "SAU", + "Occupation": "طالب", + "PCDTransactionDataResultList": null, + "PCD_GetVidaPatientForManualVerificationList": null, + "PCD_NHIC_HMG_PatientDetailsMatchCalulationList": null, + "PCD_ReturnValue": 0, + "PatientStatus": "-", + "PlaceofBirth": "فينا", + "PractitionerStatusCode": null, + "PractitionerStatusDescAr": null, + "PractitionerStatusDescEn": null, + "RowCount": 0, + "SecondNameAr": "عبدالهادي", + "SecondNameEn": "ABDULHADI", + "ThirdNameAr": "احمد", + "ThirdNameEn": "A", + "YakeenVidaPatientDataStatisticsByPatientIdList": null, + "YakeenVidaPatientDataStatisticsList": null, + "YakeenVidaPatientDataStatisticsPrefferedList": null, + "accessToken": null, + "categoryCode": 0, + "categoryNameAr": null, + "categoryNameEn": null, + "constraintCode": 0, + "constraintNameAr": null, + "constraintNameEn": null, + "content": null, + "errorList": null, + "licenseExpiryDate": null, + "licenseIssuedDate": null, + "licenseStatusCode": null, + "licenseStatusDescAr": null, + "licenseStatusDescEn": null, + "organizations": null, + "registrationNumber": null, + "specialtyCode": 0, + "specialtyNameAr": null, + "specialtyNameEn": null + }); + // await _patientRegistrationService. + // getPatientInfo(getPatientInfoRequestModel); + // if (_patientRegistrationService.hasError) { + // error = _patientRegistrationService.error; + // setState(ViewState.ErrorLocal); + // } else + setState(ViewState.Idle); + } + + Future sendActivationCodeByOTPNotificationType( + {SendActivationCodeByOTPNotificationTypeForRegistrationModel + registrationModel, + int otpType, + PatientRegistrationViewModel user}) async { + setState(ViewState.BusyLocal); + print(checkPatientForRegistrationModel); + print(checkPatientForRegistrationModel); + + await _patientRegistrationService.sendActivationCodeByOTPNotificationType( + otpType: otpType, + model: this, + checkPatientForRegistrationModel: checkPatientForRegistrationModel); + if (_patientRegistrationService.hasError) { + error = _patientRegistrationService.error; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } + + Future checkActivationCode(String code) async { + CheckActivationCodeModel model = CheckActivationCodeModel( + activationCode: code, + patientIdentificationID: + checkPatientForRegistrationModel.patientIdentificationID, + patientMobileNumber: checkPatientForRegistrationModel.patientMobileNumber, + zipCode: checkPatientForRegistrationModel.zipCode, + patientOutSA: 0, + healthId: getPatientInfoResponseModel.healthId, + dOB: checkPatientForRegistrationModel.dOB, + isRegister: checkPatientForRegistrationModel.isRegister, + isHijri: checkPatientForRegistrationModel.isHijri, + sessionID: null, + generalid: GENERAL_ID, + forRegisteration: true, + isDentalAllowedBackend: false, + projectOutSA: 0, + searchType: 1, + versionID: 7.1, + channel: 3, + // TODO Elham* loginType + loginType: 4, + logInTokenID:_patientRegistrationService.logInTokenID , + nationalID: checkPatientForRegistrationModel.patientIdentificationID, + patientID: 0, + mobileNo: checkPatientForRegistrationModel.patientMobileNumber.toString(), + ); + setState(ViewState.BusyLocal); + await _patientRegistrationService.checkActivationCode(model); + if (_patientRegistrationService.hasError) { + error = _patientRegistrationService.error; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } + + Future registrationPatient(PatientRegistrationModel registrationModel) async { + setState(ViewState.BusyLocal); + await _patientRegistrationService.registrationPatient(registrationModel); + if (_patientRegistrationService.hasError) { + error = _patientRegistrationService.error; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } +} diff --git a/lib/core/viewModel/base_view_model.dart b/lib/core/viewModel/base_view_model.dart index 03f6e84a..d50a8d5a 100644 --- a/lib/core/viewModel/base_view_model.dart +++ b/lib/core/viewModel/base_view_model.dart @@ -22,7 +22,7 @@ class BaseViewModel extends ChangeNotifier { void setState(ViewState viewState) { _state = viewState; - notifyListeners(); + notifyListeners(); } Future getDoctorProfile({bool isGetProfile = false}) async { diff --git a/lib/core/viewModel/dashboard_view_model.dart b/lib/core/viewModel/dashboard_view_model.dart index afcec235..04e63dd9 100644 --- a/lib/core/viewModel/dashboard_view_model.dart +++ b/lib/core/viewModel/dashboard_view_model.dart @@ -37,7 +37,7 @@ class DashboardViewModel extends BaseViewModel { await getDoctorProfile(isGetProfile: true); final results = await Future.wait([ - projectsProvider.getDoctorClinicsList(), + projectsProvider.getDoctorClinicsList(), _dashboardService.getDashboard(), _dashboardService.checkDoctorHasLiveCare(), _specialClinicsService.getSpecialClinicalCareList(), @@ -45,7 +45,7 @@ class DashboardViewModel extends BaseViewModel { if (_dashboardService.hasError) { error = _dashboardService.error; - setState(ViewState.Error); + setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); @@ -72,31 +72,21 @@ class DashboardViewModel extends BaseViewModel { Future getDashboard() async { setState(ViewState.Busy); await _dashboardService.getDashboard(); - if (_dashboardService.hasError) { - error = _dashboardService.error; - setState(ViewState.Error); - } else - setState(ViewState.Idle); } Future checkDoctorHasLiveCare() async { setState(ViewState.Busy); await _dashboardService.checkDoctorHasLiveCare(); - if (_dashboardService.hasError) { - error = _dashboardService.error; - setState(ViewState.Error); - } else - setState(ViewState.Idle); } Future getSpecialClinicalCareList() async { setState(ViewState.Busy); await _specialClinicsService.getSpecialClinicalCareList(); - if (_specialClinicsService.hasError) { - error = _specialClinicsService.error; - setState(ViewState.Error); - } else - setState(ViewState.Idle); + // if (_specialClinicsService.hasError) { + // error = _specialClinicsService.error; + // setState(ViewState.Error); + // } else + // setState(ViewState.Idle); } Future changeClinic( diff --git a/lib/core/viewModel/patient-referral-viewmodel.dart b/lib/core/viewModel/patient-referral-viewmodel.dart index 4240e848..93635629 100644 --- a/lib/core/viewModel/patient-referral-viewmodel.dart +++ b/lib/core/viewModel/patient-referral-viewmodel.dart @@ -256,17 +256,7 @@ class PatientReferralViewModel extends BaseViewModel { } } - Future getPatientDetails(String fromDate, String toDate, int patientMrn, int appointmentNo) async { - setState(ViewState.Busy); - await _referralPatientService.getPatientArrivalList(toDate, fromDate: fromDate, patientMrn: patientMrn); - if (_referralPatientService.hasError) { - error = _referralPatientService.error; - setState(ViewState.Error); - } else { - setState(ViewState.Idle); - } - } Future getReferralFrequencyList() async { setState(ViewState.Busy); diff --git a/lib/core/viewModel/patient_view_model.dart b/lib/core/viewModel/patient_view_model.dart index 5bc6250f..1d5f087a 100644 --- a/lib/core/viewModel/patient_view_model.dart +++ b/lib/core/viewModel/patient_view_model.dart @@ -1,5 +1,11 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart'; +import 'package:doctor_app_flutter/core/model/diabetic_chart/GetDiabeticChartValuesRequestModel.dart'; +import 'package:doctor_app_flutter/core/model/diabetic_chart/GetDiabeticChartValuesResponseModel.dart'; +import 'package:doctor_app_flutter/core/model/diagnosis/GetDiagnosisForInPatientRequestModel.dart'; +import 'package:doctor_app_flutter/core/model/diagnosis/GetDiagnosisForInPatientResponseModel.dart'; import 'package:doctor_app_flutter/core/model/note/CreateNoteModel.dart'; +import 'package:doctor_app_flutter/core/model/note/GetNursingProgressNoteRequestModel.dart'; +import 'package:doctor_app_flutter/core/model/note/GetNursingProgressNoteResposeModel.dart'; import 'package:doctor_app_flutter/core/model/note/note_model.dart'; import 'package:doctor_app_flutter/core/model/note/update_note_model.dart'; import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart'; @@ -21,41 +27,60 @@ class PatientViewModel extends BaseViewModel { List get inPatientList => _patientService.inPatientList; - List get patientVitalSignList => _patientService.patientVitalSignList; + List get patientVitalSignList => + _patientService.patientVitalSignList; - List get patientVitalSignOrderdSubList => _patientService.patientVitalSignOrderdSubList; + List get patientVitalSignOrderdSubList => + _patientService.patientVitalSignOrderdSubList; - List get patientLabResultOrdersList => _patientService.patientLabResultOrdersList; + List get patientLabResultOrdersList => + _patientService.patientLabResultOrdersList; - List get patientPrescriptionsList => _patientService.patientPrescriptionsList; + List get patientPrescriptionsList => + _patientService.patientPrescriptionsList; List get prescriptionReportForInPatientList => _patientService.prescriptionReportForInPatientList; - List get prescriptionReport => _patientService.prescriptionReport; + List get prescriptionReport => + _patientService.prescriptionReport; - List get patientRadiologyList => _patientService.patientRadiologyList; + List get patientRadiologyList => + _patientService.patientRadiologyList; List get labResultList => _patientService.labResultList; get insuranceApporvalsList => _patientService.insuranceApporvalsList; - List get patientProgressNoteList => _patientService.patientProgressNoteList; + List get patientProgressNoteList => + _patientService.patientProgressNoteList; + + List get patientNursingProgressNoteList => + _patientService.patientNursingProgressNoteList; + + List get diagnosisForInPatientList => + _patientService.diagnosisForInPatientList; + + List get diabeticChartValuesList => + _patientService.diabeticChartValuesList; List get clinicsList => _patientService.clinicsList; List get doctorsList => _patientService.doctorsList; - List get referralFrequencyList => _patientService.referalFrequancyList; + List get referralFrequencyList => + _patientService.referalFrequancyList; - Future getPatientList(patient, patientType, {bool isBusyLocal = false, isView}) async { + Future getPatientList(patient, patientType, + {bool isBusyLocal = false, isView}) async { var localRes; if (isBusyLocal) { setState(ViewState.BusyLocal); } else { setState(ViewState.Busy); } - localRes = await _patientService.getPatientList(patient, patientType, isView: isView); + localRes = await _patientService.getPatientList(patient, patientType, + isView: isView); if (_patientService.hasError) { error = _patientService.error; @@ -204,12 +229,16 @@ class PatientViewModel extends BaseViewModel { } List getDoctorNameList() { - var doctorNamelist = _patientService.doctorsList.map((value) => value['DoctorName'].toString()).toList(); + var doctorNamelist = _patientService.doctorsList + .map((value) => value['DoctorName'].toString()) + .toList(); return doctorNamelist; } List getClinicNameList() { - var clinicsNameslist = _patientService.clinicsList.map((value) => value['ClinicDescription'].toString()).toList(); + var clinicsNameslist = _patientService.clinicsList + .map((value) => value['ClinicDescription'].toString()) + .toList(); return clinicsNameslist; } @@ -224,8 +253,9 @@ class PatientViewModel extends BaseViewModel { } List getReferralNamesList() { - var referralNamesList = - _patientService.referalFrequancyList.map((value) => value['Description'].toString()).toList(); + var referralNamesList = _patientService.referalFrequancyList + .map((value) => value['Description'].toString()) + .toList(); return referralNamesList; } @@ -271,7 +301,8 @@ class PatientViewModel extends BaseViewModel { setState(ViewState.Idle); } - Future getInPatientList(PatientSearchRequestModel requestModel, {bool isMyInpatient = false}) async { + Future getInPatientList(PatientSearchRequestModel requestModel, + {bool isMyInpatient = false}) async { await getDoctorProfile(); setState(ViewState.Busy); @@ -284,4 +315,60 @@ class PatientViewModel extends BaseViewModel { setState(ViewState.Idle); } } + + Future getNursingProgressNote( + GetNursingProgressNoteRequestModel requestModel) async { + await getDoctorProfile(); + setState(ViewState.Busy); + + await _patientService.getNursingProgressNote(requestModel); + if (_patientService.hasError) { + error = _patientService.error; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } + + Future getDiagnosisForInPatient( + GetDiagnosisForInPatientRequestModel requestModel) async { + await getDoctorProfile(); + setState(ViewState.Busy); + + await _patientService.getDiagnosisForInPatient(requestModel); + if (_patientService.hasError) { + error = _patientService.error; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } + + Future getDiabeticChartValues(PatiantInformtion patient, int resultType, + {bool isLocalBusy = false}) async { + await getDoctorProfile(); + if (isLocalBusy) + setState(ViewState.BusyLocal); + else + setState(ViewState.Busy); + + GetDiabeticChartValuesRequestModel requestModel = + GetDiabeticChartValuesRequestModel( + patientID: patient.patientId, + admissionNo: int.parse(patient.admissionNo), + patientTypeID: 1, + patientType: 1, + resultType: resultType, + setupID: "010266"); + await _patientService.getDiabeticChartValues(requestModel); + if (_patientService.hasError) { + error = _patientService.error; + if (isLocalBusy) + setState(ViewState.ErrorLocal); + else + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } } diff --git a/lib/core/viewModel/pednding_orders_view_model.dart b/lib/core/viewModel/pednding_orders_view_model.dart new file mode 100644 index 00000000..3f3e92be --- /dev/null +++ b/lib/core/viewModel/pednding_orders_view_model.dart @@ -0,0 +1,43 @@ +import 'package:doctor_app_flutter/core/enum/viewstate.dart'; +import 'package:doctor_app_flutter/core/service/pending_order_service.dart'; +import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; +import 'package:doctor_app_flutter/locator.dart'; +import 'package:doctor_app_flutter/models/admisson_orders/admission_orders_model.dart'; +import 'package:doctor_app_flutter/models/pending_orders/pending_orders_model.dart'; + +class PendingOrdersViewModel extends BaseViewModel { + bool hasError = false; + PendingOrderService _pendingOrderService = locator(); + + List get pendingOrdersList => + _pendingOrderService.pendingOrderList; + + List get admissionOrderList => + _pendingOrderService.admissionOrderList; + + Future getPendingOrders({int patientId, int admissionNo}) async { + hasError = false; + setState(ViewState.Busy); + await _pendingOrderService.getPendingOrders( + patientId: patientId, admissionNo: admissionNo); + if (_pendingOrderService.hasError) { + error = _pendingOrderService.error; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } + + Future getAdmissionOrders({int patientId, int admissionNo}) async { + hasError = false; + setState(ViewState.Busy); + await _pendingOrderService.getAdmissionOrders( + patientId: patientId, admissionNo: admissionNo); + if (_pendingOrderService.hasError) { + error = _pendingOrderService.error; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } +} diff --git a/lib/core/viewModel/profile/discharge_summary_view_model.dart b/lib/core/viewModel/profile/discharge_summary_view_model.dart new file mode 100644 index 00000000..9db5a6dd --- /dev/null +++ b/lib/core/viewModel/profile/discharge_summary_view_model.dart @@ -0,0 +1,50 @@ +import 'package:doctor_app_flutter/core/enum/viewstate.dart'; +import 'package:doctor_app_flutter/core/service/patient/profile/discharge_summary_servive.dart'; +import 'package:doctor_app_flutter/core/service/patient/profile/operation_report_servive.dart'; +import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; +import 'package:doctor_app_flutter/locator.dart'; +import 'package:doctor_app_flutter/models/discharge_summary/GetDischargeSummaryReqModel.dart'; +import 'package:doctor_app_flutter/models/discharge_summary/GetDischargeSummaryResModel.dart'; + +class DischargeSummaryViewModel extends BaseViewModel { + bool hasError = false; + DischargeSummaryService _dischargeSummaryService = + locator(); + + List get pendingDischargeSummaryList => + _dischargeSummaryService.pendingDischargeSummaryList; + + + List get allDisChargeSummaryList => + _dischargeSummaryService.allDischargeSummaryList; + + + Future getPendingDischargeSummary({int patientId, int admissionNo, }) async { + GetDischargeSummaryReqModel getDischargeSummaryReqModel = GetDischargeSummaryReqModel(admissionNo:admissionNo,patientID: patientId ); + hasError = false; + setState(ViewState.Busy); + await _dischargeSummaryService.getPendingDischargeSummary(getDischargeSummaryReqModel: getDischargeSummaryReqModel); + if (_dischargeSummaryService.hasError) { + error = _dischargeSummaryService.error; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } + + + + Future getAllDischargeSummary({int patientId, int admissionNo, }) async { + GetDischargeSummaryReqModel getDischargeSummaryReqModel = GetDischargeSummaryReqModel(admissionNo:admissionNo,patientID: patientId ); + hasError = false; + setState(ViewState.Busy); + await _dischargeSummaryService.getAllDischargeSummary(getDischargeSummaryReqModel: getDischargeSummaryReqModel); + if (_dischargeSummaryService.hasError) { + error = _dischargeSummaryService.error; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } + +} diff --git a/lib/core/viewModel/profile/operation_report_view_model.dart b/lib/core/viewModel/profile/operation_report_view_model.dart new file mode 100644 index 00000000..e3f4f430 --- /dev/null +++ b/lib/core/viewModel/profile/operation_report_view_model.dart @@ -0,0 +1,59 @@ +import 'package:doctor_app_flutter/core/enum/viewstate.dart'; +import 'package:doctor_app_flutter/core/service/patient/profile/operation_report_servive.dart'; +import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; +import 'package:doctor_app_flutter/locator.dart'; +import 'package:doctor_app_flutter/models/operation_report/create_update_operation_report_request_model.dart'; +import 'package:doctor_app_flutter/models/operation_report/get_operation_details_request_modle.dart'; +import 'package:doctor_app_flutter/models/operation_report/get_operation_details_response_modle.dart'; +import 'package:doctor_app_flutter/models/operation_report/get_reservations_response_model.dart'; + +class OperationReportViewModel extends BaseViewModel { + bool hasError = false; + OperationReportService _operationReportService = + locator(); + + List get reservationList => + _operationReportService.reservationList; + + List get operationDetailsList => + _operationReportService.operationDetailsList; + + Future getReservations(int patientId) async { + hasError = false; + setState(ViewState.Busy); + await _operationReportService.getReservations(patientId: patientId); + if (_operationReportService.hasError) { + error = _operationReportService.error; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } + + Future getOperationReportDetails(GetReservationsResponseModel reservation) async { + hasError = false; + setState(ViewState.Busy); + GetOperationDetailsRequestModel getOperationReportRequestModel = GetOperationDetailsRequestModel(reservationNo:reservation.oTReservationID, patientID: reservation.patientID, setupID: "010266" ); + await _operationReportService.getOperationReportDetails(getOperationReportRequestModel:getOperationReportRequestModel); + if (_operationReportService.hasError) { + error = _operationReportService.error; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } + + + + Future updateOperationReport( + CreateUpdateOperationReportRequestModel + createUpdateOperationReport) async { + setState(ViewState.BusyLocal); + await _operationReportService.updateOperationReport(createUpdateOperationReport); + if (_operationReportService.hasError) { + error = _operationReportService.error; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } +} diff --git a/lib/landing_page.dart b/lib/landing_page.dart index 72b5c857..fcdb1eff 100644 --- a/lib/landing_page.dart +++ b/lib/landing_page.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/screens/doctor/doctor_replay/doctor_reply_screen.dart'; import 'package:doctor_app_flutter/screens/doctor/my_schedule_screen.dart'; import 'package:doctor_app_flutter/screens/home/home_screen.dart'; @@ -5,10 +6,13 @@ import 'package:doctor_app_flutter/screens/qr_reader/QR_reader_screen.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_drawer_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/bottom_nav_bar.dart'; import 'package:doctor_app_flutter/widgets/shared/user-guid/app_showcase_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; class LandingPage extends StatefulWidget { @override @@ -34,6 +38,7 @@ class _LandingPageState extends State { @override Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); return AppScaffold( appBar: currentTab != 0 ? AppBar( @@ -41,16 +46,26 @@ class _LandingPageState extends State { backgroundColor: Colors.grey[100], //textTheme: TextTheme(headline6: TextStyle(color: Colors.white)), title: currentTab != 0 - ? Text(getText(currentTab).toUpperCase()) + ? AppText( + getText(currentTab), + letterSpacing: -1.44, + fontWeight: FontWeight.w700, + fontSize: 24.0, + color: Color(0xff2B353E), + ) : SizedBox(), leading: Builder( builder: (BuildContext context) { - return IconButton( - icon: Image.asset('assets/images/menu.png', - height: 50, width: 50), - iconSize: 15, - color: Colors.black, - onPressed: () => Scaffold.of(context).openDrawer(), + return Container( + width: 40, + margin: EdgeInsets.only(left: projectViewModel.isArabic? 0:20, right: projectViewModel.isArabic? 20:0), + child: IconButton( + icon: SvgPicture.asset('assets/images/svgs/menu.svg', + height: 25, width: 10), + iconSize: 15, + color: Color(0xff2B353E), + onPressed: () => Scaffold.of(context).openDrawer(), + ), ); }, ), diff --git a/lib/locator.dart b/lib/locator.dart index 3ee2650c..18c04ffc 100644 --- a/lib/locator.dart +++ b/lib/locator.dart @@ -1,9 +1,14 @@ import 'package:doctor_app_flutter/core/service/authentication_service.dart'; import 'package:doctor_app_flutter/core/service/home/scan_qr_service.dart'; +import 'package:doctor_app_flutter/core/service/patient/profile/discharge_summary_servive.dart'; +import 'package:doctor_app_flutter/core/service/pending_order_service.dart'; import 'package:doctor_app_flutter/core/viewModel/dashboard_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/hospitals_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/medical_file_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/profile/discharge_summary_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/profile/operation_report_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/pednding_orders_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart'; import 'package:doctor_app_flutter/core/viewModel/scan_qr_view_model.dart'; @@ -12,6 +17,7 @@ import 'package:get_it/get_it.dart'; import 'core/service/AnalyticsService.dart'; import 'core/service/NavigationService.dart'; +import 'core/service/PatientRegistrationService.dart'; import 'core/service/VideoCallService.dart'; import 'core/service/home/dasboard_service.dart'; import 'core/service/home/doctor_reply_service.dart'; @@ -26,6 +32,7 @@ import 'core/service/patient/out_patient_service.dart'; import 'core/service/patient/patient-doctor-referral-service.dart'; import 'core/service/patient/patientInPatientService.dart'; import 'core/service/patient/patient_service.dart'; +import 'core/service/patient/profile/operation_report_servive.dart'; import 'core/service/patient/referral_patient_service.dart'; import 'core/service/patient_medical_file/admission_request/patient-admission-request-service.dart'; import 'core/service/patient_medical_file/insurance/InsuranceCardService.dart'; @@ -47,6 +54,7 @@ import 'core/viewModel/InsuranceViewModel.dart'; import 'core/viewModel/LiveCarePatientViewModel.dart'; import 'core/viewModel/PatientMedicalReportViewModel.dart'; import 'core/viewModel/PatientMuseViewModel.dart'; +import 'core/viewModel/PatientRegistrationViewModel.dart'; import 'core/viewModel/PatientSearchViewModel.dart'; import 'core/viewModel/SOAP_view_model.dart'; import 'core/viewModel/doctor_replay_view_model.dart'; @@ -100,6 +108,10 @@ void setupLocator() { locator.registerLazySingleton(() => SpecialClinicsService()); locator.registerLazySingleton(() => VideoCallService()); locator.registerLazySingleton(() => AnalyticsService()); + locator.registerLazySingleton(() => OperationReportService()); + locator.registerLazySingleton(() => PendingOrderService()); + locator.registerLazySingleton(() => PatientRegistrationService()); + locator.registerLazySingleton(() => DischargeSummaryService()); /// View Model locator.registerFactory(() => DoctorReplayViewModel()); @@ -128,4 +140,9 @@ void setupLocator() { locator.registerFactory(() => LiveCarePatientViewModel()); locator.registerFactory(() => PatientMedicalReportViewModel()); locator.registerFactory(() => ScanQrViewModel()); + locator.registerFactory(() => OperationReportViewModel()); + locator.registerFactory(() => PatientRegistrationViewModel()); + locator.registerFactory(() => PendingOrdersViewModel()); + locator.registerFactory(() => DischargeSummaryViewModel()); + } diff --git a/lib/main.dart b/lib/main.dart index 450c046f..37f3d3d0 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -36,7 +36,8 @@ class MyApp extends StatelessWidget { SizeConfig().init(constraints, orientation); return MultiProvider( providers: [ - ChangeNotifierProvider(create: (context) => AuthenticationViewModel()), + ChangeNotifierProvider( + create: (context) => AuthenticationViewModel()), ChangeNotifierProvider( create: (context) => ProjectViewModel(), ), @@ -67,7 +68,7 @@ class MyApp extends StatelessWidget { theme: ThemeData( primarySwatch: Colors.grey, primaryColor: Colors.grey, - buttonColor: HexColor('#B8382C'), + buttonColor: HexColor('#D02127'), fontFamily: 'Poppins', dividerColor: Colors.grey[350], backgroundColor: Color.fromRGBO(255, 255, 255, 1), diff --git a/lib/models/admisson_orders/admission_orders_model.dart b/lib/models/admisson_orders/admission_orders_model.dart new file mode 100644 index 00000000..a0891a02 --- /dev/null +++ b/lib/models/admisson_orders/admission_orders_model.dart @@ -0,0 +1,57 @@ +class AdmissionOrdersModel { + int procedureID; + String procedureName; + String procedureNameN; + int orderNo; + int doctorID; + int clinicID; + String createdOn; + int createdBy; + String editedOn; + int editedBy; + String createdByName; + + AdmissionOrdersModel( + {this.procedureID, + this.procedureName, + this.procedureNameN, + this.orderNo, + this.doctorID, + this.clinicID, + this.createdOn, + this.createdBy, + this.editedOn, + this.editedBy, + this.createdByName}); + + AdmissionOrdersModel.fromJson(Map json) { + procedureID = json['ProcedureID']; + procedureName = json['ProcedureName']; + procedureNameN = json['ProcedureNameN']; + orderNo = json['OrderNo']; + doctorID = json['DoctorID']; + clinicID = json['ClinicID']; + createdOn = json['CreatedOn']; + createdBy = json['CreatedBy']; + editedOn = json['EditedOn']; + editedBy = json['EditedBy']; + createdByName = json['CreatedByName']; + } + + Map toJson() { + final Map data = new Map(); + data['ProcedureID'] = this.procedureID; + data['ProcedureName'] = this.procedureName; + data['ProcedureNameN'] = this.procedureNameN; + data['OrderNo'] = this.orderNo; + data['DoctorID'] = this.doctorID; + data['ClinicID'] = this.clinicID; + data['CreatedOn'] = this.createdOn; + data['CreatedBy'] = this.createdBy; + data['EditedOn'] = this.editedOn; + data['EditedBy'] = this.editedBy; + data['CreatedByName'] = this.createdByName; + + return data; + } +} diff --git a/lib/models/admisson_orders/admission_orders_request_model.dart b/lib/models/admisson_orders/admission_orders_request_model.dart new file mode 100644 index 00000000..897bb8f8 --- /dev/null +++ b/lib/models/admisson_orders/admission_orders_request_model.dart @@ -0,0 +1,76 @@ +class AdmissionOrdersRequestModel { + bool isDentalAllowedBackend; + double versionID; + int channel; + int languageID; + String iPAdress; + String generalid; + int deviceTypeID; + String tokenID; + int patientID; + int admissionNo; + String sessionID; + int projectID; + String setupID; + bool patientOutSA; + int patientType; + int patientTypeID; + + AdmissionOrdersRequestModel( + {this.isDentalAllowedBackend, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.deviceTypeID, + this.tokenID, + this.patientID, + this.admissionNo, + this.sessionID, + this.projectID, + this.setupID, + this.patientOutSA, + this.patientType, + this.patientTypeID}); + + AdmissionOrdersRequestModel.fromJson(Map json) { + isDentalAllowedBackend = json['isDentalAllowedBackend']; + versionID = json['VersionID']; + channel = json['Channel']; + languageID = json['LanguageID']; + iPAdress = json['IPAdress']; + generalid = json['generalid']; + deviceTypeID = json['DeviceTypeID']; + tokenID = json['TokenID']; + patientID = json['PatientID']; + admissionNo = json['AdmissionNo']; + sessionID = json['SessionID']; + projectID = json['ProjectID']; + setupID = json['SetupID']; + patientOutSA = json['PatientOutSA']; + patientType = json['PatientType']; + patientTypeID = json['PatientTypeID']; + } + + Map toJson() { + final Map data = new Map(); + data['isDentalAllowedBackend'] = this.isDentalAllowedBackend; + data['VersionID'] = this.versionID; + data['Channel'] = this.channel; + data['LanguageID'] = this.languageID; + data['IPAdress'] = this.iPAdress; + data['generalid'] = this.generalid; + data['DeviceTypeID'] = this.deviceTypeID; + data['TokenID'] = this.tokenID; + data['PatientID'] = this.patientID; + data['AdmissionNo'] = this.admissionNo; + data['SessionID'] = this.sessionID; + data['ProjectID'] = this.projectID; + data['SetupID'] = this.setupID; + data['PatientOutSA'] = this.patientOutSA; + data['PatientType'] = this.patientType; + data['PatientTypeID'] = this.patientTypeID; + return data; + } +} diff --git a/lib/models/countriesModel.dart b/lib/models/countriesModel.dart new file mode 100644 index 00000000..89797fab --- /dev/null +++ b/lib/models/countriesModel.dart @@ -0,0 +1,1087 @@ +// final List countries = [ +// new Countries( +// name: "Saudi Arabia", name_ar: "المملكة العربية السعودية", code: '966'), +// new Countries( +// name: "United Arab Emirates", +// name_ar: "الإمارات العربية المتحدة", +// code: '971'), +// ]; + +// class Countries { +// final String name; +// final String name_ar; +// final String code; + +// Countries({this.name, this.name_ar, this.code}); +// } + +class Countries { + String name; + String nameAr; + String code; + String countryCode; + + Countries({this.name, this.nameAr, this.code, this.countryCode}); + + Countries.fromJson(Map json) { + name = json['name']; + nameAr = json['name_ar']; + code = json['code']; + countryCode = json['countryCode']; + } + + Map toJson() { + final Map data = new Map(); + data['name'] = this.name; + data['name_ar'] = this.nameAr; + data['code'] = this.code; + data['countryCode'] = this.countryCode; + return data; + } +} + +List> countriesData = [ + { + "name": "Saudi Arabia", + "name_ar": "المملكة العربية السعودية", + "code": "+966", + "countryCode": "SA", + "pattern": "5xxxxxxxx", + "maxLength": 9 + }, + { + "name": "United Arab Emirates", + "name_ar": "الإمارات العربية المتحدة", + "code": "+971", + "countryCode": "AE", + "pattern": "5xxxxxxxx", + "maxLength": 9 + }, + { + "name": "Bahrain", + "name_ar": "البحرين", + "code": "+973", + "countryCode": "BH", + "maxLength": 8 + }, + {"name": "Kuwait", "name_ar": "الكويت", "code": "+965", "countryCode": "KW"}, + { + "name": "Afghanistan", + "name_ar": "أفغانستان", + "code": "+93", + "countryCode": "AF" + }, + { + "name": "Aland Islands", + "name_ar": "جزر آلاند", + "code": "+358", + "countryCode": "AX" + }, + { + "name": "Albania", + "name_ar": "ألبانيا", + "code": "+355", + "countryCode": "AL" + }, + { + "name": "Algeria", + "name_ar": "الجزائر", + "code": "+213", + "countryCode": "DZ" + }, + { + "name": "AmericanSamoa", + "name_ar": "ساموا الأمريكية", + "code": "+1 684", + "countryCode": "AS" + }, + {"name": "Andorra", "name_ar": "أندورا", "code": "+376", "countryCode": "AD"}, + {"name": "Angola", "name_ar": "أنغولا", "code": "+244", "countryCode": "AO"}, + { + "name": "Anguilla", + "name_ar": "أنغيلا", + "code": "+1 264", + "countryCode": "AI" + }, + { + "name": "Antarctica", + "name_ar": "القارة القطبية الجنوبية", + "code": "+672", + "countryCode": "AQ" + }, + { + "name": "Antigua and Barbuda", + "name_ar": "أنتيغوا وبربودا", + "code": "+1268", + "countryCode": "AG" + }, + { + "name": "Argentina", + "name_ar": "الأرجنتين", + "code": "+54", + "countryCode": "AR" + }, + { + "name": "Armenia", + "name_ar": "أرمينيا", + "code": "+374", + "countryCode": "AM" + }, + {"name": "Aruba", "name_ar": "أروبا", "code": "+297", "countryCode": "AW"}, + { + "name": "Australia", + "name_ar": "أستراليا", + "code": "+61", + "countryCode": "AU" + }, + {"name": "Austria", "name_ar": "النمسا", "code": "+43", "countryCode": "AT"}, + { + "name": "Azerbaijan", + "name_ar": "أذربيجان", + "code": "+994", + "countryCode": "AZ" + }, + { + "name": "Bahamas", + "name_ar": "الباهاما", + "code": "+1 242", + "countryCode": "BS" + }, + { + "name": "Bangladesh", + "name_ar": "بنغلاديش", + "code": "+880", + "countryCode": "BD" + }, + { + "name": "Barbados", + "name_ar": "بربادوس", + "code": "+1 246", + "countryCode": "BB" + }, + { + "name": "Belarus", + "name_ar": "روسيا البيضاء", + "code": "+375", + "countryCode": "BY" + }, + {"name": "Belgium", "name_ar": "بلجيكا", "code": "+32", "countryCode": "BE"}, + {"name": "Belize", "name_ar": "بليز", "code": "+501", "countryCode": "BZ"}, + {"name": "Benin", "name_ar": "بنين", "code": "+229", "countryCode": "BJ"}, + { + "name": "Bermuda", + "name_ar": "برمودا", + "code": "+1 441", + "countryCode": "BM" + }, + {"name": "Bhutan", "name_ar": "بوتان", "code": "+975", "countryCode": "BT"}, + { + "name": "Bolivia, Plurinational State of", + "name_ar": "دولة بوليفيا المتعددة القوميات", + "code": "+591", + "countryCode": "BO" + }, + { + "name": "Bosnia and Herzegovina", + "name_ar": "البوسنة والهرسك", + "code": "+387", + "countryCode": "BA" + }, + { + "name": "Botswana", + "name_ar": "بوتسوانا", + "code": "+267", + "countryCode": "BW" + }, + {"name": "Brazil", "name_ar": "البرازيل", "code": "+55", "countryCode": "BR"}, + { + "name": "British Indian Ocean Territory", + "name_ar": "إقليم المحيط البريطاني الهندي", + "code": "+246", + "countryCode": "IO" + }, + { + "name": "Brunei Darussalam", + "name_ar": "بروناي دار السلام", + "code": "+673", + "countryCode": "BN" + }, + { + "name": "Bulgaria", + "name_ar": "بلغاريا", + "code": "+359", + "countryCode": "BG" + }, + { + "name": "Burkina Faso", + "name_ar": "بوركينا فاسو", + "code": "+226", + "countryCode": "BF" + }, + { + "name": "Burundi", + "name_ar": "بوروندي", + "code": "+257", + "countryCode": "BI" + }, + { + "name": "Cambodia", + "name_ar": "كمبوديا", + "code": "+855", + "countryCode": "KH" + }, + { + "name": "Cameroon", + "name_ar": "الكاميرون", + "code": "+237", + "countryCode": "CM" + }, + {"name": "Canada", "name_ar": "كندا", "code": "+1", "countryCode": "CA"}, + { + "name": "Cape Verde", + "name_ar": "الرأس الأخضر", + "code": "+238", + "countryCode": "CV" + }, + { + "name": "Cayman Islands", + "name_ar": "جزر كايمان", + "code": "+345", + "countryCode": "KY" + }, + { + "name": "Central African Republic", + "name_ar": "جمهورية افريقيا الوسطى", + "code": "+236", + "countryCode": "CF" + }, + {"name": "Chad", "name_ar": "تشاد", "code": "+235", "countryCode": "TD"}, + {"name": "Chile", "name_ar": "تشيلي", "code": "+56", "countryCode": "CL"}, + {"name": "China", "name_ar": "الصين", "code": "+86", "countryCode": "CN"}, + { + "name": "Christmas Island", + "name_ar": "جزيرة الكريسماس", + "code": "+61", + "countryCode": "CX" + }, + { + "name": "Cocos (Keeling) Islands", + "name_ar": "جزر كوكوس كيلينغ", + "code": "+61", + "countryCode": "CC" + }, + { + "name": "Colombia", + "name_ar": "كولومبيا", + "code": "+57", + "countryCode": "CO" + }, + { + "name": "Comoros", + "name_ar": "جزر القمر", + "code": "+269", + "countryCode": "KM" + }, + {"name": "Congo", "name_ar": "الكونغو", "code": "+242", "countryCode": "CG"}, + { + "name": "Congo, The Democratic Republic of the Congo", + "name_ar": "الكونغو ، جمهورية الكونغو الديمقراطية", + "code": "+243", + "countryCode": "CD" + }, + { + "name": "Cook Islands", + "name_ar": "جزر كوك", + "code": "+682", + "countryCode": "CK" + }, + { + "name": "Costa Rica", + "name_ar": "كوستا ريكا", + "code": "+506", + "countryCode": "CR" + }, + { + "name": "Cote d'Ivoire", + "name_ar": "ساحل العاج", + "code": "+225", + "countryCode": "CI" + }, + { + "name": "Croatia", + "name_ar": "كرواتيا", + "code": "+385", + "countryCode": "HR" + }, + {"name": "Cuba", "name_ar": "كوبا", "code": "+53", "countryCode": "CU"}, + {"name": "Cyprus", "name_ar": "قبرص", "code": "+357", "countryCode": "CY"}, + { + "name": "Czech Republic", + "name_ar": "جمهورية التشيك", + "code": "+420", + "countryCode": "CZ" + }, + { + "name": "Denmark", + "name_ar": "الدنمارك", + "code": "+45", + "countryCode": "DK" + }, + { + "name": "Djibouti", + "name_ar": "جيبوتي", + "code": "+253", + "countryCode": "DJ" + }, + { + "name": "Dominica", + "name_ar": "دومينيكا", + "code": "+1 767", + "countryCode": "DM" + }, + { + "name": "Dominican Republic", + "name_ar": "جمهورية الدومنيكان", + "code": "+1 849", + "countryCode": "DO" + }, + { + "name": "Ecuador", + "name_ar": "الإكوادور", + "code": "+593", + "countryCode": "EC" + }, + {"name": "Egypt", "name_ar": "مصر", "code": "+20", "countryCode": "EG"}, + { + "name": "El Salvador", + "name_ar": "السلفادور", + "code": "+503", + "countryCode": "SV" + }, + { + "name": "Equatorial Guinea", + "name_ar": "غينيا الإستوائية", + "code": "+240", + "countryCode": "GQ" + }, + { + "name": "Eritrea", + "name_ar": "إريتريا", + "code": "+291", + "countryCode": "ER" + }, + { + "name": "Estonia", + "name_ar": "استونيا", + "code": "+372", + "countryCode": "EE" + }, + { + "name": "Ethiopia", + "name_ar": "أثيوبيا", + "code": "+251", + "countryCode": "ET" + }, + { + "name": "Falkland Islands (Malvinas)", + "name_ar": "جزر فوكلاند مالفيناس", + "code": "+500", + "countryCode": "FK" + }, + { + "name": "Faroe Islands", + "name_ar": "جزر صناعية", + "code": "+298", + "countryCode": "FO" + }, + {"name": "Fiji", "name_ar": "فيجي", "code": "+679", "countryCode": "FJ"}, + {"name": "Finland", "name_ar": "فنلندا", "code": "+358", "countryCode": "FI"}, + {"name": "France", "name_ar": "فرنسا", "code": "+33", "countryCode": "FR"}, + { + "name": "French Guiana", + "name_ar": "غيانا الفرنسية", + "code": "+594", + "countryCode": "GF" + }, + { + "name": "French Polynesia", + "name_ar": "بولينيزيا الفرنسية", + "code": "+689", + "countryCode": "PF" + }, + {"name": "Gabon", "name_ar": "الغابون", "code": "+241", "countryCode": "GA"}, + {"name": "Gambia", "name_ar": "غامبيا", "code": "+220", "countryCode": "GM"}, + {"name": "Georgia", "name_ar": "جورجيا", "code": "+995", "countryCode": "GE"}, + {"name": "Germany", "name_ar": "ألمانيا", "code": "+49", "countryCode": "DE"}, + {"name": "Ghana", "name_ar": "غانا", "code": "+233", "countryCode": "GH"}, + { + "name": "Gibraltar", + "name_ar": "جبل طارق", + "code": "+350", + "countryCode": "GI" + }, + {"name": "Greece", "name_ar": "اليونان", "code": "+30", "countryCode": "GR"}, + { + "name": "Greenland", + "name_ar": "الأرض الخضراء", + "code": "+299", + "countryCode": "GL" + }, + { + "name": "Grenada", + "name_ar": "غرينادا", + "code": "+1 473", + "countryCode": "GD" + }, + { + "name": "Guadeloupe", + "name_ar": "جوادلوب", + "code": "+590", + "countryCode": "GP" + }, + {"name": "Guam", "name_ar": "غوام", "code": "+1 671", "countryCode": "GU"}, + { + "name": "Guatemala", + "name_ar": "غواتيمالا", + "code": "+502", + "countryCode": "GT" + }, + {"name": "Guernsey", "name_ar": "غيرنسي", "code": "+44", "countryCode": "GG"}, + {"name": "Guinea", "name_ar": "غينيا", "code": "+224", "countryCode": "GN"}, + { + "name": "Guinea-Bissau", + "name_ar": "غينيا بيساو", + "code": "+245", + "countryCode": "GW" + }, + {"name": "Guyana", "name_ar": "غيانا", "code": "+595", "countryCode": "GY"}, + {"name": "Haiti", "name_ar": "هايتي", "code": "+509", "countryCode": "HT"}, + { + "name": "Holy See (Vatican City State)", + "name_ar": "الكرسي الرسولي دولة الفاتيكان", + "code": "+379", + "countryCode": "VA" + }, + { + "name": "Honduras", + "name_ar": "هندوراس", + "code": "+504", + "countryCode": "HN" + }, + { + "name": "Hong Kong", + "name_ar": "هونج كونج", + "code": "+852", + "countryCode": "HK" + }, + {"name": "Hungary", "name_ar": "اليونان", "code": "+36", "countryCode": "HU"}, + { + "name": "Iceland", + "name_ar": "أيسلندا", + "code": "+354", + "countryCode": "IS" + }, + {"name": "India", "name_ar": "الهند", "code": "+91", "countryCode": "IN"}, + { + "name": "Indonesia", + "name_ar": "أندونيسيا", + "code": "+62", + "countryCode": "ID" + }, + { + "name": "Iran, Islamic Republic of Persian Gulf", + "name_ar": "جمهورية إيران الإسلامية الخليج الفارسي", + "code": "+98", + "countryCode": "IR" + }, + {"name": "Iraq", "name_ar": "العراق", "code": "+964", "countryCode": "IQ"}, + { + "name": "Ireland", + "name_ar": "أيرلندا", + "code": "+353", + "countryCode": "IE" + }, + { + "name": "Isle of Man", + "name_ar": "جزيرة آيل أوف مان", + "code": "+44", + "countryCode": "IM" + }, + {"name": "Israel", "name_ar": "إسرائيل", "code": "+972", "countryCode": "IL"}, + {"name": "Italy", "name_ar": "إيطاليا", "code": "+39", "countryCode": "IT"}, + { + "name": "Jamaica", + "name_ar": "جامايكا", + "code": "+1 876", + "countryCode": "JM" + }, + {"name": "Japan", "name_ar": "اليابان", "code": "+81", "countryCode": "JP"}, + {"name": "Jersey", "name_ar": "جيرسي", "code": "+44", "countryCode": "JE"}, + {"name": "Jordan", "name_ar": "الأردن", "code": "+962", "countryCode": "JO"}, + { + "name": "Kazakhstan", + "name_ar": "كازاخستان", + "code": "+77", + "countryCode": "KZ" + }, + {"name": "Kenya", "name_ar": "كينيا", "code": "+254", "countryCode": "KE"}, + { + "name": "Kiribati", + "name_ar": "كيريباس", + "code": "+686", + "countryCode": "KI" + }, + { + "name": "Korea, Democratic People's Republic of Korea", + "name_ar": "جمهورية كوريا الديمقراطية الشعبية", + "code": "+850", + "countryCode": "KP" + }, + { + "name": "Korea, Republic of South Korea", + "name_ar": "جمهورية كوريا الديمقراطية الشعبية", + "code": "+82", + "countryCode": "KR" + }, + { + "name": "Kyrgyzstan", + "name_ar": "قرغيزستان", + "code": "+996", + "countryCode": "KG" + }, + {"name": "Laos", "name_ar": "لاوس", "code": "+856", "countryCode": "LA"}, + {"name": "Latvia", "name_ar": "لاتفيا", "code": "+371", "countryCode": "LV"}, + {"name": "Lebanon", "name_ar": "لبنان", "code": "+961", "countryCode": "LB"}, + {"name": "Lesotho", "name_ar": "ليسوتو", "code": "+266", "countryCode": "LS"}, + { + "name": "Liberia", + "name_ar": "ليبيريا", + "code": "+231", + "countryCode": "LR" + }, + { + "name": "Libyan Arab Jamahiriya", + "name_ar": "الجماهيرية العربية الليبية", + "code": "+218", + "countryCode": "LY" + }, + { + "name": "Liechtenstein", + "name_ar": "ليختنشتاين", + "code": "+423", + "countryCode": "LI" + }, + { + "name": "Lithuania", + "name_ar": "ليتوانيا", + "code": "+370", + "countryCode": "LT" + }, + { + "name": "Luxembourg", + "name_ar": "لوكسمبورغ", + "code": "+352", + "countryCode": "LU" + }, + {"name": "Macao", "name_ar": "ماكاو", "code": "+853", "countryCode": "MO"}, + { + "name": "Macedonia", + "name_ar": "مقدونيا", + "code": "+389", + "countryCode": "MK" + }, + { + "name": "Madagascar", + "name_ar": "مدغشقر", + "code": "+261", + "countryCode": "MG" + }, + {"name": "Malawi", "name_ar": "مالاوي", "code": "+265", "countryCode": "MW"}, + { + "name": "Malaysia", + "name_ar": "ماليزيا", + "code": "+60", + "countryCode": "MY" + }, + { + "name": "Maldives", + "name_ar": "جزر المالديف", + "code": "+960", + "countryCode": "MV" + }, + {"name": "Mali", "name_ar": "مالي", "code": "+223", "countryCode": "ML"}, + {"name": "Malta", "name_ar": "مالطا", "code": "+356", "countryCode": "MT"}, + { + "name": "Marshall Islands", + "name_ar": "جزر مارشال", + "code": "+692", + "countryCode": "MH" + }, + { + "name": "Martinique", + "name_ar": "مارتينيك", + "code": "+596", + "countryCode": "MQ" + }, + { + "name": "Mauritania", + "name_ar": "موريتانيا", + "code": "+222", + "countryCode": "MR" + }, + { + "name": "Mauritius", + "name_ar": "موريشيوس", + "code": "+230", + "countryCode": "MU" + }, + {"name": "Mayotte", "name_ar": "مايوت", "code": "+262", "countryCode": "YT"}, + {"name": "Mexico", "name_ar": "المكسيك", "code": "+52", "countryCode": "MX"}, + { + "name": "Micronesia, Federated States of Micronesia", + "name_ar": "ميكرونيزيا ، ولايات ميكرونيزيا الموحدة", + "code": "+691", + "countryCode": "FM" + }, + { + "name": "Moldova", + "name_ar": "مولدوفا", + "code": "+373", + "countryCode": "MD" + }, + {"name": "Monaco", "name_ar": "موناكو", "code": "+377", "countryCode": "MC"}, + { + "name": "Mongolia", + "name_ar": "منغوليا", + "code": "+976", + "countryCode": "MN" + }, + { + "name": "Montenegro", + "name_ar": "الجبل الأسود", + "code": "+382", + "countryCode": "ME" + }, + { + "name": "Montserrat", + "name_ar": "مونتسيرات", + "code": "+1664", + "countryCode": "MS" + }, + {"name": "Morocco", "name_ar": "المغرب", "code": "+212", "countryCode": "MA"}, + { + "name": "Mozambique", + "name_ar": "موزمبيق", + "code": "+258", + "countryCode": "MZ" + }, + {"name": "Myanmar", "name_ar": "ميانمار", "code": "+95", "countryCode": "MM"}, + { + "name": "Namibia", + "name_ar": "ناميبيا", + "code": "+264", + "countryCode": "NA" + }, + {"name": "Nauru", "name_ar": "ناورو", "code": "+674", "countryCode": "NR"}, + {"name": "Nepal", "name_ar": "نيبال", "code": "+977", "countryCode": "NP"}, + { + "name": "Netherlands", + "name_ar": "هولندا", + "code": "+31", + "countryCode": "NL" + }, + { + "name": "Netherlands Antilles", + "name_ar": "جزر الأنتيل الهولندية", + "code": "+599", + "countryCode": "AN" + }, + { + "name": "New Caledonia", + "name_ar": "كاليدونيا الجديدة", + "code": "+687", + "countryCode": "NC" + }, + { + "name": "New Zealand", + "name_ar": "نيوزيلندا", + "code": "+64", + "countryCode": "NZ" + }, + { + "name": "Nicaragua", + "name_ar": "نيكاراغوا", + "code": "+505", + "countryCode": "NI" + }, + {"name": "Niger", "name_ar": "النيجر", "code": "+227", "countryCode": "NE"}, + { + "name": "Nigeria", + "name_ar": "نيجيريا", + "code": "+234", + "countryCode": "NG" + }, + {"name": "Niue", "name_ar": "نيوي", "code": "+683", "countryCode": "NU"}, + { + "name": "Norfolk Island", + "name_ar": "جزيرة نورفولك", + "code": "+672", + "countryCode": "NF" + }, + { + "name": "Northern Mariana Islands", + "name_ar": "جزر مريانا الشمالية", + "code": "+1 670", + "countryCode": "MP" + }, + {"name": "Norway", "name_ar": "النرويج", "code": "+47", "countryCode": "NO"}, + { + "name": "Oman", + "name_ar": "سلطنة عمان", + "code": "+968", + "countryCode": "OM" + }, + { + "name": "Pakistan", + "name_ar": "باكستان", + "code": "+92", + "countryCode": "PK" + }, + {"name": "Palau", "name_ar": "بالاو", "code": "+680", "countryCode": "PW"}, + { + "name": "Palestinian Territory, Occupied", + "name_ar": "الأراضي الفلسطينية المحتلة", + "code": "+970", + "countryCode": "PS" + }, + {"name": "Panama", "name_ar": "بناما", "code": "+507", "countryCode": "PA"}, + { + "name": "Papua New Guinea", + "name_ar": "بابوا غينيا الجديدة", + "code": "+675", + "countryCode": "PG" + }, + { + "name": "Paraguay", + "name_ar": "باراغواي", + "code": "+595", + "countryCode": "PY" + }, + {"name": "Peru", "name_ar": "بيرو", "code": "+51", "countryCode": "PE"}, + { + "name": "Philippines", + "name_ar": "الفلبين", + "code": "+63", + "countryCode": "PH" + }, + { + "name": "Pitcairn", + "name_ar": "بيتكيرن", + "code": "+872", + "countryCode": "PN" + }, + {"name": "Poland", "name_ar": "بولندا", "code": "+48", "countryCode": "PL"}, + { + "name": "Portugal", + "name_ar": "البرتغال", + "code": "+351", + "countryCode": "PT" + }, + { + "name": "Puerto Rico", + "name_ar": "بورتوريكو", + "code": "+1 939", + "countryCode": "PR" + }, + {"name": "Qatar", "name_ar": "دولة قطر", "code": "+974", "countryCode": "QA"}, + {"name": "Romania", "name_ar": "رومانيا", "code": "+40", "countryCode": "RO"}, + {"name": "Russia", "name_ar": "روسيا", "code": "+7", "countryCode": "RU"}, + {"name": "Rwanda", "name_ar": "رواندا", "code": "+250", "countryCode": "RW"}, + { + "name": "Reunion", + "name_ar": "جمع شمل", + "code": "+262", + "countryCode": "RE" + }, + { + "name": "Saint Barthelemy", + "name_ar": "سانت بارتيليمي", + "code": "+590", + "countryCode": "BL" + }, + { + "name": "Saint Helena, Ascension and Tristan Da Cunha", + "name_ar": "سانت هيلانة ، أسنشن وتريستان دا كونها", + "code": "+290", + "countryCode": "SH" + }, + { + "name": "Saint Kitts and Nevis", + "name_ar": "سانت كيتس ونيفيس", + "code": "+1 869", + "countryCode": "KN" + }, + { + "name": "Saint Lucia", + "name_ar": "القديسة لوسيا", + "code": "+1 758", + "countryCode": "LC" + }, + { + "name": "Saint Martin", + "name_ar": "القديس مارتن", + "code": "+590", + "countryCode": "MF" + }, + { + "name": "Saint Pierre and Miquelon", + "name_ar": "سانت بيير وميكلون", + "code": "+508", + "countryCode": "PM" + }, + { + "name": "Saint Vincent and the Grenadines", + "name_ar": "سانت فنسنت وجزر غرينادين", + "code": "+1 784", + "countryCode": "VC" + }, + {"name": "Samoa", "name_ar": "ساموا", "code": "+685", "countryCode": "WS"}, + { + "name": "San Marino", + "name_ar": "سان مارينو", + "code": "+378", + "countryCode": "SM" + }, + { + "name": "Sao Tome and Principe", + "name_ar": "ساو تومي وبرينسيبي", + "code": "+239", + "countryCode": "ST" + }, + { + "name": "Senegal", + "name_ar": "السنغال", + "code": "+221", + "countryCode": "SN" + }, + {"name": "Serbia", "name_ar": "صربيا", "code": "+381", "countryCode": "RS"}, + { + "name": "Seychelles", + "name_ar": "سيشيل", + "code": "+248", + "countryCode": "SC" + }, + { + "name": "Sierra Leone", + "name_ar": "سيرا ليون", + "code": "+232", + "countryCode": "SL" + }, + { + "name": "Singapore", + "name_ar": "سنغافورة", + "code": "+65", + "countryCode": "SG" + }, + { + "name": "Slovakia", + "name_ar": "سلوفاكيا", + "code": "+421", + "countryCode": "SK" + }, + { + "name": "Slovenia", + "name_ar": "سلوفينيا", + "code": "+386", + "countryCode": "SI" + }, + { + "name": "Solomon Islands", + "name_ar": "جزر سليمان", + "code": "+677", + "countryCode": "SB" + }, + { + "name": "Somalia", + "name_ar": "الصومال", + "code": "+252", + "countryCode": "SO" + }, + { + "name": "South Africa", + "name_ar": "جنوب أفريقيا", + "code": "+27", + "countryCode": "ZA" + }, + { + "name": "South Georgia and the South Sandwich Islands", + "name_ar": "جورجيا الجنوبية وجزر ساندويتش الجنوبية", + "code": "+500", + "countryCode": "GS" + }, + {"name": "Spain", "name_ar": "إسبانيا", "code": "+34", "countryCode": "ES"}, + { + "name": "Sri Lanka", + "name_ar": "سيريلانكا", + "code": "+94", + "countryCode": "LK" + }, + {"name": "Sudan", "name_ar": "سودان", "code": "+249", "countryCode": "SD"}, + { + "name": "Suriname", + "name_ar": "سورينام", + "code": "+597", + "countryCode": "SR" + }, + { + "name": "Svalbard and Jan Mayen", + "name_ar": "سفالبارد وجان ماين", + "code": "+47", + "countryCode": "SJ" + }, + { + "name": "Swaziland", + "name_ar": "سوازيلاند", + "code": "+268", + "countryCode": "SZ" + }, + {"name": "Sweden", "name_ar": "السويد", "code": "+46", "countryCode": "SE"}, + { + "name": "Switzerland", + "name_ar": "سويسرا", + "code": "+41", + "countryCode": "CH" + }, + { + "name": "Syrian Arab Republic", + "name_ar": "الجمهورية العربية السورية", + "code": "+963", + "countryCode": "SY" + }, + {"name": "Taiwan", "name_ar": "تايوان", "code": "+886", "countryCode": "TW"}, + { + "name": "Tajikistan", + "name_ar": "طاجيكستان", + "code": "+992", + "countryCode": "TJ" + }, + { + "name": "Tanzania, United Republic of Tanzania", + "name_ar": "تنزانيا ، جمهورية تنزانيا المتحدة", + "code": "+255", + "countryCode": "TZ" + }, + { + "name": "Thailand", + "name_ar": "تايلاند", + "code": "+66", + "countryCode": "TH" + }, + { + "name": "Timor-Leste", + "name_ar": "تيمور الشرقية", + "code": "+670", + "countryCode": "TL" + }, + {"name": "Togo", "name_ar": "ليذهب", "code": "+228", "countryCode": "TG"}, + { + "name": "Tokelau", + "name_ar": "توكيلاو", + "code": "+690", + "countryCode": "TK" + }, + {"name": "Tonga", "name_ar": "تونغا", "code": "+676", "countryCode": "TO"}, + { + "name": "Trinidad and Tobago", + "name_ar": "ترينداد وتوباغو", + "code": "+1 868", + "countryCode": "TT" + }, + {"name": "Tunisia", "name_ar": "تونس", "code": "+216", "countryCode": "TN"}, + {"name": "Turkey", "name_ar": "ديك رومي", "code": "+90", "countryCode": "TR"}, + { + "name": "Turkmenistan", + "name_ar": "تركمانستان", + "code": "+993", + "countryCode": "TM" + }, + { + "name": "Turks and Caicos Islands", + "name_ar": "جزر تركس وكايكوس", + "code": "+1 649", + "countryCode": "TC" + }, + {"name": "Tuvalu", "name_ar": "توفالو", "code": "+688", "countryCode": "TV"}, + {"name": "Uganda", "name_ar": "أوغندا", "code": "+256", "countryCode": "UG"}, + { + "name": "Ukraine", + "name_ar": "أوكرانيا", + "code": "+380", + "countryCode": "UA" + }, + { + "name": "United Kingdom", + "name_ar": "المملكة المتحدة", + "code": "+44", + "countryCode": "GB" + }, + { + "name": "United States", + "name_ar": "الولايات المتحدة الامريكانية", + "code": "+1", + "countryCode": "US" + }, + { + "name": "Uruguay", + "name_ar": "أوروغواي", + "code": "+598", + "countryCode": "UY" + }, + { + "name": "Uzbekistan", + "name_ar": "أوزبكستان", + "code": "+998", + "countryCode": "UZ" + }, + { + "name": "Vanuatu", + "name_ar": "فانواتو", + "code": "+678", + "countryCode": "VU" + }, + { + "name": "Venezuela, Bolivarian Republic of Venezuela", + "name_ar": "فنزويلا ، جمهورية فنزويلا البوليفارية", + "code": "+58", + "countryCode": "VE" + }, + {"name": "Vietnam", "name_ar": "فيتنام", "code": "+84", "countryCode": "VN"}, + { + "name": "Virgin Islands, British", + "name_ar": "جزر العذراء البريطانية", + "code": "+1 284", + "countryCode": "VG" + }, + { + "name": "Virgin Islands, U.S.", + "name_ar": "جزر فيرجن ، الولايات المتحدة", + "code": "+1 340", + "countryCode": "VI" + }, + { + "name": "Wallis and Futuna", + "name_ar": "واليس وفوتونا", + "code": "+681", + "countryCode": "WF" + }, + {"name": "Yemen", "name_ar": "اليمن", "code": "+967", "countryCode": "YE"}, + {"name": "Zambia", "name_ar": "زامبيا", "code": "+260", "countryCode": "ZM"}, + { + "name": "Zimbabwe", + "name_ar": "زيمبابوي", + "code": "+263", + "countryCode": "ZW" + } +]; +// }); +// List countryList =[]; diff --git a/lib/models/discharge_summary/GetDischargeSummaryReqModel.dart b/lib/models/discharge_summary/GetDischargeSummaryReqModel.dart new file mode 100644 index 00000000..2d2c14ad --- /dev/null +++ b/lib/models/discharge_summary/GetDischargeSummaryReqModel.dart @@ -0,0 +1,27 @@ +class GetDischargeSummaryReqModel { + int patientID; + int admissionNo; + int patientType; + int patientTypeID; + + GetDischargeSummaryReqModel( + {this.patientID, this.admissionNo, this.patientType = 1, this.patientTypeID=1}); + + GetDischargeSummaryReqModel.fromJson(Map json) { + patientID = json['PatientID']; + admissionNo = json['AdmissionNo']; + patientType = json['PatientType']; + patientTypeID = json['PatientTypeID']; + } + + Map toJson() { + final Map data = new Map(); + data['PatientID'] = this.patientID; + data['AdmissionNo'] = this.admissionNo; + data['PatientType'] = this.patientType; + data['PatientTypeID'] = this.patientTypeID; + data['SetupID'] = "010266"; + data['isDentalAllowedBackend'] = false; + return data; + } +} diff --git a/lib/models/discharge_summary/GetDischargeSummaryResModel.dart b/lib/models/discharge_summary/GetDischargeSummaryResModel.dart new file mode 100644 index 00000000..10ddab00 --- /dev/null +++ b/lib/models/discharge_summary/GetDischargeSummaryResModel.dart @@ -0,0 +1,201 @@ +class GetDischargeSummaryResModel { + String setupID; + int projectID; + int dischargeNo; + String dischargeDate; + int admissionNo; + int assessmentNo; + int patientType; + int patientID; + int clinicID; + int doctorID; + String finalDiagnosis; + String persentation; + String pastHistory; + String planOfCare; + String investigations; + String followupPlan; + String conditionOnDischarge; + String significantFindings; + String planedProcedure; + int daysStayed; + String remarks; + String eRCare; + int status; + bool isActive; + int createdBy; + String createdOn; + int editedBy; + String editedOn; + bool isPatientDied; + dynamic isMedicineApproved; + dynamic isOpenBillDischarge; + dynamic activatedDate; + dynamic activatedBy; + dynamic lAMA; + dynamic patientCodition; + dynamic others; + dynamic reconciliationInstruction; + String dischargeInstructions; + String reason; + dynamic dischargeDisposition; + dynamic hospitalID; + String createdByName; + dynamic createdByNameN; + String editedByName; + dynamic editedByNameN; + String clinicName; + String projectName; + + GetDischargeSummaryResModel( + {this.setupID, + this.projectID, + this.dischargeNo, + this.dischargeDate, + this.admissionNo, + this.assessmentNo, + this.patientType, + this.patientID, + this.clinicID, + this.doctorID, + this.finalDiagnosis, + this.persentation, + this.pastHistory, + this.planOfCare, + this.investigations, + this.followupPlan, + this.conditionOnDischarge, + this.significantFindings, + this.planedProcedure, + this.daysStayed, + this.remarks, + this.eRCare, + this.status, + this.isActive, + this.createdBy, + this.createdOn, + this.editedBy, + this.editedOn, + this.isPatientDied, + this.isMedicineApproved, + this.isOpenBillDischarge, + this.activatedDate, + this.activatedBy, + this.lAMA, + this.patientCodition, + this.others, + this.reconciliationInstruction, + this.dischargeInstructions, + this.reason, + this.dischargeDisposition, + this.hospitalID, + this.createdByName, + this.createdByNameN, + this.editedByName, + this.editedByNameN, + this.clinicName, + this.projectName}); + + GetDischargeSummaryResModel.fromJson(Map json) { + setupID = json['SetupID']; + projectID = json['ProjectID']; + dischargeNo = json['DischargeNo']; + dischargeDate = json['DischargeDate']; + admissionNo = json['AdmissionNo']; + assessmentNo = json['AssessmentNo']; + patientType = json['PatientType']; + patientID = json['PatientID']; + clinicID = json['ClinicID']; + doctorID = json['DoctorID']; + finalDiagnosis = json['FinalDiagnosis']; + persentation = json['Persentation']; + pastHistory = json['PastHistory']; + planOfCare = json['PlanOfCare']; + investigations = json['Investigations']; + followupPlan = json['FollowupPlan']; + conditionOnDischarge = json['ConditionOnDischarge']; + significantFindings = json['SignificantFindings']; + planedProcedure = json['PlanedProcedure']; + daysStayed = json['DaysStayed']; + remarks = json['Remarks']; + eRCare = json['ERCare']; + status = json['Status']; + isActive = json['IsActive']; + createdBy = json['CreatedBy']; + createdOn = json['CreatedOn']; + editedBy = json['EditedBy']; + editedOn = json['EditedOn']; + isPatientDied = json['IsPatientDied']; + isMedicineApproved = json['IsMedicineApproved']; + isOpenBillDischarge = json['IsOpenBillDischarge']; + activatedDate = json['ActivatedDate']; + activatedBy = json['ActivatedBy']; + lAMA = json['LAMA']; + patientCodition = json['PatientCodition']; + others = json['Others']; + reconciliationInstruction = json['ReconciliationInstruction']; + dischargeInstructions = json['DischargeInstructions']; + reason = json['Reason']; + dischargeDisposition = json['DischargeDisposition']; + hospitalID = json['HospitalID']; + createdByName = json['CreatedByName']; + createdByNameN = json['CreatedByNameN']; + editedByName = json['EditedByName']; + editedByNameN = json['EditedByNameN']; + clinicName = json['ClinicDescription']; + projectName = json['ProjectName']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['ProjectID'] = this.projectID; + data['DischargeNo'] = this.dischargeNo; + data['DischargeDate'] = this.dischargeDate; + data['AdmissionNo'] = this.admissionNo; + data['AssessmentNo'] = this.assessmentNo; + data['PatientType'] = this.patientType; + data['PatientID'] = this.patientID; + data['ClinicID'] = this.clinicID; + data['DoctorID'] = this.doctorID; + data['FinalDiagnosis'] = this.finalDiagnosis; + data['Persentation'] = this.persentation; + data['PastHistory'] = this.pastHistory; + data['PlanOfCare'] = this.planOfCare; + data['Investigations'] = this.investigations; + data['FollowupPlan'] = this.followupPlan; + data['ConditionOnDischarge'] = this.conditionOnDischarge; + data['SignificantFindings'] = this.significantFindings; + data['PlanedProcedure'] = this.planedProcedure; + data['DaysStayed'] = this.daysStayed; + data['Remarks'] = this.remarks; + data['ERCare'] = this.eRCare; + data['Status'] = this.status; + data['IsActive'] = this.isActive; + data['CreatedBy'] = this.createdBy; + data['CreatedOn'] = this.createdOn; + data['EditedBy'] = this.editedBy; + data['EditedOn'] = this.editedOn; + data['IsPatientDied'] = this.isPatientDied; + data['IsMedicineApproved'] = this.isMedicineApproved; + data['IsOpenBillDischarge'] = this.isOpenBillDischarge; + data['ActivatedDate'] = this.activatedDate; + data['ActivatedBy'] = this.activatedBy; + data['LAMA'] = this.lAMA; + data['PatientCodition'] = this.patientCodition; + data['Others'] = this.others; + data['ReconciliationInstruction'] = this.reconciliationInstruction; + data['DischargeInstructions'] = this.dischargeInstructions; + data['Reason'] = this.reason; + data['DischargeDisposition'] = this.dischargeDisposition; + data['HospitalID'] = this.hospitalID; + data['CreatedByName'] = this.createdByName; + data['CreatedByNameN'] = this.createdByNameN; + data['EditedByName'] = this.editedByName; + data['EditedByNameN'] = this.editedByNameN; + data['ClinicDescription'] = this.clinicName; + data['ProjectName'] = this.projectName; + + return data; + } +} diff --git a/lib/models/doctor/profile_req_Model.dart b/lib/models/doctor/profile_req_Model.dart index 8f2ef985..115f389d 100644 --- a/lib/models/doctor/profile_req_Model.dart +++ b/lib/models/doctor/profile_req_Model.dart @@ -24,14 +24,14 @@ class ProfileReqModel { {this.projectID, this.clinicID, this.doctorID, - this.isRegistered =true, + this.isRegistered = true, this.license, this.languageID, this.stamp = '2020-04-26T09:32:18.317Z', - this.iPAdress='11.11.11.11', - this.versionID=5.5, - this.channel=9, - this.sessionID='E2bsEeYEJo', + this.iPAdress = '11.11.11.11', + // this.versionID=5.5, + this.channel = 9, + this.sessionID = 'E2bsEeYEJo', this.tokenID, this.isLoginForDoctorApp = true}); diff --git a/lib/models/operation_report/create_update_operation_report_request_model.dart b/lib/models/operation_report/create_update_operation_report_request_model.dart new file mode 100644 index 00000000..f6d72b1b --- /dev/null +++ b/lib/models/operation_report/create_update_operation_report_request_model.dart @@ -0,0 +1,108 @@ +class CreateUpdateOperationReportRequestModel { + String setupID; + int patientID; + int reservationNo; + int admissionNo; + String preOpDiagmosis; + String postOpDiagmosis; + String surgeon; + String assistant; + String anasthetist; + String operation; + String inasion; + String finding; + String surgeryProcedure; + String postOpInstruction; + int createdBy; + int editedBy; + String complicationDetails; + String bloodLossDetail; + String histopathSpecimen; + String microbiologySpecimen; + String otherSpecimen; + String scrubNurse; + String circulatingNurse; + String bloodTransfusedDetail; + + CreateUpdateOperationReportRequestModel( + {this.setupID, + this.patientID, + this.reservationNo, + this.admissionNo, + this.preOpDiagmosis, + this.postOpDiagmosis, + this.surgeon, + this.assistant, + this.anasthetist, + this.operation, + this.inasion, + this.finding, + this.surgeryProcedure, + this.postOpInstruction, + this.createdBy, + this.editedBy, + this.complicationDetails, + this.bloodLossDetail, + this.histopathSpecimen, + this.microbiologySpecimen, + this.otherSpecimen, + this.scrubNurse, + this.circulatingNurse, + this.bloodTransfusedDetail}); + + CreateUpdateOperationReportRequestModel.fromJson(Map json) { + setupID = json['SetupID']; + patientID = json['PatientID']; + reservationNo = json['reservationNo']; + admissionNo = json['AdmissionNo']; + preOpDiagmosis = json['preOpDiagmosis']; + postOpDiagmosis = json['postOpDiagmosis']; + surgeon = json['surgeon']; + assistant = json['assistant']; + anasthetist = json['anasthetist']; + operation = json['operation']; + inasion = json['inasion']; + finding = json['finding']; + surgeryProcedure = json['surgeryProcedure']; + postOpInstruction = json['postOpInstruction']; + createdBy = json['CreatedBy']; + editedBy = json['EditedBy']; + complicationDetails = json['complicationDetails']; + bloodLossDetail = json['bloodLossDetail']; + histopathSpecimen = json['histopathSpecimen']; + microbiologySpecimen = json['microbiologySpecimen']; + otherSpecimen = json['otherSpecimen']; + scrubNurse = json['scrubNurse']; + circulatingNurse = json['circulatingNurse']; + bloodTransfusedDetail = json['BloodTransfusedDetail']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['PatientID'] = this.patientID; + data['reservationNo'] = this.reservationNo; + data['AdmissionNo'] = this.admissionNo; + data['preOpDiagmosis'] = this.preOpDiagmosis; + data['postOpDiagmosis'] = this.postOpDiagmosis; + data['surgeon'] = this.surgeon; + data['assistant'] = this.assistant; + data['anasthetist'] = this.anasthetist; + data['operation'] = this.operation; + data['inasion'] = this.inasion; + data['finding'] = this.finding; + data['surgeryProcedure'] = this.surgeryProcedure; + data['postOpInstruction'] = this.postOpInstruction; + data['CreatedBy'] = this.createdBy; + data['EditedBy'] = this.editedBy; + data['complicationDetails'] = this.complicationDetails; + data['bloodLossDetail'] = this.bloodLossDetail; + data['histopathSpecimen'] = this.histopathSpecimen; + data['microbiologySpecimen'] = this.microbiologySpecimen; + data['otherSpecimen'] = this.otherSpecimen; + data['scrubNurse'] = this.scrubNurse; + data['circulatingNurse'] = this.circulatingNurse; + data['BloodTransfusedDetail'] = this.bloodTransfusedDetail; + return data; + } +} diff --git a/lib/models/operation_report/get_operation_details_request_modle.dart b/lib/models/operation_report/get_operation_details_request_modle.dart new file mode 100644 index 00000000..7e23b503 --- /dev/null +++ b/lib/models/operation_report/get_operation_details_request_modle.dart @@ -0,0 +1,68 @@ +class GetOperationDetailsRequestModel { + bool isDentalAllowedBackend; + double versionID; + int channel; + int languageID; + String iPAdress; + String generalid; + int deviceTypeID; + String tokenID; + int patientID; + int reservationNo; + String sessionID; + int projectID; + String setupID; + bool patientOutSA; + + GetOperationDetailsRequestModel( + {this.isDentalAllowedBackend = false, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.deviceTypeID, + this.tokenID, + this.patientID, + this.reservationNo, + this.sessionID, + this.projectID, + this.setupID, + this.patientOutSA}); + + GetOperationDetailsRequestModel.fromJson(Map json) { + isDentalAllowedBackend = json['isDentalAllowedBackend']; + versionID = json['VersionID']; + channel = json['Channel']; + languageID = json['LanguageID']; + iPAdress = json['IPAdress']; + generalid = json['generalid']; + deviceTypeID = json['DeviceTypeID']; + tokenID = json['TokenID']; + patientID = json['PatientID']; + reservationNo = json['reservationNo']; + sessionID = json['SessionID']; + projectID = json['ProjectID']; + setupID = json['SetupID']; + patientOutSA = json['PatientOutSA']; + } + + Map toJson() { + final Map data = new Map(); + data['isDentalAllowedBackend'] = this.isDentalAllowedBackend; + data['VersionID'] = this.versionID; + data['Channel'] = this.channel; + data['LanguageID'] = this.languageID; + data['IPAdress'] = this.iPAdress; + data['generalid'] = this.generalid; + data['DeviceTypeID'] = this.deviceTypeID; + data['TokenID'] = this.tokenID; + data['PatientID'] = this.patientID; + data['reservationNo'] = this.reservationNo; + data['SessionID'] = this.sessionID; + data['ProjectID'] = this.projectID; + data['SetupID'] = this.setupID; + data['PatientOutSA'] = this.patientOutSA; + return data; + } +} diff --git a/lib/models/operation_report/get_operation_details_response_modle.dart b/lib/models/operation_report/get_operation_details_response_modle.dart new file mode 100644 index 00000000..04540ea6 --- /dev/null +++ b/lib/models/operation_report/get_operation_details_response_modle.dart @@ -0,0 +1,148 @@ +class GetOperationDetailsResponseModel { + String setupID; + int projectID; + int reservationNo; + int patientID; + int admissionID; + dynamic surgeryDate; + String preOpDiagnosis; + String postOpDiagnosis; + String surgeon; + String assistant; + String anasthetist; + String operation; + String inasion; + String finding; + String surgeryProcedure; + String postOpInstruction; + bool isActive; + int createdBy; + String createdName; + dynamic createdNameN; + String createdOn; + dynamic editedBy; + dynamic editedByName; + dynamic editedByNameN; + dynamic editedOn; + dynamic oRBookStatus; + String complicationDetail; + String bloodLossDetail; + String histopathSpecimen; + String microbiologySpecimen; + String otherSpecimen; + dynamic scrubNurse; + dynamic circulatingNurse; + dynamic bloodTransfusedDetail; + + GetOperationDetailsResponseModel( + {this.setupID, + this.projectID, + this.reservationNo, + this.patientID, + this.admissionID, + this.surgeryDate, + this.preOpDiagnosis, + this.postOpDiagnosis, + this.surgeon, + this.assistant, + this.anasthetist, + this.operation, + this.inasion, + this.finding, + this.surgeryProcedure, + this.postOpInstruction, + this.isActive, + this.createdBy, + this.createdName, + this.createdNameN, + this.createdOn, + this.editedBy, + this.editedByName, + this.editedByNameN, + this.editedOn, + this.oRBookStatus, + this.complicationDetail, + this.bloodLossDetail, + this.histopathSpecimen, + this.microbiologySpecimen, + this.otherSpecimen, + this.scrubNurse, + this.circulatingNurse, + this.bloodTransfusedDetail}); + + GetOperationDetailsResponseModel.fromJson(Map json) { + setupID = json['SetupID']; + projectID = json['ProjectID']; + reservationNo = json['ReservationNo']; + patientID = json['PatientID']; + admissionID = json['AdmissionID']; + surgeryDate = json['SurgeryDate']; + preOpDiagnosis = json['PreOpDiagnosis']; + postOpDiagnosis = json['PostOpDiagnosis']; + surgeon = json['Surgeon']; + assistant = json['Assistant']; + anasthetist = json['Anasthetist']; + operation = json['Operation']; + inasion = json['Inasion']; + finding = json['Finding']; + surgeryProcedure = json['SurgeryProcedure']; + postOpInstruction = json['PostOpInstruction']; + isActive = json['IsActive']; + createdBy = json['CreatedBy']; + createdName = json['CreatedName']; + createdNameN = json['CreatedNameN']; + createdOn = json['CreatedOn']; + editedBy = json['EditedBy']; + editedByName = json['EditedByName']; + editedByNameN = json['EditedByNameN']; + editedOn = json['EditedOn']; + oRBookStatus = json['ORBookStatus']; + complicationDetail = json['ComplicationDetail']; + bloodLossDetail = json['BloodLossDetail']; + histopathSpecimen = json['HistopathSpecimen']; + microbiologySpecimen = json['MicrobiologySpecimen']; + otherSpecimen = json['OtherSpecimen']; + scrubNurse = json['ScrubNurse']; + circulatingNurse = json['CirculatingNurse']; + bloodTransfusedDetail = json['BloodTransfusedDetail']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['ProjectID'] = this.projectID; + data['ReservationNo'] = this.reservationNo; + data['PatientID'] = this.patientID; + data['AdmissionID'] = this.admissionID; + data['SurgeryDate'] = this.surgeryDate; + data['PreOpDiagnosis'] = this.preOpDiagnosis; + data['PostOpDiagnosis'] = this.postOpDiagnosis; + data['Surgeon'] = this.surgeon; + data['Assistant'] = this.assistant; + data['Anasthetist'] = this.anasthetist; + data['Operation'] = this.operation; + data['Inasion'] = this.inasion; + data['Finding'] = this.finding; + data['SurgeryProcedure'] = this.surgeryProcedure; + data['PostOpInstruction'] = this.postOpInstruction; + data['IsActive'] = this.isActive; + data['CreatedBy'] = this.createdBy; + data['CreatedName'] = this.createdName; + data['CreatedNameN'] = this.createdNameN; + data['CreatedOn'] = this.createdOn; + data['EditedBy'] = this.editedBy; + data['EditedByName'] = this.editedByName; + data['EditedByNameN'] = this.editedByNameN; + data['EditedOn'] = this.editedOn; + data['ORBookStatus'] = this.oRBookStatus; + data['ComplicationDetail'] = this.complicationDetail; + data['BloodLossDetail'] = this.bloodLossDetail; + data['HistopathSpecimen'] = this.histopathSpecimen; + data['MicrobiologySpecimen'] = this.microbiologySpecimen; + data['OtherSpecimen'] = this.otherSpecimen; + data['ScrubNurse'] = this.scrubNurse; + data['CirculatingNurse'] = this.circulatingNurse; + data['BloodTransfusedDetail'] = this.bloodTransfusedDetail; + return data; + } +} diff --git a/lib/models/operation_report/get_reservations_request_model.dart b/lib/models/operation_report/get_reservations_request_model.dart new file mode 100644 index 00000000..06425254 --- /dev/null +++ b/lib/models/operation_report/get_reservations_request_model.dart @@ -0,0 +1,64 @@ +class GetReservationsRequestModel { + int patientID; + int projectID; + String doctorID; + int clinicID; + double versionID; + int channel; + int languageID; + String iPAdress; + String generalid; + bool patientOutSA; + int deviceTypeID; + String tokenID; + String sessionID; + + GetReservationsRequestModel( + {this.patientID, + this.projectID, + this.doctorID, + this.clinicID, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.deviceTypeID, + this.tokenID, + this.sessionID}); + + GetReservationsRequestModel.fromJson(Map json) { + patientID = json['PatientID']; + projectID = json['ProjectID']; + doctorID = json['DoctorID']; + clinicID = json['ClinicID']; + versionID = json['VersionID']; + channel = json['Channel']; + languageID = json['LanguageID']; + iPAdress = json['IPAdress']; + generalid = json['generalid']; + patientOutSA = json['PatientOutSA']; + deviceTypeID = json['DeviceTypeID']; + tokenID = json['TokenID']; + sessionID = json['SessionID']; + } + + Map toJson() { + final Map data = new Map(); + data['PatientID'] = this.patientID; + data['ProjectID'] = this.projectID; + data['DoctorID'] = this.doctorID; + data['ClinicID'] = this.clinicID; + data['VersionID'] = this.versionID; + data['Channel'] = this.channel; + data['LanguageID'] = this.languageID; + data['IPAdress'] = this.iPAdress; + data['generalid'] = this.generalid; + data['PatientOutSA'] = this.patientOutSA; + data['DeviceTypeID'] = this.deviceTypeID; + data['TokenID'] = this.tokenID; + data['SessionID'] = this.sessionID; + return data; + } +} diff --git a/lib/models/operation_report/get_reservations_response_model.dart b/lib/models/operation_report/get_reservations_response_model.dart new file mode 100644 index 00000000..3bebdc8b --- /dev/null +++ b/lib/models/operation_report/get_reservations_response_model.dart @@ -0,0 +1,152 @@ +class GetReservationsResponseModel { + String setupID; + int projectID; + int oTReservationID; + String oTReservationDate; + String oTReservationDateN; + int oTID; + int admissionRequestNo; + int admissionNo; + int primaryDoctorID; + int patientType; + int patientID; + int patientStatusType; + int clinicID; + int doctorID; + String operationDate; + int operationType; + String endDate; + String timeStart; + String timeEnd; + dynamic remarks; + int status; + int createdBy; + String createdOn; + int editedBy; + String editedOn; + String patientName; + Null patientNameN; + Null gender; + String dateofBirth; + String mobileNumber; + String emailAddress; + String doctorName; + Null doctorNameN; + String clinicDescription; + Null clinicDescriptionN; + + GetReservationsResponseModel( + {this.setupID, + this.projectID, + this.oTReservationID, + this.oTReservationDate, + this.oTReservationDateN, + this.oTID, + this.admissionRequestNo, + this.admissionNo, + this.primaryDoctorID, + this.patientType, + this.patientID, + this.patientStatusType, + this.clinicID, + this.doctorID, + this.operationDate, + this.operationType, + this.endDate, + this.timeStart, + this.timeEnd, + this.remarks, + this.status, + this.createdBy, + this.createdOn, + this.editedBy, + this.editedOn, + this.patientName, + this.patientNameN, + this.gender, + this.dateofBirth, + this.mobileNumber, + this.emailAddress, + this.doctorName, + this.doctorNameN, + this.clinicDescription, + this.clinicDescriptionN}); + + GetReservationsResponseModel.fromJson(Map json) { + setupID = json['SetupID']; + projectID = json['ProjectID']; + oTReservationID = json['OTReservationID']; + oTReservationDate = json['OTReservationDate']; + oTReservationDateN = json['OTReservationDateN']; + oTID = json['OTID']; + admissionRequestNo = json['AdmissionRequestNo']; + admissionNo = json['AdmissionNo']; + primaryDoctorID = json['PrimaryDoctorID']; + patientType = json['PatientType']; + patientID = json['PatientID']; + patientStatusType = json['PatientStatusType']; + clinicID = json['ClinicID']; + doctorID = json['DoctorID']; + operationDate = json['OperationDate']; + operationType = json['OperationType']; + endDate = json['EndDate']; + timeStart = json['TimeStart']; + timeEnd = json['TimeEnd']; + remarks = json['Remarks']; + status = json['Status']; + createdBy = json['CreatedBy']; + createdOn = json['CreatedOn']; + editedBy = json['EditedBy']; + editedOn = json['EditedOn']; + patientName = json['PatientName']; + patientNameN = json['PatientNameN']; + gender = json['Gender']; + dateofBirth = json['DateofBirth']; + mobileNumber = json['MobileNumber']; + emailAddress = json['EmailAddress']; + doctorName = json['DoctorName']; + doctorNameN = json['DoctorNameN']; + clinicDescription = json['ClinicDescription']; + clinicDescriptionN = json['ClinicDescriptionN']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['ProjectID'] = this.projectID; + data['OTReservationID'] = this.oTReservationID; + data['OTReservationDate'] = this.oTReservationDate; + data['OTReservationDateN'] = this.oTReservationDateN; + data['OTID'] = this.oTID; + data['AdmissionRequestNo'] = this.admissionRequestNo; + data['AdmissionNo'] = this.admissionNo; + data['PrimaryDoctorID'] = this.primaryDoctorID; + data['PatientType'] = this.patientType; + data['PatientID'] = this.patientID; + data['PatientStatusType'] = this.patientStatusType; + data['ClinicID'] = this.clinicID; + data['DoctorID'] = this.doctorID; + data['OperationDate'] = this.operationDate; + data['OperationType'] = this.operationType; + data['EndDate'] = this.endDate; + data['TimeStart'] = this.timeStart; + data['TimeEnd'] = this.timeEnd; + data['Remarks'] = this.remarks; + data['Status'] = this.status; + data['CreatedBy'] = this.createdBy; + data['CreatedOn'] = this.createdOn; + data['EditedBy'] = this.editedBy; + data['EditedOn'] = this.editedOn; + data['PatientName'] = this.patientName; + data['PatientNameN'] = this.patientNameN; + data['Gender'] = this.gender; + data['DateofBirth'] = this.dateofBirth; + data['MobileNumber'] = this.mobileNumber; + data['EmailAddress'] = this.emailAddress; + data['DoctorName'] = this.doctorName; + data['DoctorNameN'] = this.doctorNameN; + data['ClinicDescription'] = this.clinicDescription; + data['ClinicDescriptionN'] = this.clinicDescriptionN; + return data; + } +} diff --git a/lib/models/patient/get_clinic_by_project_id_request.dart b/lib/models/patient/get_clinic_by_project_id_request.dart index 09198dc0..47122bf1 100644 --- a/lib/models/patient/get_clinic_by_project_id_request.dart +++ b/lib/models/patient/get_clinic_by_project_id_request.dart @@ -40,7 +40,6 @@ class ClinicByProjectIdRequest { this.languageID = 2, this.stamp = "2020-06-03T11:18:19.979Z", this.iPAdress = "11.11.11.11", - this.versionID = 5.5, this.channel = 9, this.tokenID, this.sessionID = "JBXRsDl37L", @@ -53,7 +52,6 @@ class ClinicByProjectIdRequest { languageID = json['LanguageID']; stamp = json['stamp']; iPAdress = json['IPAdress']; - versionID = json['VersionID']; channel = json['Channel']; tokenID = json['TokenID']; sessionID = json['SessionID']; @@ -68,7 +66,6 @@ class ClinicByProjectIdRequest { data['LanguageID'] = this.languageID; data['stamp'] = this.stamp; data['IPAdress'] = this.iPAdress; - data['VersionID'] = this.versionID; data['Channel'] = this.channel; data['TokenID'] = this.tokenID; data['SessionID'] = this.sessionID; diff --git a/lib/models/patient/get_list_stp_referral_frequency_request.dart b/lib/models/patient/get_list_stp_referral_frequency_request.dart index 7f466deb..edae9f18 100644 --- a/lib/models/patient/get_list_stp_referral_frequency_request.dart +++ b/lib/models/patient/get_list_stp_referral_frequency_request.dart @@ -37,7 +37,6 @@ class STPReferralFrequencyRequest { {this.languageID = 2, this.stamp = "2020-06-03T11:18:19.986Z", this.iPAdress = "11.11.11.11", - this.versionID = 5.8, this.channel = 9, this.tokenID, this.sessionID = "JBXRsDl37L", diff --git a/lib/models/patient/progress_note_request.dart b/lib/models/patient/progress_note_request.dart index fe0add5f..13e1b571 100644 --- a/lib/models/patient/progress_note_request.dart +++ b/lib/models/patient/progress_note_request.dart @@ -35,8 +35,6 @@ class ProgressNoteRequest { bool isLoginForDoctorApp; bool patientOutSA; int patientTypeID; - double versionID; - ProgressNoteRequest( {this.visitType , this.admissionNo, @@ -49,7 +47,6 @@ class ProgressNoteRequest { this.sessionID = "LlBk8lUEJY", this.isLoginForDoctorApp = true, this.patientTypeID = 1, - this.versionID = 5.5, this.patientOutSA = false}); ProgressNoteRequest.fromJson(Map json) { @@ -65,7 +62,6 @@ class ProgressNoteRequest { isLoginForDoctorApp = json['IsLoginForDoctorApp']; patientOutSA = json['PatientOutSA']; patientTypeID = json['PatientTypeID']; - versionID = json['VersionID']; } Map toJson() { @@ -82,7 +78,6 @@ class ProgressNoteRequest { data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp; data['PatientOutSA'] = this.patientOutSA; data['PatientTypeID'] = this.patientTypeID; - data['VersionID'] = this.versionID; return data; } } \ No newline at end of file diff --git a/lib/models/patient/vital_sign/vital_sign_req_model.dart b/lib/models/patient/vital_sign/vital_sign_req_model.dart index 2cfd24c2..8f5be6ba 100644 --- a/lib/models/patient/vital_sign/vital_sign_req_model.dart +++ b/lib/models/patient/vital_sign/vital_sign_req_model.dart @@ -31,7 +31,6 @@ class VitalSignReqModel { this.tokenID, this.stamp = '2020-04-26T09:32:18.317Z', this.iPAdress='11.11.11.11', - this.versionID=5.8, this.channel=9, this.sessionID='E2bsEeYEJo', this.isLoginForDoctorApp=true, diff --git a/lib/models/pending_orders/pending_order_request_model.dart b/lib/models/pending_orders/pending_order_request_model.dart new file mode 100644 index 00000000..c69cf780 --- /dev/null +++ b/lib/models/pending_orders/pending_order_request_model.dart @@ -0,0 +1,76 @@ +class PendingOrderRequestModel { + bool isDentalAllowedBackend; + double versionID; + int channel; + int languageID; + String iPAdress; + String generalid; + int deviceTypeID; + String tokenID; + int patientID; + int admissionNo; + String sessionID; + int projectID; + String setupID; + bool patientOutSA; + int patientType; + int patientTypeID; + + PendingOrderRequestModel( + {this.isDentalAllowedBackend, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.deviceTypeID, + this.tokenID, + this.patientID, + this.admissionNo, + this.sessionID, + this.projectID, + this.setupID, + this.patientOutSA, + this.patientType, + this.patientTypeID}); + + PendingOrderRequestModel.fromJson(Map json) { + isDentalAllowedBackend = json['isDentalAllowedBackend']; + versionID = json['VersionID']; + channel = json['Channel']; + languageID = json['LanguageID']; + iPAdress = json['IPAdress']; + generalid = json['generalid']; + deviceTypeID = json['DeviceTypeID']; + tokenID = json['TokenID']; + patientID = json['PatientID']; + admissionNo = json['AdmissionNo']; + sessionID = json['SessionID']; + projectID = json['ProjectID']; + setupID = json['SetupID']; + patientOutSA = json['PatientOutSA']; + patientType = json['PatientType']; + patientTypeID = json['PatientTypeID']; + } + + Map toJson() { + final Map data = new Map(); + data['isDentalAllowedBackend'] = this.isDentalAllowedBackend; + data['VersionID'] = this.versionID; + data['Channel'] = this.channel; + data['LanguageID'] = this.languageID; + data['IPAdress'] = this.iPAdress; + data['generalid'] = this.generalid; + data['DeviceTypeID'] = this.deviceTypeID; + data['TokenID'] = this.tokenID; + data['PatientID'] = this.patientID; + data['AdmissionNo'] = this.admissionNo; + data['SessionID'] = this.sessionID; + data['ProjectID'] = this.projectID; + data['SetupID'] = this.setupID; + data['PatientOutSA'] = this.patientOutSA; + data['PatientType'] = this.patientType; + data['PatientTypeID'] = this.patientTypeID; + return data; + } +} diff --git a/lib/models/pending_orders/pending_orders_model.dart b/lib/models/pending_orders/pending_orders_model.dart new file mode 100644 index 00000000..89525369 --- /dev/null +++ b/lib/models/pending_orders/pending_orders_model.dart @@ -0,0 +1,15 @@ +class PendingOrderModel { + String notes; + + PendingOrderModel({this.notes}); + + PendingOrderModel.fromJson(Map json) { + notes = json['Notes']; + } + + Map toJson() { + final Map data = new Map(); + data['Notes'] = this.notes; + return data; + } +} diff --git a/lib/models/pharmacies/pharmacies_List_request_model.dart b/lib/models/pharmacies/pharmacies_List_request_model.dart index 90b5c378..a00e217a 100644 --- a/lib/models/pharmacies/pharmacies_List_request_model.dart +++ b/lib/models/pharmacies/pharmacies_List_request_model.dart @@ -26,7 +26,6 @@ class PharmaciesListRequestModel { this.languageID = 2, this.stamp = '2020-04-23T21:01:21.492Z', this.ipAdress = '11.11.11.11', - this.versionID = 5.5, this.tokenID, this.sessionID = 'e29zoooEJ4', this.isLoginForDoctorApp = true, diff --git a/lib/models/pharmacies/pharmacies_items_request_model.dart b/lib/models/pharmacies/pharmacies_items_request_model.dart index 4f2e947a..e81ce9b3 100644 --- a/lib/models/pharmacies/pharmacies_items_request_model.dart +++ b/lib/models/pharmacies/pharmacies_items_request_model.dart @@ -10,7 +10,6 @@ class PharmaciesItemsRequestModel { String pHRItemName; int pageIndex = 0; int pageSize = 20; - double versionID = 5.5; int channel = 3; int languageID = 2; String iPAdress = "10.20.10.20"; @@ -24,7 +23,6 @@ class PharmaciesItemsRequestModel { {this.pHRItemName, this.pageIndex = 0, this.pageSize = 20, - this.versionID = 5.8, this.channel = 3, this.languageID = 2, this.iPAdress = "10.20.10.20", @@ -38,7 +36,6 @@ class PharmaciesItemsRequestModel { pHRItemName = json['PHR_itemName']; pageIndex = json['PageIndex']; pageSize = json['PageSize']; - versionID = json['VersionID']; channel = json['Channel']; languageID = json['LanguageID']; iPAdress = json['IPAdress']; @@ -54,7 +51,6 @@ class PharmaciesItemsRequestModel { data['PHR_itemName'] = this.pHRItemName; data['PageIndex'] = this.pageIndex; data['PageSize'] = this.pageSize; - data['VersionID'] = this.versionID; data['Channel'] = this.channel; data['LanguageID'] = this.languageID; data['IPAdress'] = this.iPAdress; diff --git a/lib/routes.dart b/lib/routes.dart index 47fccec3..4ce73a4e 100644 --- a/lib/routes.dart +++ b/lib/routes.dart @@ -4,12 +4,19 @@ import 'package:doctor_app_flutter/screens/medical-file/health_summary_page.dart import 'package:doctor_app_flutter/screens/patient-sick-leave/patient_sick_leave_screen.dart'; import 'package:doctor_app_flutter/screens/patients/ECGPage.dart'; import 'package:doctor_app_flutter/screens/patients/insurance_approval_screen_patient.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/diabetic_chart/diabetic_chart.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/diagnosis/diagnosis_screen.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/admission-orders/admission_orders_screen.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/discharge_summary/discharge_summary.dart'; import 'package:doctor_app_flutter/screens/patients/profile/lab_result/all_lab_special_result_page.dart'; import 'package:doctor_app_flutter/screens/patients/profile/lab_result/labs_home_page.dart'; import 'package:doctor_app_flutter/screens/patients/profile/medical_report/AddVerifyMedicalReport.dart'; import 'package:doctor_app_flutter/screens/patients/profile/medical_report/MedicalReportDetailPage.dart'; import 'package:doctor_app_flutter/screens/patients/profile/medical_report/MedicalReportPage.dart'; -import 'package:doctor_app_flutter/screens/patients/profile/note/progress_note_screen.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/notes/note/progress_note_screen.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/notes/nursing_note/nursing_note_screen.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/operation_report/operation_report.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/pending_orders/pending_orders_screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/prescriptions/in_patient_prescription_details_screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/radiology/radiology_home_page.dart'; import 'package:doctor_app_flutter/screens/patients/profile/referral/refer-patient-screen-in-patient.dart'; @@ -26,7 +33,7 @@ import 'landing_page.dart'; import 'screens/patients/profile/admission-request/admission-request-first-screen.dart'; import 'screens/patients/profile/admission-request/admission-request-third-screen.dart'; import 'screens/patients/profile/admission-request/admission-request_second-screen.dart'; -import 'screens/patients/profile/note/progress_note_screen.dart'; + import 'screens/patients/profile/referral/my-referral-detail-screen.dart'; import 'screens/patients/profile/referral/refer-patient-screen.dart'; @@ -47,7 +54,8 @@ const String ORDER_NOTE = 'patients/order-note'; const String MY_REFERRAL_DETAIL = 'my_referral_detail'; const String REFER_PATIENT_TO_DOCTOR = 'patients/refer-to-doctor'; const String REFER_IN_PATIENT_TO_DOCTOR = 'patients/refer-in-patient-to-doctor'; -const String PATIENT_INSURANCE_APPROVALS_NEW = 'patients/patient_insurance_approvals_new'; +const String PATIENT_INSURANCE_APPROVALS_NEW = + 'patients/patient_insurance_approvals_new'; const String VITAL_SIGN_DETAILS = 'patients/vital-sign-details'; const String CREATE_EPISODE = 'patients/create-episode'; const String UPDATE_EPISODE = 'patients/update-episode'; @@ -66,6 +74,14 @@ const String ORDER_PROCEDURE = 'procedure/procedure'; const String ADD_SICKLEAVE = 'add-sickleave'; const String RADIOLOGY_PATIENT = 'radiology-patient'; const String ALL_SPECIAL_LAB_RESULT = 'all-special_lab'; +const String GET_OPERATION_REPORT = 'operation-report'; +const String PENDING_ORDERS = 'pending-orders'; +const String ADMISSION_ORDERS = 'admission-orders'; +const String NURSING_PROGRESS_NOTE = 'nursing_progress_note'; +const String DIAGNOSIS_FOR_IN_PATIENT = 'get_diagnosis_for_in_patient'; + +const String DIABETIC_CHART_VALUES = 'get_diabetic_chart_values'; +const String DISCHARGE_SUMMARY = 'discharge_summary'; //todo: change the routing way. var routes = { @@ -109,4 +125,11 @@ var routes = { // PATIENT_UCAF_DETAIL: (_) => UcafDetailScreen(), PATIENT_ECG: (_) => ECGPage(), ALL_SPECIAL_LAB_RESULT: (_) => AllLabSpecialResult(), + GET_OPERATION_REPORT: (_) => OperationReportScreen(), + PENDING_ORDERS: (_) => PendingOrdersScreen(), + NURSING_PROGRESS_NOTE: (_) => NursingProgressNoteScreen(), + DISCHARGE_SUMMARY : (_) => DischargeSummaryPage(), + DIAGNOSIS_FOR_IN_PATIENT: (_) => DiagnosisScreen(), + ADMISSION_ORDERS: (_) => AdmissionOrdersScreen(), + DIABETIC_CHART_VALUES: (_) => DiabeticChart(), }; diff --git a/lib/screens/auth/login_screen.dart b/lib/screens/auth/login_screen.dart index 9563b29c..78c68256 100644 --- a/lib/screens/auth/login_screen.dart +++ b/lib/screens/auth/login_screen.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/model/hospitals/get_hospitals_response_model.dart'; @@ -16,7 +17,6 @@ import 'package:provider/provider.dart'; import '../../widgets/shared/app_scaffold_widget.dart'; - class LoginScreen extends StatefulWidget { @override _LoginScreenState createState() => _LoginScreenState(); @@ -55,151 +55,127 @@ class _LoginScreenState extends State { children: [ //TODO Use App Text rather than text Container( - child: Column( - crossAxisAlignment: CrossAxisAlignment - .start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ - Column( - crossAxisAlignment: CrossAxisAlignment - .start, - children: [ - SizedBox( - height: 30, - ), - ], + SizedBox( + height: 30, ), - Column( - crossAxisAlignment: CrossAxisAlignment - .start, children: [ + ], + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ SizedBox( height: 10, ), Text( - TranslationBase - .of(context) - .welcomeTo, + TranslationBase.of(context).welcomeTo, style: TextStyle( fontSize: 16, - fontWeight: FontWeight - .w600, + fontWeight: FontWeight.w600, fontFamily: 'Poppins'), ), Text( - TranslationBase - .of(context) + TranslationBase.of(context) .drSulaimanAlHabib, style: TextStyle( - color:Color(0xFF2B353E), - fontWeight: FontWeight - .bold, - fontSize: SizeConfig - .isMobile + color: Color(0xFF2B353E), + fontWeight: FontWeight.bold, + fontSize: SizeConfig.isMobile ? 24 - : SizeConfig - .realScreenWidth * - 0.029, + : SizeConfig.realScreenWidth * + 0.029, fontFamily: 'Poppins'), ), - Text( "Doctor App", style: TextStyle( - fontSize: - SizeConfig.isMobile + fontSize: SizeConfig.isMobile ? 16 - : SizeConfig - .realScreenWidth * - 0.030, - fontWeight: FontWeight - .w600, + : SizeConfig.realScreenWidth * + 0.030, + fontWeight: FontWeight.w600, color: Color(0xFFD02127)), ), ]), - ], - )), + ], + )), SizedBox( height: 40, ), Form( key: loginFormKey, child: Column( - mainAxisAlignment: MainAxisAlignment - .spaceBetween, + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Container( - width: SizeConfig - .realScreenWidth * 0.90, - height: SizeConfig - .realScreenHeight * 0.65, - child: - Column( - crossAxisAlignment: CrossAxisAlignment - .start, children: [ - - buildSizedBox(), - AppTextFieldCustom( - hintText: TranslationBase.of(context).enterId, - hasBorder: true, - controller: userIdController, - onChanged: (value){ - if (value != null) - setState(() { - authenticationViewModel.userInfo - .userID = - value - .trim(); - }); - }, - ), - buildSizedBox(), - AppTextFieldCustom( - hintText: TranslationBase.of(context).enterPassword, - hasBorder: true, - isSecure: true, - controller: passwordController, - onChanged: (value){ - if (value != null) - setState(() { - authenticationViewModel.userInfo - .password = - value - .trim(); - }); - // if(allowCallApi) { - this.getProjects( - authenticationViewModel.userInfo - .userID); - // setState(() { - // allowCallApi = false; - // }); - // } - }, - onClick: (){ - - }, - ), - buildSizedBox(), - AppTextFieldCustom( - hintText: TranslationBase.of(context).selectYourProject, - hasBorder: true, - controller: projectIdController, - isTextFieldHasSuffix: true, - enabled: false, - onClick: (){ - Helpers - .showCupertinoPicker( - context, - projectsList, - 'facilityName', - onSelectProject, - authenticationViewModel); - }, - - - ), - buildSizedBox() - ]), + width: SizeConfig.realScreenWidth * 0.90, + height: SizeConfig.realScreenHeight * 0.65, + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + buildSizedBox(), + AppTextFieldCustom( + hintText: + TranslationBase.of(context).enterId, + hasBorder: true, + controller: userIdController, + onChanged: (value) { + if (value != null) + setState(() { + authenticationViewModel.userInfo + .userID = value.trim(); + }); + }, + ), + buildSizedBox(), + AppTextFieldCustom( + hintText: TranslationBase.of(context) + .enterPassword, + hasBorder: true, + isSecure: true, + controller: passwordController, + onChanged: (value) { + if (value != null) + setState(() { + authenticationViewModel.userInfo + .password = value.trim(); + }); + // if(allowCallApi) { + this.getProjects( + authenticationViewModel + .userInfo.userID); + // setState(() { + // allowCallApi = false; + // }); + // } + }, + onClick: () {}, + ), + buildSizedBox(), + AppTextFieldCustom( + hintText: TranslationBase.of(context) + .selectYourProject, + hasBorder: true, + controller: projectIdController, + isTextFieldHasSuffix: true, + enabled: false, + onClick: () { + Helpers.showCupertinoPicker( + context, + projectsList, + 'facilityName', + onSelectProject, + authenticationViewModel); + }, + ), + buildSizedBox() + ]), ), ], ), @@ -210,7 +186,6 @@ class _LoginScreenState extends State { ]), ), bottomSheet: Container( - height: 90, width: double.infinity, child: Center( @@ -220,26 +195,23 @@ class _LoginScreenState extends State { mainAxisAlignment: MainAxisAlignment.end, children: [ AppButton( - title: TranslationBase - .of(context) - .login, - color: Color(0xFFD02127), - fontWeight: FontWeight.w700, - disabled: authenticationViewModel.userInfo - .userID == null || - authenticationViewModel.userInfo - .password == - null, + title: TranslationBase.of(context).login, + color: AppGlobal.appRedColor, + fontWeight: FontWeight.w600, + disabled: authenticationViewModel.userInfo.userID == null || + authenticationViewModel.userInfo.password == null, onPressed: () { login(context); }, ), - - SizedBox(height: 25,) + SizedBox( + height: 25, + ) ], ), ), - ),), + ), + ), ); } @@ -249,7 +221,9 @@ class _LoginScreenState extends State { ); } - login(context,) async { + login( + context, + ) async { if (loginFormKey.currentState.validate()) { loginFormKey.currentState.save(); GifLoaderDialogUtils.showMyDialog(context); @@ -259,7 +233,7 @@ class _LoginScreenState extends State { Helpers.showErrorToast(authenticationViewModel.error); } else { GifLoaderDialogUtils.hideDialog(context); - authenticationViewModel.setUnverified(true,isFromLogin: true); + authenticationViewModel.setUnverified(true, isFromLogin: true); // Navigator.of(context).pushReplacement( // MaterialPageRoute( // builder: (BuildContext context) => @@ -275,22 +249,25 @@ class _LoginScreenState extends State { onSelectProject(index) { setState(() { - authenticationViewModel.userInfo.projectID = projectsList[index].facilityId; + authenticationViewModel.userInfo.projectID = + projectsList[index].facilityId; projectIdController.text = projectsList[index].facilityName; }); primaryFocus.unfocus(); } - String memberID =""; - getProjects(memberID)async { + + String memberID = ""; + getProjects(memberID) async { if (memberID != null && memberID != '') { - if (this.memberID !=memberID) { + if (this.memberID != memberID) { this.memberID = memberID; await authenticationViewModel.getHospitalsList(memberID); - if(authenticationViewModel.state == ViewState.Idle) { + if (authenticationViewModel.state == ViewState.Idle) { projectsList = authenticationViewModel.hospitals; setState(() { - authenticationViewModel.userInfo.projectID = projectsList[0].facilityId; + authenticationViewModel.userInfo.projectID = + projectsList[0].facilityId; projectIdController.text = projectsList[0].facilityName; }); } diff --git a/lib/screens/auth/verification_methods_screen.dart b/lib/screens/auth/verification_methods_screen.dart index 85c5090a..e1f2f49b 100644 --- a/lib/screens/auth/verification_methods_screen.dart +++ b/lib/screens/auth/verification_methods_screen.dart @@ -15,37 +15,32 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/buttons/secondary_button.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; -import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; import '../../config/size_config.dart'; -import '../../landing_page.dart'; -import '../../root_page.dart'; -import '../../routes.dart'; import '../../util/dr_app_shared_pref.dart'; import '../../util/helpers.dart'; import '../../widgets/auth/verification_methods_list.dart'; -import 'login_screen.dart'; DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); Helpers helpers = Helpers(); +///TODO Elham* check if this still in user or not class VerificationMethodsScreen extends StatefulWidget { - - final password; - - VerificationMethodsScreen({this.password, }); + VerificationMethodsScreen({ + this.password, + }); @override - _VerificationMethodsScreenState createState() => _VerificationMethodsScreenState(); + _VerificationMethodsScreenState createState() => + _VerificationMethodsScreenState(); } class _VerificationMethodsScreenState extends State { - ProjectViewModel projectsProvider; bool isMoreOption = false; bool onlySMSBox = false; @@ -58,367 +53,440 @@ class _VerificationMethodsScreenState extends State { projectsProvider = Provider.of(context); authenticationViewModel = Provider.of(context); - - return AppScaffold( isShowAppBar: false, backgroundColor: Theme.of(context).scaffoldBackgroundColor, - // baseViewModel: model, body: SingleChildScrollView( child: Center( child: FractionallySizedBox( - child: Container( - margin: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 0), - height: SizeConfig.realScreenHeight * .95, - width: SizeConfig.realScreenWidth, - child: SingleChildScrollView( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - // mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - SizedBox( - height: 80, - ), - if(authenticationViewModel.isFromLogin) + widthFactor: 0.9, + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: SizeConfig.heightMultiplier * + (SizeConfig.isHeightVeryShort ? 6 : 4), + ), + if (authenticationViewModel.isFromLogin) InkWell( - onTap: (){ - authenticationViewModel.setUnverified(false,isFromLogin: false); - authenticationViewModel.setAppStatus(APP_STATUS.UNAUTHENTICATED); + onTap: () { + authenticationViewModel.setUnverified(false, + isFromLogin: false); + authenticationViewModel + .setAppStatus(APP_STATUS.UNAUTHENTICATED); }, - child: Icon(Icons.arrow_back_ios,color: Color(0xFF2B353E),) - - ), - Container( - - child: Column( - children: [ - SizedBox( - height: 20, - ), - authenticationViewModel.user != null && isMoreOption == false - ? Column( - mainAxisAlignment: - MainAxisAlignment.spaceEvenly, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - - AppText( - TranslationBase.of(context).welcomeBack, - fontSize:12, - fontWeight: FontWeight.w700, - color: Color(0xFF2B353E), - ), - AppText( - Helpers.capitalize(authenticationViewModel.user.doctorName), - fontSize: 24, - color: Color(0xFF2B353E), - fontWeight: FontWeight.bold, - ), - SizedBox( - height: 20, - ), - AppText( - TranslationBase.of(context).accountInfo , - fontSize: 16, - color: Color(0xFF2E303A), - fontWeight: FontWeight.w600, - ), - SizedBox( - height: 20, - ), - Container( - padding: EdgeInsets.all(15), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.all( - Radius.circular(10), - ), - border: Border.all( - color: HexColor('#707070'), - width: 0.1), + child: Icon( + Icons.arrow_back_ios, + color: AppGlobal.appTextColor, + )), + Column( + children: [ + SizedBox( + height: SizeConfig.heightMultiplier * + (SizeConfig.isHeightVeryShort ? 3 : 4), + ), + authenticationViewModel.user != null && + isMoreOption == false + ? Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).welcomeBack, + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3.5, + fontWeight: FontWeight.w600, + color: AppGlobal.appTextColor, + letterSpacing: -0.72, ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Column( - children: [ - - Text( - TranslationBase.of(context) - .lastLoginAt, - overflow: - TextOverflow.ellipsis, - style: TextStyle( - fontFamily: 'Poppins', - fontSize: 16, - color: Color(0xFF2E303A), - fontWeight: FontWeight.w700,), - + AppText( + Helpers.convertToTitleCase( + authenticationViewModel.user.doctorName), + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 6, + color: AppGlobal.appTextColor, + fontWeight: FontWeight.bold, + letterSpacing: -1.44, + ), + SizedBox( + height: SizeConfig.heightMultiplier * 4, + ), + AppText( + TranslationBase.of(context).accountInfo, + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 4.5, + color: Color(0xFF2E303A), + fontWeight: FontWeight.w600, + letterSpacing: -0.64, + ), + SizedBox( + height: SizeConfig.heightMultiplier * 4), + Container( + padding: EdgeInsets.all(15), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(10), + ), + border: Border.all( + color: HexColor('#707070'), width: 0.1), + ), + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Container( + width: SizeConfig.realScreenWidth * .5, + padding: EdgeInsets.all(0), + child: Column( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context) + .lastLoginAt, + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontFamily: 'Poppins', + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 4.5, + color: Color(0xFF2E303A), + fontWeight: FontWeight.w600, + letterSpacing: -0.4), + ), + Container( + width: MediaQuery.of(context) + .size + .width * + 0.55, + child: RichText( + text: TextSpan( + text: TranslationBase.of( + context) + .verifyWith + + ':', + style: TextStyle( + color: + Color(0xFF575757), + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3.5, + fontFamily: 'Poppins', + fontWeight: + FontWeight.w600, + letterSpacing: -0.4), + children: [ + TextSpan( + text: authenticationViewModel + .getType( + authenticationViewModel + .user + .logInTypeID, + context), + style: TextStyle( + color: AppGlobal + .appTextColor, + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3.5, + fontFamily: + 'Poppins', + fontWeight: + FontWeight.w600, + letterSpacing: + -0.48), + ) + ]), + ), + ), + ], + crossAxisAlignment: + CrossAxisAlignment.start, + ), ), - Row( + Column( + mainAxisAlignment: + MainAxisAlignment.start, children: [ AppText( - TranslationBase - .of(context) - .verifyWith, - fontSize: 14, - color: Color(0xFF575757), - fontWeight: FontWeight.w600, - ), - AppText( - authenticationViewModel.getType( - authenticationViewModel.user - .logInTypeID, - context), - fontSize: 14, - color: Color(0xFF2B353E), - + authenticationViewModel + .user.editedOn != + null + ? AppDateUtils + .getDayMonthYearDateFormatted( + AppDateUtils + .convertStringToDate( + authenticationViewModel + .user + .editedOn), + isMonthShort: true) + : authenticationViewModel + .user.createdOn != + null + ? AppDateUtils.getDayMonthYearDateFormatted( + AppDateUtils + .convertStringToDate( + authenticationViewModel + .user + .createdOn), + isMonthShort: true) + : '--', + textAlign: TextAlign.right, + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 4.5, + color: Color(0xFF2E303A), fontWeight: FontWeight.w700, + letterSpacing: -0.48, ), + AppText( + authenticationViewModel + .user.editedOn != + null + ? AppDateUtils.getHour(AppDateUtils + .convertStringToDate( + authenticationViewModel + .user.editedOn)) + : authenticationViewModel + .user.createdOn != + null + ? AppDateUtils.getHour( + AppDateUtils + .convertStringToDate( + authenticationViewModel + .user + .createdOn)) + : '--', + textAlign: TextAlign.right, + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3.5, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + color: Color(0xFF575757), + ) ], + crossAxisAlignment: + CrossAxisAlignment.end, ) ], - crossAxisAlignment: CrossAxisAlignment.start,), - Column(children: [ - AppText( - authenticationViewModel.user.editedOn != - null - ? AppDateUtils.getDayMonthYearDateFormatted( - AppDateUtils.convertStringToDate( - authenticationViewModel.user - .editedOn)) - : authenticationViewModel.user.createdOn != - null - ? AppDateUtils.getDayMonthYearDateFormatted( - AppDateUtils.convertStringToDate(authenticationViewModel.user - .createdOn)) - : '--', - textAlign: - TextAlign.right, - fontSize: 13, - color: Color(0xFF2E303A), - fontWeight: FontWeight.w700, - ), - AppText( - authenticationViewModel.user.editedOn != - null - ? AppDateUtils.getHour( - AppDateUtils.convertStringToDate( - authenticationViewModel.user - .editedOn)) - : authenticationViewModel.user.createdOn != - null - ? AppDateUtils.getHour( - AppDateUtils.convertStringToDate(authenticationViewModel.user - .createdOn)) - : '--', - textAlign: - TextAlign.right, - fontSize: 14, - fontWeight: FontWeight.w600, - color: Color(0xFF575757), - ) - ], - crossAxisAlignment: CrossAxisAlignment.start, - - ) + ), + ), + SizedBox( + height: SizeConfig.heightMultiplier * 3, + ), + Row( + children: [ + //todo add translation + AppText( + "Please Verify", + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 4.5, + color: AppGlobal.appTextColor, + fontWeight: FontWeight.w600, + letterSpacing: -.64, + ), ], ), - ), - SizedBox( - height: 20, - ), - Row( - children: [ - AppText( - "Please Verify", - fontSize: 16, - color: Color(0xFF2B353E), - - fontWeight: FontWeight.w700, - ), - ], - ) - ], - ) - : Column( - mainAxisAlignment: - MainAxisAlignment.spaceEvenly, + SizedBox( + height: SizeConfig.heightMultiplier * 2, + ), + ], + ) + : Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.start, children: [ - this.onlySMSBox == false - ? Container( - margin: EdgeInsets.only(bottom: 20, top: 30), - child: AppText( - TranslationBase.of(context) - .verifyLoginWith, - fontSize: 18, - color: Color(0xFF2E303A), - fontWeight: FontWeight.bold, - textAlign: TextAlign.left, - ), - ) - : AppText( - TranslationBase.of(context) - .verifyFingerprint2, - fontSize: - SizeConfig.textMultiplier * 2.5, - textAlign: TextAlign.start, - ), - ]), - authenticationViewModel.user != null && isMoreOption == false - ? Column( + this.onlySMSBox == false + ? Container( + margin: EdgeInsets.only( + bottom: 20, top: 30), + child: AppText( + TranslationBase.of(context) + .verifyLoginWith, + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 4, + color: Color(0xFF2E303A), + fontWeight: FontWeight.bold, + textAlign: TextAlign.left, + ), + ) + : AppText( + TranslationBase.of(context) + .verifyFingerprint2, + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 4, + textAlign: TextAlign.start, + ), + ]), + authenticationViewModel.user != null && + isMoreOption == false + ? Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ - Row( - mainAxisAlignment: - MainAxisAlignment.center, - children: [ - Expanded( - child: InkWell( - onTap: () => - { - // TODO check this logic it seem it will create bug to us - authenticateUser( - AuthMethodTypes - .Fingerprint, true) - }, + Row( + mainAxisAlignment: + MainAxisAlignment.center, + children: [ + Expanded( + child: InkWell( + onTap: () => { + // TODO check this logic it seem it will create bug to us + authenticateUser( + AuthMethodTypes + .Fingerprint, + true) + }, + child: VerificationMethodsList( + authenticationViewModel: + authenticationViewModel, + authMethodType: + SelectedAuthMethodTypesService + .getMethodsTypeService( + authenticationViewModel + .user + .logInTypeID), + authenticateUser: + (AuthMethodTypes + authMethodType, + isActive) => + authenticateUser( + authMethodType, + isActive), + )), + ), + Expanded( child: VerificationMethodsList( - authenticationViewModel:authenticationViewModel, - authMethodType: SelectedAuthMethodTypesService - .getMethodsTypeService( - authenticationViewModel.user - .logInTypeID), - authenticateUser: - (AuthMethodTypes - authMethodType, - isActive) => + authenticationViewModel: + authenticationViewModel, + authMethodType: + AuthMethodTypes.MoreOptions, + onShowMore: () { + setState(() { + isMoreOption = true; + }); + }, + )) + ]), + ]) + : Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + onlySMSBox == false + ? Row( + mainAxisAlignment: + MainAxisAlignment.center, + children: [ + Expanded( + child: VerificationMethodsList( + authenticationViewModel: + authenticationViewModel, + authMethodType: + AuthMethodTypes.Fingerprint, + authenticateUser: (AuthMethodTypes + authMethodType, + isActive) => authenticateUser( - authMethodType, - isActive), + authMethodType, isActive), )), - ), + Expanded( + child: VerificationMethodsList( + authenticationViewModel: + authenticationViewModel, + authMethodType: + AuthMethodTypes.FaceID, + authenticateUser: (AuthMethodTypes + authMethodType, + isActive) => + authenticateUser( + authMethodType, isActive), + )) + ], + ) + : SizedBox(), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ Expanded( child: VerificationMethodsList( - authenticationViewModel:authenticationViewModel, - authMethodType: - AuthMethodTypes.MoreOptions, - onShowMore: () { - setState(() { - isMoreOption = true; - }); - }, - )) - ]), - ]) - : Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - onlySMSBox == false - ? Row( - mainAxisAlignment: - MainAxisAlignment.center, - children: [ - Expanded( - child: VerificationMethodsList( - authenticationViewModel:authenticationViewModel, - authMethodType: - AuthMethodTypes.Fingerprint, - authenticateUser: - (AuthMethodTypes - authMethodType, - isActive) => - authenticateUser( - authMethodType, - isActive), - )), - Expanded( - child: VerificationMethodsList( - authenticationViewModel:authenticationViewModel, - authMethodType: - AuthMethodTypes.FaceID, - authenticateUser: - (AuthMethodTypes - authMethodType, - isActive) => - authenticateUser( - authMethodType, - isActive), - )) - ], - ) - : SizedBox(), - Row( - mainAxisAlignment: - MainAxisAlignment.center, - children: [ - Expanded( - child: VerificationMethodsList( - authenticationViewModel:authenticationViewModel, - authMethodType: AuthMethodTypes - .SMS, - authenticateUser: - ( - AuthMethodTypes authMethodType, - isActive) => - authenticateUser( - authMethodType, isActive), - )), - Expanded( - child: VerificationMethodsList( - authenticationViewModel:authenticationViewModel, - authMethodType: - AuthMethodTypes.WhatsApp, - authenticateUser: - ( - AuthMethodTypes authMethodType, - isActive) => - authenticateUser( - authMethodType, isActive), - )) - ], - ), - ]), + authenticationViewModel: + authenticationViewModel, + authMethodType: AuthMethodTypes.SMS, + authenticateUser: + (AuthMethodTypes authMethodType, + isActive) => + authenticateUser( + authMethodType, isActive), + )), + Expanded( + child: VerificationMethodsList( + authenticationViewModel: + authenticationViewModel, + authMethodType: + AuthMethodTypes.WhatsApp, + authenticateUser: + (AuthMethodTypes authMethodType, + isActive) => + authenticateUser( + authMethodType, isActive), + )) + ], + ), + ]), - // ) - ], - ), - ), - ], - ), + // ) + ], + ), + ], ), ), ), ), ), - bottomSheet: authenticationViewModel.user == null ? SizedBox(height: 0,) : Container( - height: 90, - width: double.infinity, - child: Center( - child: FractionallySizedBox( - widthFactor: 0.9, - child: Column( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - SecondaryButton( - label: TranslationBase - .of(context) - .useAnotherAccount, - color: Color(0xFFD02127), - //fontWeight: FontWeight.w700, - onTap: () { - authenticationViewModel.deleteUser(); - authenticationViewModel.setAppStatus(APP_STATUS.UNAUTHENTICATED); - }, + bottomSheet: authenticationViewModel.user == null + ? SizedBox( + height: 0, + ) + : Container( + height: 90, + width: double.infinity, + child: Center( + child: FractionallySizedBox( + widthFactor: 0.9, + child: Column( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + SecondaryButton( + label: + TranslationBase.of(context).useAnotherAccount ?? '', + color: Color(0xFFD02127), + //fontWeight: FontWeight.w700, + onTap: () { + authenticationViewModel.deleteUser(); + authenticationViewModel + .setAppStatus(APP_STATUS.UNAUTHENTICATED); + }, + ), + SizedBox( + height: 25, + ) + ], + ), ), - - SizedBox(height: 25,) - ], + ), ), - ), - ),), ); } @@ -428,13 +496,13 @@ class _VerificationMethodsScreenState extends State { authMethodType == AuthMethodTypes.WhatsApp) { GifLoaderDialogUtils.showMyDialog(context); - - await authenticationViewModel.sendActivationCodeForDoctorApp(authMethodType:authMethodType, password: authenticationViewModel.userInfo.password ); + await authenticationViewModel.sendActivationCodeForDoctorApp( + authMethodType: authMethodType, + password: authenticationViewModel.userInfo.password); if (authenticationViewModel.state == ViewState.ErrorLocal) { Helpers.showErrorToast(authenticationViewModel.error); GifLoaderDialogUtils.hideDialog(context); } else { - GifLoaderDialogUtils.hideDialog(context); this.startSMSService(authMethodType); } @@ -455,12 +523,14 @@ class _VerificationMethodsScreenState extends State { GifLoaderDialogUtils.hideDialog(context); Helpers.showErrorToast(authenticationViewModel.error); } else { - await sharedPref.setString(TOKEN, - authenticationViewModel.activationCodeVerificationScreenRes.logInTokenID); + await sharedPref.setString( + TOKEN, + authenticationViewModel + .activationCodeVerificationScreenRes.logInTokenID); if (authMethodType == AuthMethodTypes.SMS || authMethodType == AuthMethodTypes.WhatsApp) { GifLoaderDialogUtils.hideDialog(context); - this.startSMSService(authMethodType,isSilentLogin: true); + this.startSMSService(authMethodType, isSilentLogin: true); } else { checkActivationCode(isSilentLogin: true); } @@ -473,7 +543,7 @@ class _VerificationMethodsScreenState extends State { fingerPrintBefore = authMethodType; } this.selectedOption = - fingerPrintBefore != null ? fingerPrintBefore : authMethodType; + fingerPrintBefore != null ? fingerPrintBefore : authMethodType; switch (authMethodType) { case AuthMethodTypes.SMS: @@ -503,11 +573,13 @@ class _VerificationMethodsScreenState extends State { } } - startSMSService(AuthMethodTypes type,{isSilentLogin: false}) { + startSMSService(AuthMethodTypes type, {isSilentLogin: false}) { new SMSOTP( context, type, - authenticationViewModel.loggedUser != null ? authenticationViewModel.loggedUser.mobileNumber : authenticationViewModel.user.mobile, + authenticationViewModel.loggedUser != null + ? authenticationViewModel.loggedUser.mobileNumber + : authenticationViewModel.user.mobile, (value) { showDialog( context: context, @@ -515,25 +587,26 @@ class _VerificationMethodsScreenState extends State { return AppLoaderWidget(); }); - this.checkActivationCode(value: value,isSilentLogin: isSilentLogin); + this.checkActivationCode(value: value, isSilentLogin: isSilentLogin); }, - () => - { + () => { print('Faild..'), }, ).displayDialog(context); } - loginWithFingerPrintOrFaceID(AuthMethodTypes authMethodTypes, - isActive) async { + + loginWithFingerPrintOrFaceID( + AuthMethodTypes authMethodTypes, isActive) async { if (isActive) { await authenticationViewModel.showIOSAuthMessages(); if (!mounted) return; if (authenticationViewModel.user != null && (SelectedAuthMethodTypesService.getMethodsTypeService( - authenticationViewModel.user.logInTypeID) == - AuthMethodTypes.Fingerprint || + authenticationViewModel.user.logInTypeID) == + AuthMethodTypes.Fingerprint || SelectedAuthMethodTypesService.getMethodsTypeService( - authenticationViewModel.user.logInTypeID) == AuthMethodTypes.FaceID)) { + authenticationViewModel.user.logInTypeID) == + AuthMethodTypes.FaceID)) { this.sendActivationCode(authMethodTypes); } else { setState(() { @@ -543,16 +616,18 @@ class _VerificationMethodsScreenState extends State { } } - checkActivationCode({String value,bool isSilentLogin = false}) async { - await authenticationViewModel.checkActivationCodeForDoctorApp(activationCode: value,isSilentLogin: isSilentLogin); + checkActivationCode({String value, bool isSilentLogin = false}) async { + await authenticationViewModel.checkActivationCodeForDoctorApp( + activationCode: value, isSilentLogin: isSilentLogin); if (authenticationViewModel.state == ViewState.ErrorLocal) { Navigator.pop(context); Helpers.showErrorToast(authenticationViewModel.error); } else { await authenticationViewModel.onCheckActivationCodeSuccess(); - if(value !=null) - Navigator.pop(context); - Navigator.pop(context); + if (value != null) { + if (Navigator.canPop(context)) Navigator.pop(context); + } + if (Navigator.canPop(context)) Navigator.pop(context); navigateToLandingPage(); } } @@ -564,5 +639,4 @@ class _VerificationMethodsScreenState extends State { authenticationViewModel.setAppStatus(APP_STATUS.AUTHENTICATED); } } - } diff --git a/lib/screens/doctor/doctor_replay/doctor_repaly_chat.dart b/lib/screens/doctor/doctor_replay/doctor_repaly_chat.dart index 52331e8e..cda899f1 100644 --- a/lib/screens/doctor/doctor_replay/doctor_repaly_chat.dart +++ b/lib/screens/doctor/doctor_replay/doctor_repaly_chat.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/doctor_replay_view_model.dart'; @@ -370,7 +371,7 @@ class _DoctorReplayChatState extends State { child: Center( child: AppButton( fontWeight: FontWeight.w700, - color: Colors.green[600], + color: AppGlobal.appGreenColor, title: "Update Your Answer", //TranslationBase.of(context).close, onPressed: () { setState(() { @@ -400,7 +401,7 @@ class _DoctorReplayChatState extends State { fontSize: 13.5, suffixIcon: FontAwesomeIcons.arrowRight, - suffixIconColor: Colors.green, + suffixIconColor: AppGlobal.appGreenColor, onSuffixTap: ()async { if(msgController.text.isEmpty){ diff --git a/lib/screens/doctor/doctor_replay/doctor_reply_screen.dart b/lib/screens/doctor/doctor_replay/doctor_reply_screen.dart index 8b51319c..7957d4bd 100644 --- a/lib/screens/doctor/doctor_replay/doctor_reply_screen.dart +++ b/lib/screens/doctor/doctor_replay/doctor_reply_screen.dart @@ -1,6 +1,7 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/doctor_replay_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/doctor/doctor_replay/doctor_repaly_chat.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; @@ -14,6 +15,7 @@ import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils import 'package:doctor_app_flutter/widgets/shared/text_fields/text_fields_utils.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; import 'all_doctor_questions.dart'; import 'not_replaied_Doctor_Questions.dart'; @@ -81,38 +83,35 @@ class _DoctorReplyScreenState extends State preferredSize: Size.fromHeight( MediaQuery.of(context).size.height * 0.070), child: Container( - height: MediaQuery.of(context).size.height * 0.070, - decoration: BoxDecoration( - border: Border( - bottom: BorderSide( - color: Theme.of(context).dividerColor, - width: 0.5), //width: 0.7 + color: Helpers.getBgTabColor(), + + child: TabBar( + isScrollable: false, + controller: _tabController, + indicatorColor: Colors.transparent, + indicatorWeight: 1.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Theme.of(context).primaryColor, + labelPadding: EdgeInsets.only( + top: 0, left: 0, right: 0, bottom: 0), + unselectedLabelColor: Colors.grey[800], + tabs: [ + tabWidget( + screenSize, + _activeTab == 0, + /// TODO Elham* Add Tran + "Not Replied", + isFirst: true, context: context ), - color: Colors.white), - child: Center( - child: TabBar( - isScrollable: false, - controller: _tabController, - indicatorColor: Colors.transparent, - indicatorWeight: 1.0, - indicatorSize: TabBarIndicatorSize.tab, - labelColor: Theme.of(context).primaryColor, - labelPadding: EdgeInsets.only( - top: 0, left: 0, right: 0, bottom: 0), - unselectedLabelColor: Colors.grey[800], - tabs: [ - tabWidget( - screenSize, - _activeTab == 0, - "Not Replied", - ), - tabWidget( - screenSize, - _activeTab == 1, - TranslationBase.of(context).all, - ), - ], - ), + tabWidget( + screenSize, + _activeTab == 1, + + TranslationBase.of(context).all, + isLast: true, + context: context + ), + ], ), ), ), @@ -140,44 +139,24 @@ class _DoctorReplyScreenState extends State } Widget tabWidget(Size screenSize, bool isActive, String title, - {int counter = -1}) { + {int counter = -1, bool isFirst = false, + bool isMiddle = false, + bool isLast = false,context, }) { + ProjectViewModel projectViewModel= Provider.of(context); + return Center( child: Container( - height: screenSize.height * 0.070, - decoration: TextFieldsUtils.containerBorderDecoration( - isActive ? Color(0xFFD02127 /*B8382B*/) : Color(0xFFEAEAEA), - isActive ? Color(0xFFD02127) : Color(0xFFEAEAEA), - borderRadius: 4, - borderWidth: 0), + height: Helpers.getTabHeight(context), + decoration: Helpers.getBoxTabsBoxDecoration(isActive: isActive,isFirst: isFirst, isMiddle: isMiddle, isLast: isLast, projectViewModel: projectViewModel), child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - AppText( - title, - fontSize: SizeConfig.textMultiplier * 1.5, - color: isActive ? Colors.white : Color(0xFF2B353E), - fontWeight: FontWeight.w700, - ), + Helpers.getTabText(title: title, isActive: isActive), if (counter != -1) - Container( - margin: EdgeInsets.all(4), - width: 15, - height: 15, - decoration: BoxDecoration( - color: isActive ? Colors.white : Color(0xFFD02127), - shape: BoxShape.circle, - ), - child: Center( - child: FittedBox( - child: AppText( - "$counter", - fontSize: SizeConfig.textMultiplier * 1.5, - color: !isActive ? Colors.white : Color(0xFFD02127), - fontWeight: FontWeight.w700, - ), - ), - ), - ), + Helpers.getTabCounter( + isActive: isActive, + counter:counter + ) ], ), ), diff --git a/lib/screens/doctor/doctor_replay/doctor_reply_widget.dart b/lib/screens/doctor/doctor_replay/doctor_reply_widget.dart index 69bb9ab2..ecd0f93d 100644 --- a/lib/screens/doctor/doctor_replay/doctor_reply_widget.dart +++ b/lib/screens/doctor/doctor_replay/doctor_reply_widget.dart @@ -37,7 +37,7 @@ class _DoctorReplyWidgetState extends State { ? IN_PROGRESS_COLOR : widget.reply.infoStatus == 3 ? Color(0xFFD02127) - : Colors.green[600], + : AppGlobal.appGreenColor, hasBorder: false, widget: Container( child: InkWell( @@ -77,7 +77,7 @@ class _DoctorReplyWidgetState extends State { ? IN_PROGRESS_COLOR : widget.reply.infoStatus == 3 ? Color(0xFFD02127) - : Colors.green[600], + : AppGlobal.appGreenColor, fontWeight: FontWeight.w700, fontFamily: 'Poppins', fontSize: 1.8 * SizeConfig.textMultiplier)), diff --git a/lib/screens/home/dashboard_referral_patient.dart b/lib/screens/home/dashboard_referral_patient.dart new file mode 100644 index 00000000..0bae430a --- /dev/null +++ b/lib/screens/home/dashboard_referral_patient.dart @@ -0,0 +1,175 @@ +import 'package:charts_flutter/flutter.dart' as charts; +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/viewModel/dashboard_view_model.dart'; +import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/dashboard/guage_chart.dart'; +import 'package:doctor_app_flutter/widgets/dashboard/row_count.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; +import 'package:flutter/material.dart'; + +import 'label.dart'; + +class DashboardReferralPatient extends StatelessWidget { + final List dashboardItemList; + final double height; + final DashboardViewModel model; + + const DashboardReferralPatient({Key key, this.dashboardItemList, this.height, this.model}) : super(key: key); + @override + Widget build(BuildContext context) { + return Container( + margin: EdgeInsets.only(bottom: 20, top: 10, left: 5, right: 5), + decoration: BoxDecoration( + + color: Colors.white, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(20), + topRight: Radius.circular(20), + bottomLeft: Radius.circular(20), + bottomRight: Radius.circular(20) + ), + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.5), + spreadRadius: 0, + blurRadius: 9, + offset: Offset(0, 0), // changes position of shadow + ), + ], + ), + child: Column(crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start, children: [ + Expanded( + flex: 1, + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + flex: 4, + child: Padding( + padding: const EdgeInsets.all(5.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.all(8), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: SizeConfig.getHeightMultiplier(height: height) * + (SizeConfig.isHeightVeryShort? + 3 + : SizeConfig.isHeightShort? + 2 + : 2)), + Label( + firstLine: TranslationBase.of(context).patients, + secondLine: TranslationBase.of(context).referral, + color: Color(0xFF2B353E), + secondLineFontSize: SizeConfig.getHeightMultiplier(height: height) * + (SizeConfig.isHeightVeryShort? + 5 + : SizeConfig.isHeightShort? + 7 + : 12), + ), + SizedBox( + height: SizeConfig.getHeightMultiplier(height: height) * + (SizeConfig.isHeightVeryShort? + 5 + : SizeConfig.isHeightShort? + 10 + : 5)) + ], + ), + ), + Expanded( + flex: 1, + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + RowCounts( + dashboardItemList[2].summaryoptions[0].kPIParameter, + dashboardItemList[2].summaryoptions[0].value, + AppGlobal.appTextColor, + height: height, + ), + RowCounts( + dashboardItemList[2].summaryoptions[1].kPIParameter, + dashboardItemList[2].summaryoptions[1].value, + Color(0xFFC8D0DC), + height: height, + ), + RowCounts( + dashboardItemList[2].summaryoptions[2].kPIParameter, + dashboardItemList[2].summaryoptions[2].value, + Color(0xFFEC6666), + + height: height, + ), + ], + ), + ) + ], + )), + ), + Expanded( + flex: 3, + child: Stack(children: [ + Container(padding: EdgeInsets.all(0), child: GaugeChart(_createReferralData(dashboardItemList))), + Positioned( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + AppText( + model.getPatientCount(dashboardItemList[2]).toString(), + fontSize: SizeConfig.textMultiplier * 3.2, + color: AppGlobal.appTextColor, + fontWeight: FontWeight.bold, + ) + ], + ), + top: height * (SizeConfig.isHeightVeryShort ? 0.35 : 0.35), + left: 0, + right: 0) + ]), + ), + ], + )), + ]), + ); + } + + static List> _createReferralData(List dashboardItemList) { + final data = [ + new GaugeSegment(dashboardItemList[2].summaryoptions[0].kPIParameter, + getValue(dashboardItemList[1].summaryoptions[0].value), charts.ColorUtil.fromDartColor(AppGlobal.appTextColor)), + new GaugeSegment(dashboardItemList[2].summaryoptions[1].kPIParameter, + getValue(dashboardItemList[1].summaryoptions[1].value), charts.ColorUtil.fromDartColor(Color(0xFFC6CEDA),),), + new GaugeSegment(dashboardItemList[2].summaryoptions[2].kPIParameter, + getValue(dashboardItemList[1].summaryoptions[2].value), charts.ColorUtil.fromDartColor(Color(0xFFEC6666),),), + ]; + + return [ + new charts.Series( + id: 'Segments', + domainFn: (GaugeSegment segment, _) => segment.segment, + measureFn: (GaugeSegment segment, _) => segment.size, + strokeWidthPxFn: (GaugeSegment segment, _)=>200, + + data: data, + colorFn: (GaugeSegment segment, _) => segment.color, + ) + ]; + } + + static int getValue(value) { + return value == 0 ? 1 : value; + } +} diff --git a/lib/screens/home/dashboard_slider-item-widget.dart b/lib/screens/home/dashboard_slider-item-widget.dart index 4b7c4f46..9005b816 100644 --- a/lib/screens/home/dashboard_slider-item-widget.dart +++ b/lib/screens/home/dashboard_slider-item-widget.dart @@ -1,9 +1,12 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart'; +import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/widgets/dashboard/activity_button.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; +import 'label.dart'; + class DashboardSliderItemWidget extends StatelessWidget { final DashboardModel item; @@ -11,27 +14,37 @@ class DashboardSliderItemWidget extends StatelessWidget { @override Widget build(BuildContext context) { - return Column( + return Column( children: [ Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - AppText( - item.kPIName, - fontSize: SizeConfig.textMultiplier * 2.2, - fontWeight: FontWeight.bold, + Container( + margin: EdgeInsets.symmetric(horizontal: SizeConfig.widthMultiplier *1), + + child: Label( + firstLine: Helpers.getLabelFromKPI(item.kPIName), + secondLine: Helpers.getNameFromKPI(item.kPIName), + ), ), ], ), new Container( - height: 110, + height: SizeConfig.heightMultiplier * + (SizeConfig.isHeightVeryShort + ? 16 + : SizeConfig.isHeightShort + ? 14 + : SizeConfig.isHeightLarge + ? 15 + : 13), child: ListView( scrollDirection: Axis.horizontal, - children: - List.generate(item.summaryoptions.length, (int index) { - return GetActivityButton(item.summaryoptions[index]); + children: List.generate(item.summaryoptions.length, (int index) { + return GetActivityCard(item.summaryoptions[index]); }))) ], ); + } } diff --git a/lib/screens/home/dashboard_swipe_widget.dart b/lib/screens/home/dashboard_swipe_widget.dart index 66261292..bcd7864c 100644 --- a/lib/screens/home/dashboard_swipe_widget.dart +++ b/lib/screens/home/dashboard_swipe_widget.dart @@ -12,6 +12,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_swiper/flutter_swiper.dart'; import 'package:charts_flutter/flutter.dart' as charts; +import 'dashboard_referral_patient.dart'; + class DashboardSwipeWidget extends StatefulWidget { final List dashboardItemList; final DashboardViewModel model; @@ -28,8 +30,11 @@ class _DashboardSwipeWidgetState extends State { @override Widget build(BuildContext context) { + double height = SizeConfig.heightMultiplier * + (SizeConfig.isHeightVeryShort ? 40 : SizeConfig.isHeightLarge?33:31); + return Container( - height: MediaQuery.of(context).size.height * 0.35, + height: height, // height: 230, child: Swiper( onIndexChanged: (index) { @@ -41,7 +46,7 @@ class _DashboardSwipeWidgetState extends State { } }, itemBuilder: (BuildContext context, int index) { - return getSwipeWidget(widget.dashboardItemList, index); + return getSwipeWidget(widget.dashboardItemList, index, height); }, itemCount: 3, // itemHeight: 300, @@ -84,146 +89,14 @@ class _DashboardSwipeWidgetState extends State { ); } - Widget getSwipeWidget(List dashboardItemList, int index) { + Widget getSwipeWidget(List dashboardItemList, int index,double height ) { if (index == 1) - return RoundedContainer( - raduis: 16, - showBorder: false, - borderColor: Colors.white, - shadowWidth: 0.1, - shadowSpreadRadius: 2, - shadowDy: 1, - margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10), - child: Padding( - padding: const EdgeInsets.all(5.0), - child: GetOutPatientStack(dashboardItemList[1]))); + return GetOutPatientStack(dashboardItemList[1]); if (index == 0) - return RoundedContainer( - raduis: 16, - showBorder: false, - borderColor: Colors.white, - shadowWidth: 0.1, - shadowSpreadRadius: 2, - shadowDy: 1, - margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10), - child: Padding( - padding: const EdgeInsets.all(5.0), - child: GetOutPatientStack(dashboardItemList[0]))); + return GetOutPatientStack(dashboardItemList[0]); if (index == 2) - return RoundedContainer( - raduis: 16, - showBorder: false, - borderColor: Colors.white, - shadowWidth: 0.1, - shadowSpreadRadius: 2, - shadowDy: 1, - margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10), - child: - Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ - Expanded( - flex: 1, - child: Row( - children: [ - Expanded( - flex: 4, - child: Padding( - padding: const EdgeInsets.all(5.0), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.all(8), - child: Column( - mainAxisAlignment: - MainAxisAlignment.center, - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context) - .patients, - fontSize: 12, - fontWeight: FontWeight.bold, - fontHeight: 0.5, - ), - AppText( - TranslationBase.of(context) - .referral, - fontSize: 22, - fontWeight: FontWeight.bold, - ), - ], - )), - Expanded( - flex: 1, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Expanded( - child: RowCounts( - dashboardItemList[2] - .summaryoptions[0] - .kPIParameter, - dashboardItemList[2] - .summaryoptions[0] - .value, - Colors.black), - ), - Expanded( - child: RowCounts( - dashboardItemList[2] - .summaryoptions[1] - .kPIParameter, - dashboardItemList[2] - .summaryoptions[1] - .value, - Colors.grey), - ), - Expanded( - child: RowCounts( - dashboardItemList[2] - .summaryoptions[2] - .kPIParameter, - dashboardItemList[2] - .summaryoptions[2] - .value, - Colors.red), - ), - ], - ), - ) - ], - )), - ), - Expanded( - flex: 3, - child: Stack(children: [ - Container( - child: GaugeChart( - _createReferralData(widget.dashboardItemList))), - Positioned( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - AppText( - widget.model - .getPatientCount(dashboardItemList[2]) - .toString(), - fontSize: SizeConfig.textMultiplier * 3.0, - fontWeight: FontWeight.bold, - ) - ], - ), - top: MediaQuery.of(context).size.height * 0.13, - left: 0, - right: 0) - ]), - ), - ], - )), - ])); + return DashboardReferralPatient(dashboardItemList: widget.dashboardItemList,height: height,model: widget.model,); + return Container(); } diff --git a/lib/screens/home/home_page_card.dart b/lib/screens/home/home_page_card.dart index 503bbe60..39a99e65 100644 --- a/lib/screens/home/home_page_card.dart +++ b/lib/screens/home/home_page_card.dart @@ -1,51 +1,47 @@ +import 'package:doctor_app_flutter/config/config.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; class HomePageCard extends StatelessWidget { const HomePageCard( {this.hasBorder = false, - this.imageName, - @required this.child, - this.onTap, - Key key, - this.color, - this.opacity = 0.4, - this.margin}) + this.imageName, + this.child, + this.onTap, + Key key, + this.color, + this.opacity = 0.4, + this.margin, this.width, this.gradient}) : super(key: key); final bool hasBorder; final String imageName; final Widget child; - final Function onTap; + final GestureTapCallback onTap; final Color color; final double opacity; + final double width; final EdgeInsets margin; + final LinearGradient gradient; + @override Widget build(BuildContext context) { return InkWell( onTap: onTap, child: Container( - width: 120, - height: MediaQuery.of(context).orientation == Orientation.portrait - ? 100 - : 200, + width: width, margin: this.margin, decoration: BoxDecoration( - color: !hasBorder - ? color != null - ? color - : HexColor('#050705').withOpacity(opacity) - : Colors.white, - borderRadius: BorderRadius.circular(17.0), + gradient: gradient, + borderRadius: BorderRadius.circular(20.0), border: hasBorder ? Border.all(width: 1.0, color: const Color(0xffcccccc)) : Border.all(width: 0.0, color: Colors.transparent), image: imageName != null ? DecorationImage( - image: AssetImage('assets/images/dashboard/$imageName'), - fit: BoxFit.cover, - colorFilter: new ColorFilter.mode( - Colors.black.withOpacity(0.2), BlendMode.dstIn), - ) + image: AssetImage('assets/images/dashboard/$imageName'), + fit: BoxFit.cover, + colorFilter: new ColorFilter.mode(Colors.black.withOpacity(0.2), BlendMode.dstIn), + ) : null, ), child: child, diff --git a/lib/screens/home/home_patient_card.dart b/lib/screens/home/home_patient_card.dart index b388a7e2..0180fc14 100644 --- a/lib/screens/home/home_patient_card.dart +++ b/lib/screens/home/home_patient_card.dart @@ -6,27 +6,34 @@ import 'package:flutter/material.dart'; class HomePatientCard extends StatelessWidget { final Color backgroundColor; final IconData cardIcon; + final String cardIconImage; final Color backgroundIconColor; final String text; final Color textColor; - final Function onTap; + final VoidCallback onTap; final double iconSize; + final LinearGradient gradient; HomePatientCard({ - @required this.backgroundColor, - @required this.backgroundIconColor, - @required this.cardIcon, - @required this.text, - @required this.textColor, - @required this.onTap, - this.iconSize = 30, + this.backgroundColor, + this.backgroundIconColor, + this.cardIcon, + this.cardIconImage, + this.text, + this.textColor, + this.onTap, + this.iconSize = 30, this.gradient, }); @override Widget build(BuildContext context) { + double width = SizeConfig.heightMultiplier* + (SizeConfig.isHeightVeryShort ? 16 : SizeConfig.isHeightLarge?15:13); return HomePageCard( color: backgroundColor, - margin: EdgeInsets.all(4), + width: width, + gradient: gradient, + margin: EdgeInsets.all(SizeConfig.widthMultiplier *1.121), child: Container( padding: EdgeInsets.all(8), child: Column( @@ -38,12 +45,23 @@ class HomePatientCard extends StatelessWidget { children: [ Container( margin: EdgeInsets.only(top: 18, left: 10), - color:Colors.transparent, - - child: Icon( + color: Colors.transparent, + child: cardIcon != null + ? Icon( cardIcon, size: iconSize * 2, color: backgroundIconColor, + ) + : IconButton( + icon: Image.asset( + 'assets/images/patient_register.png', + width: iconSize * 2, + height: iconSize * 2, + fit: BoxFit.fill, + ), + iconSize: iconSize * 2, + color: backgroundIconColor, + onPressed: () => null, ), ), Container( @@ -51,10 +69,17 @@ class HomePatientCard extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.start, children: [ - Icon( + cardIcon != null + ? Icon( cardIcon, - size: iconSize, + size: + SizeConfig.getWidthMultiplier(width: width) * 30, color: textColor, + ) + : Image.asset( + cardIconImage, + height: iconSize, + width: iconSize, ), SizedBox( height: 4, @@ -71,7 +96,11 @@ class HomePatientCard extends StatelessWidget { text, color: textColor, textAlign: TextAlign.start, - fontSize: SizeConfig.textMultiplier * 1.6, + letterSpacing: -0.33, + fontWeight: FontWeight.w600, + fontSize: + SizeConfig.getTextMultiplierBasedOnWidth(width: width) * + (SizeConfig.isHeightVeryShort ? 11 : 10), ), ), ), diff --git a/lib/screens/home/home_screen.dart b/lib/screens/home/home_screen.dart index 93fe0a21..a0b03656 100644 --- a/lib/screens/home/home_screen.dart +++ b/lib/screens/home/home_screen.dart @@ -1,3 +1,5 @@ +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart'; import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart'; @@ -16,27 +18,31 @@ import 'package:doctor_app_flutter/screens/patients/In_patient/in_patient_screen import 'package:doctor_app_flutter/screens/patients/out_patient/out_patient_screen.dart'; import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/referral/patient_referral_screen.dart'; +import 'package:doctor_app_flutter/screens/patients/register_patient/RegisterPatientPage.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; +import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/profile-welcome-widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; import 'package:provider/provider.dart'; import 'package:sticky_headers/sticky_headers/widget.dart'; import '../../routes.dart'; import '../../widgets/shared/app_texts_widget.dart'; +import 'label.dart'; class HomeScreen extends StatefulWidget { HomeScreen({Key key, this.title}) : super(key: key); final String title; - final String iconURL = 'assets/images/dashboard_icon/'; @override _HomeScreenState createState() => _HomeScreenState(); @@ -66,7 +72,8 @@ class _HomeScreenState extends State { return BaseView( onModelReady: (model) async { - model.startHomeScreenServices(projectsProvider, authenticationViewModel); + model.startHomeScreenServices( + projectsProvider, authenticationViewModel); }, builder: (_, model, w) => AppScaffold( baseViewModel: model, @@ -78,12 +85,17 @@ class _HomeScreenState extends State { color: Colors.grey[100], padding: EdgeInsets.only(top: 10), child: Stack(children: [ - IconButton( - icon: Image.asset('assets/images/menu.png', - height: 50, width: 50), - iconSize: 18, - color: Colors.black, - onPressed: () => Scaffold.of(context).openDrawer(), + //TODO Elham* make it componet + Container( + width: 40, + margin: EdgeInsets.only(left: projectsProvider.isArabic? 0:32, right: projectsProvider.isArabic? 23:0), + child: IconButton( + icon: SvgPicture.asset('assets/images/svgs/menu.svg', + height: 25, width: 10), + iconSize: 15, + color: Colors.black, + onPressed: () => Scaffold.of(context).openDrawer(), + ), ), Column(children: [ ProfileWelcomeWidget( @@ -99,7 +111,8 @@ class _HomeScreenState extends State { DropdownButtonHideUnderline( child: DropdownButton( dropdownColor: Colors.white, - iconEnabledColor: Colors.black, + iconEnabledColor: AppGlobal.appTextColor, + icon: Icon(Icons.keyboard_arrow_down), isExpanded: true, value: clinicId == null ? projectsProvider @@ -124,13 +137,13 @@ class _HomeScreenState extends State { children: [ Container( padding: - EdgeInsets.all(2), + EdgeInsets.all(0), margin: EdgeInsets.all(2), decoration: new BoxDecoration( color: - Colors.red[800], + AppGlobal.appRedColor, borderRadius: BorderRadius .circular( @@ -149,11 +162,13 @@ class _HomeScreenState extends State { .toString(), color: Colors.white, + letterSpacing: -0.72, + fontWeight: FontWeight.w600, fontSize: projectsProvider .isArabic ? 10 - : 11, + : 12, textAlign: TextAlign .center, @@ -161,9 +176,10 @@ class _HomeScreenState extends State { )), ], ), - AppText(item.clinicName, - fontSize: 12, - color: Colors.black, + AppText(Helpers.convertToTitleCase(item.clinicName), + fontSize: 14, + letterSpacing: -0.96, + color: AppGlobal.appTextColor, fontWeight: FontWeight.bold, textAlign: TextAlign.end), @@ -190,7 +206,12 @@ class _HomeScreenState extends State { .map((item) { return DropdownMenuItem( child: AppText( - item.clinicName, + Helpers.convertToTitleCase(item.clinicName), + fontSize: 14, + letterSpacing: -0.96, + color: AppGlobal.appTextColor, + fontWeight: + FontWeight.bold, textAlign: TextAlign.left, ), value: item.clinicID, @@ -211,37 +232,49 @@ class _HomeScreenState extends State { ])), content: Column( children: [ - model.dashboardItemsList.length > 0 - ? DashboardSwipeWidget( - model.dashboardItemsList, - model, - (sliderIndex) { - setState(() { - sliderActiveIndex = sliderIndex; - }); - }, - ) - : SizedBox(), - model.dashboardItemsList.length > 0 - ? FractionallySizedBox( - widthFactor: 0.90, - child: Container( - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - SizedBox( - height: 10, - ), - sliderActiveIndex == 1 - ? DashboardSliderItemWidget( - model.dashboardItemsList[4]) - : sliderActiveIndex == 0 - ? DashboardSliderItemWidget( - model.dashboardItemsList[3]) - : DashboardSliderItemWidget( - model.dashboardItemsList[6]), - ]))) - : SizedBox(), + if (model.state != ViewState.ErrorLocal) + Column( + mainAxisSize: MainAxisSize.min, + children: [ + model.dashboardItemsList.length > 0 + ? DashboardSwipeWidget( + model.dashboardItemsList, + model, + (sliderIndex) { + setState(() { + sliderActiveIndex = sliderIndex; + }); + }, + ) + : SizedBox(), + model.dashboardItemsList.length > 0 + ? FractionallySizedBox( + widthFactor: 0.90, + child: Container( + child: Column( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + sliderActiveIndex == 1 + ? DashboardSliderItemWidget( + model.dashboardItemsList[4]) + : sliderActiveIndex == 0 + ? DashboardSliderItemWidget( + model.dashboardItemsList[3]) + : DashboardSliderItemWidget( + model.dashboardItemsList[6]), + ]))) + : SizedBox(), + ], + ) + else + Container( + child: ErrorMessage( + error: model.error, + )), FractionallySizedBox( // widthFactor: 0.90, child: Container( @@ -259,29 +292,21 @@ class _HomeScreenState extends State { SizedBox( height: 10, ), - Container( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).patients, - fontSize: 12, - fontWeight: FontWeight.bold, - fontHeight: .5, - ), - AppText( - TranslationBase.of(context).services, - fontSize: 22, - fontWeight: FontWeight.bold, - ), - ], - )), - SizedBox( - height: 10, + + Label( + firstLine: TranslationBase.of(context).patients, + secondLine: TranslationBase.of(context).services, ), + Container( - height: 120, + height: SizeConfig.heightMultiplier * + (SizeConfig.isHeightVeryShort + ? 16 + : SizeConfig.isHeightShort + ? 14 + : SizeConfig.isHeightLarge + ? 15 + : 13), child: ListView( scrollDirection: Axis.horizontal, children: [ @@ -308,24 +333,39 @@ class _HomeScreenState extends State { DashboardViewModel model, projectsProvider) { colorIndex = 0; - List backgroundColors = List(3); - backgroundColors[0] = Color(0xffD02127); - backgroundColors[1] = Colors.grey[300]; - backgroundColors[2] = Color(0xff2B353E); + List backgroundColors = List(3); + backgroundColors[0] = LinearGradient( + begin: Alignment(-1.0, -2.0), + end: Alignment(1.0, 2.0), + colors: [ + AppGlobal.appRedColor,Color(0xFFAD3B3B), + ]);//AppGlobal.appRedColor; + backgroundColors[1] = LinearGradient( + begin: Alignment.center, + end: Alignment.center, + colors: [ + Color(0xFFC9C9C9),Color(0xFFC9C9C9), + ]); + backgroundColors[2] = LinearGradient( + begin: Alignment.center, + end: Alignment.center, + colors: [ + Color(0xFF71787E),AppGlobal.appTextColor + ]); List backgroundIconColors = List(3); backgroundIconColors[0] = Colors.white12; backgroundIconColors[1] = Colors.white38; backgroundIconColors[2] = Colors.white10; List textColors = List(3); textColors[0] = Colors.white; - textColors[1] = Colors.black; + textColors[1] = Color(0xFF353E47); textColors[2] = Colors.white; List patientCards = List(); if (model.hasVirtualClinic) { patientCards.add(HomePatientCard( - backgroundColor: backgroundColors[colorIndex], + gradient: backgroundColors[colorIndex], backgroundIconColor: backgroundIconColors[colorIndex], cardIcon: DoctorApp.livecare, textColor: textColors[colorIndex], @@ -362,7 +402,7 @@ class _HomeScreenState extends State { } patientCards.add(HomePatientCard( - backgroundColor: backgroundColors[colorIndex], + gradient: backgroundColors[colorIndex], backgroundIconColor: backgroundIconColors[colorIndex], cardIcon: DoctorApp.inpatient, textColor: textColors[colorIndex], @@ -382,7 +422,25 @@ class _HomeScreenState extends State { changeColorIndex(); patientCards.add(HomePatientCard( - backgroundColor: backgroundColors[colorIndex], + gradient: backgroundColors[colorIndex], + backgroundIconColor: backgroundIconColors[colorIndex], + //TODO Elham* match the of the icon + cardIcon: DoctorApp.arrival_patients, + textColor: textColors[colorIndex], + text: TranslationBase.of(context).registerNewPatient, + onTap: () { + Navigator.push( + context, + FadePage( + page: RegisterPatientPage(), + ), + ); + }, + )); + changeColorIndex(); + + patientCards.add(HomePatientCard( + gradient: backgroundColors[colorIndex], backgroundIconColor: backgroundIconColors[colorIndex], cardIcon: DoctorApp.arrival_patients, textColor: textColors[colorIndex], @@ -397,11 +455,11 @@ class _HomeScreenState extends State { context, MaterialPageRoute( builder: (context) => OutPatientsScreen( - patientSearchRequestModel: PatientSearchRequestModel( - from: date, - to: date, - doctorID: - authenticationViewModel.doctorProfile.doctorID),), + patientSearchRequestModel: PatientSearchRequestModel( + from: date, + to: date, + doctorID: authenticationViewModel.doctorProfile.doctorID), + ), settings: RouteSettings(name: 'OutPatientsScreen'), )); }, @@ -409,7 +467,7 @@ class _HomeScreenState extends State { changeColorIndex(); patientCards.add(HomePatientCard( - backgroundColor: backgroundColors[colorIndex], + gradient: backgroundColors[colorIndex], backgroundIconColor: backgroundIconColors[colorIndex], cardIcon: DoctorApp.referral_1, textColor: textColors[colorIndex], @@ -427,7 +485,7 @@ class _HomeScreenState extends State { changeColorIndex(); patientCards.add(HomePatientCard( - backgroundColor: backgroundColors[colorIndex], + gradient: backgroundColors[colorIndex], backgroundIconColor: backgroundIconColors[colorIndex], cardIcon: DoctorApp.search, textColor: textColors[colorIndex], @@ -444,7 +502,7 @@ class _HomeScreenState extends State { changeColorIndex(); patientCards.add(HomePatientCard( - backgroundColor: backgroundColors[colorIndex], + gradient: backgroundColors[colorIndex], backgroundIconColor: backgroundIconColors[colorIndex], cardIcon: DoctorApp.search_medicines, textColor: textColors[colorIndex], diff --git a/lib/screens/home/label.dart b/lib/screens/home/label.dart new file mode 100644 index 00000000..0d316652 --- /dev/null +++ b/lib/screens/home/label.dart @@ -0,0 +1,43 @@ +// ignore: must_be_immutable +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:flutter/material.dart'; + +class Label extends StatelessWidget { + Label({ + Key key, this.firstLine, this.secondLine, this.color= const Color(0xFF2E303A), this.secondLineFontSize, this.firstLineFontSize, + }) : super(key: key); + final String firstLine; + final String secondLine; + Color color; + final double secondLineFontSize; + final double firstLineFontSize; + + @override + Widget build(BuildContext context) { + + return Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + firstLine, + fontSize: firstLineFontSize??SizeConfig.getTextMultiplierBasedOnWidth() *(SizeConfig.isWidthLarge?2:3) , + // fontWeight: FontWeight.bold, + color: color, + fontHeight: .5, + letterSpacing: -0.72, + fontWeight: FontWeight.w600, + ), + AppText( + secondLine, + color: color, + fontSize: secondLineFontSize??SizeConfig.getTextMultiplierBasedOnWidth() * (SizeConfig.isWidthLarge?4:6.40), + fontWeight: FontWeight.bold, + letterSpacing: -1.44, + + ), + ], + ); + } +} \ No newline at end of file diff --git a/lib/screens/live_care/end_call_screen.dart b/lib/screens/live_care/end_call_screen.dart index 62b97f2d..35c00beb 100644 --- a/lib/screens/live_care/end_call_screen.dart +++ b/lib/screens/live_care/end_call_screen.dart @@ -61,9 +61,9 @@ class _EndCallScreenState extends State { Widget build(BuildContext context) { final List cardsList = [ PatientProfileCardModel(TranslationBase.of(context).resume, - TranslationBase.of(context).theCall, '', 'patient/vital_signs.png', + TranslationBase.of(context).theCall, '', 'assets/images/svgs/profile_screen/vital signs.svg', isInPatient: isInpatient, - color: Colors.green[800], + color: AppGlobal.appGreenColor, onTap: () async { GifLoaderDialogUtils.showMyDialog(context); await liveCareModel @@ -122,7 +122,7 @@ class _EndCallScreenState extends State { TranslationBase.of(context).endLC, TranslationBase.of(context).consultation, '', - 'patient/vital_signs.png', + 'assets/images/svgs/profile_screen/vital signs.svg', isInPatient: isInpatient, color: Colors.red[800], onTap: () { @@ -155,7 +155,7 @@ class _EndCallScreenState extends State { TranslationBase.of(context).sendLC, TranslationBase.of(context).instruction, "", - 'patient/health_summary.png', + 'assets/images/svgs/profile_screen/health summary.svg', onTap: () { Helpers.showConfirmationDialog(context, "${TranslationBase.of(context).areYouSureYouWantTo} ${TranslationBase.of(context).sendLC} ${TranslationBase.of(context).instruction} ?", @@ -179,7 +179,7 @@ class _EndCallScreenState extends State { TranslationBase.of(context).transferTo, TranslationBase.of(context).admin, '', - 'patient/health_summary.png', onTap: () { + 'assets/images/svgs/profile_screen/health summary.svg', onTap: () { Navigator.push( context, MaterialPageRoute( @@ -347,7 +347,7 @@ class _EndCallScreenState extends State { }, title: TranslationBase.of(context).noteConfirm, fontColor: Colors.white, - color: Colors.green[600], + color: AppGlobal.appGreenColor, ), AppButton( onPressed: () { diff --git a/lib/screens/live_care/live_care_patient_screen.dart b/lib/screens/live_care/live_care_patient_screen.dart index a9c7b38f..a434a212 100644 --- a/lib/screens/live_care/live_care_patient_screen.dart +++ b/lib/screens/live_care/live_care_patient_screen.dart @@ -7,6 +7,7 @@ import 'package:doctor_app_flutter/core/viewModel/LiveCarePatientViewModel.dart' import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_header.dart'; import 'package:doctor_app_flutter/util/NotificationPermissionUtils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/patient_card/PatientCard.dart'; @@ -60,7 +61,10 @@ class _LiveCarePatientScreenState extends State { }, builder: (_, model, w) => AppScaffold( baseViewModel: model, - isShowAppBar: false, + isShowAppBar: true, + appBar: PatientSearchHeader( + title: "LiveCare Patients", + ), body: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -69,25 +73,7 @@ class _LiveCarePatientScreenState extends State { decoration: BoxDecoration( color: Colors.white, ), - child: Container( - padding: EdgeInsets.only(left: 10, right: 10, bottom: 10), - margin: EdgeInsets.only(top: 50), - child: Row(children: [ - IconButton( - icon: Icon(Icons.arrow_back_ios), - color: Colors.black, //Colors.black, - onPressed: () => Navigator.pop(context), - ), - Expanded( - child: AppText( - "LiveCare Patients", - fontSize: SizeConfig.textMultiplier * 2.8, - fontWeight: FontWeight.bold, - color: Color(0xFF2B353E), - ), - ), - ]), - ), + child: Container(), ), SizedBox( height: 20, @@ -159,7 +145,7 @@ class _LiveCarePatientScreenState extends State { )), // AppButton( // fontWeight: FontWeight.w700, - // color:Colors.green[600], + // color:AppGlobal.appGreenColor[600], // title: TranslationBase.of(context).initiateCall, // disabled: model.state == ViewState.BusyLocal, // onPressed: () async { diff --git a/lib/screens/live_care/video_call.dart b/lib/screens/live_care/video_call.dart index e024624a..2d3f1d15 100644 --- a/lib/screens/live_care/video_call.dart +++ b/lib/screens/live_care/video_call.dart @@ -1,5 +1,6 @@ import 'dart:async'; +import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/core/viewModel/LiveCarePatientViewModel.dart'; import 'package:doctor_app_flutter/core/viewModel/livecare_view_model.dart'; @@ -242,7 +243,7 @@ class _VideoCallPageState extends State { onPressed: () => {resumeCall()}, child: Text(TranslationBase.of(context).resumecall), - color: Colors.green[900], + color: AppGlobal.appGreenColor, textColor: Colors.white, ), ), diff --git a/lib/screens/medicine/medicine_search_screen.dart b/lib/screens/medicine/medicine_search_screen.dart index 6ebb2fc8..4998e99c 100644 --- a/lib/screens/medicine/medicine_search_screen.dart +++ b/lib/screens/medicine/medicine_search_screen.dart @@ -7,6 +7,7 @@ import 'package:doctor_app_flutter/core/model/search_drug/get_medication_respons import 'package:doctor_app_flutter/core/viewModel/medicine_view_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/medicine/pharmacies_list_screen.dart'; +import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_header.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; @@ -124,7 +125,10 @@ class _MedicineSearchState extends State { return AppScaffold( // baseViewModel: model, isShowAppBar: true, - appBarTitle: TranslationBase.of(context).searchMedicine, + appBar: PatientSearchHeader( + title: TranslationBase.of(context).searchMedicine, + ), + //appBarTitle: TranslationBase.of(context).searchMedicine + "6", body: SingleChildScrollView( child: FractionallySizedBox( widthFactor: 0.97, diff --git a/lib/screens/patient-sick-leave/add_patient_sick_leave_screen.dart b/lib/screens/patient-sick-leave/add_patient_sick_leave_screen.dart index 8c9f0f1d..68e29870 100644 --- a/lib/screens/patient-sick-leave/add_patient_sick_leave_screen.dart +++ b/lib/screens/patient-sick-leave/add_patient_sick_leave_screen.dart @@ -36,9 +36,7 @@ class AddPatientSickLeaveScreen extends StatefulWidget { final SickLeaveViewModel previousModel; AddPatientSickLeaveScreen( - {this.appointmentNo, - this.patientMRN, - this.patient, this.previousModel}); + {this.appointmentNo, this.patientMRN, this.patient, this.previousModel}); @override _AddPatientSickLeaveScreenState createState() => @@ -59,9 +57,9 @@ class _AddPatientSickLeaveScreenState extends State { void _presentDatePicker() { showDatePicker( context: context, - initialDate: currentDate??DateTime.now(), - firstDate: DateTime(DateTime.now().year-1), - lastDate: DateTime(DateTime.now().year+1), + initialDate: currentDate ?? DateTime.now(), + firstDate: DateTime(DateTime.now().year - 1), + lastDate: DateTime(DateTime.now().year + 1), ).then((pickedDate) { if (pickedDate == null) { return; @@ -70,7 +68,9 @@ class _AddPatientSickLeaveScreenState extends State { final df = new DateFormat('yyyy-MM-dd'); addSickLeave.startDate = df.format(pickedDate); currentDate = pickedDate; - _toDateController.text = AppDateUtils.getDayMonthYearDateFormatted(pickedDate,isMonthShort: true ); + _toDateController.text = AppDateUtils.getDayMonthYearDateFormatted( + pickedDate, + isMonthShort: true); }); }); } @@ -91,256 +91,251 @@ class _AddPatientSickLeaveScreenState extends State { widget.appointmentNo, widget.patientMRN); }, builder: (_, model, w) => GestureDetector( - onTap: () { - FocusScope.of(context).requestFocus(new FocusNode()); - }, - child: AppScaffold( - baseViewModel: model, - appBar: BottomSheetTitle( - title: TranslationBase.of(context).addSickLeave, - ), - isShowAppBar: true, - body: Center( - child: Container( - margin: EdgeInsets.only(top: 10), - child: FractionallySizedBox( - widthFactor: 0.9, - child: ListView( - children: [ - SizedBox( - height: 30, - ), - AppTextFieldCustom( - height: Helpers.getTextFieldHeight(), - hintText: TranslationBase.of(context).sickLeave + - ' ' + - TranslationBase.of(context).days, - maxLines: 1, - minLines: 1, - dropDownColor: Colors.white, - isTextFieldHasSuffix: true, - inputFormatters: [ - FilteringTextInputFormatter.allow( - RegExp(ONLY_NUMBERS)) - ], - inputType:TextInputType.number, - controller: _numberOfDayController, - onChanged: (value) { - if(value.isNotEmpty) - setState(() { - addSickLeave.noOfDays = value; - }); - - }, - validationError: isFormSubmitted && - (addSickLeave.noOfDays == null) - ? TranslationBase.of(context) - .pleaseEnterNoOfDays - : null, - ), - SizedBox( - height: 10, - ), - AppTextFieldCustom( - height: Helpers.getTextFieldHeight(), - onClick: () { - Helpers.hideKeyboard(context); - _presentDatePicker(); - }, - hintText: TranslationBase.of(context) - .sickLeaveDate, - enabled: false, - maxLines: 1, - minLines: 1, - isTextFieldHasSuffix: true, - suffixIcon: IconButton( - icon: Icon(Icons.calendar_today)), - inputFormatters: [ - FilteringTextInputFormatter.allow( - RegExp(ONLY_NUMBERS)) - ], - controller: _toDateController, - onChanged: (value) { - setState(() { - addSickLeave.startDate = value; - }); - - }, - validationError: isFormSubmitted && - (addSickLeave.startDate == null) - ? TranslationBase.of(context) - .pleaseEnterDate - : null, - ), - SizedBox( - height: 5, - ), - AppTextFieldCustom( - height: Helpers.getTextFieldHeight(), - hintText: TranslationBase.of(context).clinic, - enabled: false, - maxLines: 1, - minLines: 1, - dropDownColor: Colors.white, - isTextFieldHasSuffix: true, - inputFormatters: [ - FilteringTextInputFormatter.allow( - RegExp(ONLY_NUMBERS)) - ], - controller: _clinicController, - onChanged: (value) {}, - ), - SizedBox( - height: 10, - ), - model.sickLeaveStatistics.recommendedSickLeaveDays!= - null - ? Row( - crossAxisAlignment: - CrossAxisAlignment.center, + onTap: () { + FocusScope.of(context).requestFocus(new FocusNode()); + }, + child: AppScaffold( + baseViewModel: model, + appBar: BottomSheetTitle( + title: TranslationBase.of(context).addSickLeave, + ), + isShowAppBar: true, + body: Center( + child: Container( + margin: EdgeInsets.only(top: 10), + child: FractionallySizedBox( + widthFactor: 0.9, + child: ListView( children: [ SizedBox( - width: 10, + height: 30, ), - Icon( - DoctorApp.warning, - size: 20, - color: IN_PROGRESS_COLOR, + AppTextFieldCustom( + height: Helpers.getTextFieldHeight(), + hintText: TranslationBase.of(context).sickLeave + + ' ' + + TranslationBase.of(context).days, + maxLines: 1, + minLines: 1, + dropDownColor: Colors.white, + isTextFieldHasSuffix: true, + inputFormatters: [ + FilteringTextInputFormatter.allow( + RegExp(ONLY_NUMBERS)) + ], + inputType: TextInputType.number, + controller: _numberOfDayController, + onChanged: (value) { + if (value.isNotEmpty) + setState(() { + addSickLeave.noOfDays = value; + }); + }, + validationError: isFormSubmitted && + (addSickLeave.noOfDays == null) + ? TranslationBase.of(context) + .pleaseEnterNoOfDays + : null, ), SizedBox( - width: 10, + height: 10, ), - Expanded( - child: AppText( - model.sickLeaveStatistics.recommendedSickLeaveDays, - textAlign: TextAlign.start, - fontSize: 12, - color: IN_PROGRESS_COLOR, - ), + AppTextFieldCustom( + height: Helpers.getTextFieldHeight(), + onClick: () { + Helpers.hideKeyboard(context); + _presentDatePicker(); + }, + hintText: + TranslationBase.of(context).sickLeaveDate, + enabled: false, + maxLines: 1, + minLines: 1, + isTextFieldHasSuffix: true, + suffixIcon: + IconButton(icon: Icon(Icons.calendar_today)), + inputFormatters: [ + FilteringTextInputFormatter.allow( + RegExp(ONLY_NUMBERS)) + ], + controller: _toDateController, + onChanged: (value) { + setState(() { + addSickLeave.startDate = value; + }); + }, + validationError: isFormSubmitted && + (addSickLeave.startDate == null) + ? TranslationBase.of(context).pleaseEnterDate + : null, + ), + SizedBox( + height: 5, + ), + AppTextFieldCustom( + height: Helpers.getTextFieldHeight(), + hintText: TranslationBase.of(context).clinic, + enabled: false, + maxLines: 1, + minLines: 1, + dropDownColor: Colors.white, + isTextFieldHasSuffix: true, + inputFormatters: [ + FilteringTextInputFormatter.allow( + RegExp(ONLY_NUMBERS)) + ], + controller: _clinicController, + onChanged: (value) {}, + ), + SizedBox( + height: 10, + ), + model.sickLeaveStatistics + .recommendedSickLeaveDays != + null + ? Row( + crossAxisAlignment: + CrossAxisAlignment.center, + children: [ + SizedBox( + width: 10, + ), + Icon( + DoctorApp.warning, + size: 20, + color: IN_PROGRESS_COLOR, + ), + SizedBox( + width: 10, + ), + Expanded( + child: AppText( + model.sickLeaveStatistics + .recommendedSickLeaveDays, + textAlign: TextAlign.start, + fontSize: 12, + color: IN_PROGRESS_COLOR, + ), + ), + ], + ) + : SizedBox( + height: 10, + ), + SizedBox( + height: 10, + ), + AppTextFieldCustom( + height: Helpers.getTextFieldHeight(), + hintText: TranslationBase.of(context).doctor, + enabled: false, + maxLines: 1, + minLines: 1, + dropDownColor: Colors.white, + isTextFieldHasSuffix: true, + inputFormatters: [ + FilteringTextInputFormatter.allow( + RegExp(ONLY_NUMBERS)) + ], + controller: _doctorController, + onChanged: (value) {}, + ), + SizedBox( + height: 10, + ), + AppTextFieldCustom( + height: Helpers.getTextFieldHeight(), + hintText: TranslationBase.of(context).remarks, + maxLines: 30, + minLines: 5, + dropDownColor: Colors.white, + isTextFieldHasSuffix: true, + controller: _remarkController, + onChanged: (value) { + setState(() { + addSickLeave.remarks = value; + }); + }, + ), + SizedBox( + height: SizeConfig.heightMultiplier * + (SizeConfig.isHeightVeryShort ? 12 : 10) + + 20, ), ], - ) - : SizedBox( - height: 10, - ), - SizedBox( - height: 10, - ), - AppTextFieldCustom( - height: Helpers.getTextFieldHeight(), - hintText: TranslationBase.of(context).doctor, - enabled: false, - maxLines: 1, - minLines: 1, - dropDownColor: Colors.white, - isTextFieldHasSuffix: true, - inputFormatters: [ - FilteringTextInputFormatter.allow( - RegExp(ONLY_NUMBERS)) - ], - controller: _doctorController, - onChanged: (value) {}, - ), - SizedBox( - height: 10, - ), - AppTextFieldCustom( - height: Helpers.getTextFieldHeight(), - hintText: TranslationBase.of(context).remarks, - maxLines: 30, - minLines: 5, - dropDownColor: Colors.white, - isTextFieldHasSuffix: true, - controller: _remarkController, - onChanged: (value) { - setState(() { - addSickLeave.remarks = value; - }); - }, ), - - SizedBox( - height: SizeConfig.heightMultiplier * - (SizeConfig.isHeightVeryShort ? 12 : 10) +20, - ), - ], + ), ), ), - ), - ), - bottomSheet: model.state == ViewState.Busy || - model.state == ViewState.Busy - ? Container( - height: 0, - ) - : Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.all( - Radius.circular(0.0), - ), - border: Border.all( - color: HexColor('#707070'), width: 0), - ), - height: SizeConfig.heightMultiplier * - (SizeConfig.isHeightVeryShort ? 12 : 10), - width: double.infinity, - child: Column( - children: [ - SizedBox( - height: 10, - ), - FractionallySizedBox( - widthFactor: 0.9, - child: AppButton( - title: TranslationBase.of(context) - .addSickLeaverequest, - color: Colors.green, - onPressed: () async { - submitForm(model); - }), - ), - SizedBox( - height: 5, - ), - ], - ), - )), - )); + bottomSheet: model.state == ViewState.Busy || + model.state == ViewState.Busy + ? Container( + height: 0, + ) + : Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(0.0), + ), + border: Border.all( + color: HexColor('#707070'), width: 0), + ), + height: SizeConfig.heightMultiplier * + (SizeConfig.isHeightVeryShort ? 12 : 10), + width: double.infinity, + child: Column( + children: [ + SizedBox( + height: 10, + ), + FractionallySizedBox( + widthFactor: 0.9, + child: AppButton( + title: TranslationBase.of(context) + .addSickLeaverequest, + color: AppGlobal.appGreenColor, + onPressed: () async { + submitForm(model); + }), + ), + SizedBox( + height: 5, + ), + ], + ), + )), + )); } submitForm(SickLeaveViewModel model) async { { - try { - setState(() { - isFormSubmitted = true; - }); - if (addSickLeave.noOfDays == null || - addSickLeave.startDate == null ) { - return; + try { + setState(() { + isFormSubmitted = true; + }); + if (addSickLeave.noOfDays == null || addSickLeave.startDate == null) { + return; + } else { + GifLoaderDialogUtils.showMyDialog(context); + addSickLeave.patientMRN = widget.patient.patientMRN.toString(); + addSickLeave.appointmentNo = widget.patient.appointmentNo.toString(); + await model.addSickLeave(addSickLeave); + if (model.state == ViewState.ErrorLocal) { + Helpers.showErrorToast(model.error); } else { - GifLoaderDialogUtils.showMyDialog(context); - addSickLeave.patientMRN = widget.patient.patientMRN.toString(); - addSickLeave.appointmentNo = - widget.patient.appointmentNo.toString(); - await model.addSickLeave(addSickLeave); - if (model.state == ViewState.ErrorLocal) { - Helpers.showErrorToast(model.error); - } else { - await widget.previousModel - .getSickLeaveForPatient(widget.patient, isLocalBusy: true); - DrAppToastMsg.showSuccesToast( - TranslationBase.of(context).replySuccessfully); - Navigator.of(context).pop(); - } - - GifLoaderDialogUtils.hideDialog(context); + await widget.previousModel + .getSickLeaveForPatient(widget.patient, isLocalBusy: true); + DrAppToastMsg.showSuccesToast( + TranslationBase.of(context).replySuccessfully); + Navigator.of(context).pop(); } - } catch (err) { - print(err); - } + GifLoaderDialogUtils.hideDialog(context); + } + } catch (err) { + print(err); + } } } - } diff --git a/lib/screens/patients/In_patient/InPatientHeader.dart b/lib/screens/patients/In_patient/InPatientHeader.dart index 3bb2afa5..16083b84 100644 --- a/lib/screens/patients/In_patient/InPatientHeader.dart +++ b/lib/screens/patients/In_patient/InPatientHeader.dart @@ -5,6 +5,7 @@ import 'package:doctor_app_flutter/models/dashboard/get_special_clinical_care_Li import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:provider/provider.dart'; class InPatientHeader extends StatelessWidget with PreferredSizeWidget { @@ -36,15 +37,16 @@ class InPatientHeader extends StatelessWidget with PreferredSizeWidget { child: Row(children: [ IconButton( icon: Icon(Icons.arrow_back_ios), - color: Colors.black, //Colors.black, + color: Color(0xFF2B353E), //Colors.black, onPressed: () => Navigator.pop(context), ), Expanded( child: AppText( TranslationBase.of(context).inPatient, - fontSize: SizeConfig.textMultiplier * 2.8, - fontWeight: FontWeight.bold, + fontSize: 24.0, + fontWeight: FontWeight.w700, color: Color(0xFF2B353E), + letterSpacing: -1.44, ), ), if (model.specialClinicalCareMappingList.isNotEmpty && @@ -57,9 +59,8 @@ class InPatientHeader extends StatelessWidget with PreferredSizeWidget { dropdownColor: Colors.white, iconEnabledColor: Colors.black, isExpanded: true, - value: selectedMapId == null - ? model.specialClinicalCareMappingList[0].nursingStationID - : selectedMapId, + value: selectedMapId ?? + model.specialClinicalCareMappingList[0].nursingStationID, iconSize: 25, elevation: 16, selectedItemBuilder: (BuildContext context) { @@ -94,7 +95,10 @@ class InPatientHeader extends StatelessWidget with PreferredSizeWidget { )), ], ), - AppText(item.description, + AppText( + selectedMapId == null + ? TranslationBase.of(context).all + : item.description, fontSize: 12, color: Colors.black, fontWeight: FontWeight.bold, diff --git a/lib/screens/patients/In_patient/in_patient_list_page.dart b/lib/screens/patients/In_patient/in_patient_list_page.dart index 6e9ad14f..7498257d 100644 --- a/lib/screens/patients/In_patient/in_patient_list_page.dart +++ b/lib/screens/patients/In_patient/in_patient_list_page.dart @@ -53,6 +53,7 @@ class _InPatientListPageState extends State { return AppScaffold( baseViewModel: widget.patientSearchViewModel, isShowAppBar: false, + backgroundColor: Color(0xFFF8F8F8), body: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ diff --git a/lib/screens/patients/In_patient/in_patient_screen.dart b/lib/screens/patients/In_patient/in_patient_screen.dart index d7bd805a..cadab9be 100644 --- a/lib/screens/patients/In_patient/in_patient_screen.dart +++ b/lib/screens/patients/In_patient/in_patient_screen.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart'; @@ -62,7 +63,6 @@ class _InPatientScreenState extends State Widget build(BuildContext context) { final screenSize = MediaQuery.of(context).size; PatientSearchRequestModel requestModel = PatientSearchRequestModel(); - ProjectViewModel projectsProvider = Provider.of(context); return BaseView( onModelReady: (model) async { @@ -70,8 +70,8 @@ class _InPatientScreenState extends State if (widget.specialClinic != null) { await model .getSpecialClinicalCareMappingList(widget.specialClinic.clinicID); - requestModel.nursingStationID = - model.specialClinicalCareMappingList[0].nursingStationID; + // requestModel.nursingStationID = + // model.specialClinicalCareMappingList[0].nursingStationID; } requestModel.clinicID = 0; await model.getInPatientList(requestModel); @@ -111,6 +111,7 @@ class _InPatientScreenState extends State Expanded( child: Scaffold( extendBodyBehindAppBar: false, + appBar: PreferredSize( preferredSize: Size.fromHeight( MediaQuery.of(context).size.height * 0.070), @@ -123,26 +124,30 @@ class _InPatientScreenState extends State width: 0.5), //width: 0.7 ), color: Colors.white), - child: Center( + child: Container( + margin: EdgeInsets.only(top: 9), + color: Helpers.getBgTabColor(), + child: TabBar( isScrollable: false, controller: _tabController, - indicatorColor: Colors.transparent, - indicatorWeight: 1.0, - indicatorSize: TabBarIndicatorSize.tab, - labelColor: Theme.of(context).primaryColor, + indicatorColor: AppGlobal.appRedColor, + indicatorWeight: 0.001, + indicator:BoxDecoration(), + // indicatorSize: TabBarIndicatorSize.tab, + // labelColor: Theme.of(context).primaryColor, labelPadding: EdgeInsets.only( top: 0, left: 0, right: 0, bottom: 0), - unselectedLabelColor: Colors.grey[800], + // unselectedLabelColor: Colors.grey[800], tabs: [ tabWidget(screenSize, _activeTab == 0, - TranslationBase.of(context).inPatientAll, - counter: model.inPatientList.length), + TranslationBase.of(context).inPatientAll,context: context, + counter: model.inPatientList.length, isFirst: true), tabWidget(screenSize, _activeTab == 1, TranslationBase.of(context).myInPatientTitle, - counter: model.myIinPatientList.length), + counter: model.myIinPatientList.length, isMiddle: true, context: context,), tabWidget(screenSize, _activeTab == 2, - TranslationBase.of(context).discharged), + TranslationBase.of(context).discharged, isLast:true, context: context,), ], ), ), @@ -192,44 +197,24 @@ class _InPatientScreenState extends State } Widget tabWidget(Size screenSize, bool isActive, String title, - {int counter = -1}) { + {int counter = -1, + bool isFirst = false, + bool isMiddle = false, + bool isLast = false,BuildContext context}) { + + ProjectViewModel projectsProvider = Provider.of(context); + + return Center( child: Container( - height: screenSize.height * 0.070, - decoration: TextFieldsUtils.containerBorderDecoration( - isActive ? Color(0xFFD02127 /*B8382B*/) : Color(0xFFEAEAEA), - isActive ? Color(0xFFD02127) : Color(0xFFEAEAEA), - borderRadius: 4, - borderWidth: 0), + height: Helpers.getTabHeight(context), + decoration:Helpers.getBoxTabsBoxDecoration(isActive: isActive,isFirst: isFirst, isMiddle: isMiddle, isLast: isLast,projectViewModel: projectsProvider), child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - AppText( - title, - fontSize: SizeConfig.textMultiplier * 1.5, - color: isActive ? Colors.white : Color(0xFF2B353E), - fontWeight: FontWeight.w700, - ), + Helpers.getTabText(title:title, isActive:isActive), if (counter != -1) - Container( - margin: EdgeInsets.all(4), - width: 15, - height: 15, - decoration: BoxDecoration( - color: isActive ? Colors.white : Color(0xFFD02127), - shape: BoxShape.circle, - ), - child: Center( - child: FittedBox( - child: AppText( - "$counter", - fontSize: SizeConfig.textMultiplier * 1.5, - color: !isActive ? Colors.white : Color(0xFFD02127), - fontWeight: FontWeight.w700, - ), - ), - ), - ), + Helpers.getTabCounter(isActive:isActive,counter:counter) ], ), ), diff --git a/lib/screens/patients/ReferralDischargedPatientDetails.dart b/lib/screens/patients/ReferralDischargedPatientDetails.dart index f78752ec..a52df188 100644 --- a/lib/screens/patients/ReferralDischargedPatientDetails.dart +++ b/lib/screens/patients/ReferralDischargedPatientDetails.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/model/referral/DischargeReferralPatient.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart'; @@ -122,7 +123,7 @@ class ReferralDischargedPatientDetails extends StatelessWidget { color: referredPatient.referralStatus == 1 ? Color(0xffc4aa54) : referredPatient.referralStatus == 46 - ? Colors.green[700] + ? AppGlobal.appGreenColor : Colors.red[700], ), AppText( diff --git a/lib/screens/patients/insurance_approval_screen_patient.dart b/lib/screens/patients/insurance_approval_screen_patient.dart index 2c89425e..0ad4abd0 100644 --- a/lib/screens/patients/insurance_approval_screen_patient.dart +++ b/lib/screens/patients/insurance_approval_screen_patient.dart @@ -6,6 +6,7 @@ import 'package:doctor_app_flutter/locator.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/patients/insurance_approvals_details.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/patient_service_title.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; @@ -22,10 +23,12 @@ class InsuranceApprovalScreenNew extends StatefulWidget { InsuranceApprovalScreenNew({this.appointmentNo}); @override - _InsuranceApprovalScreenNewState createState() => _InsuranceApprovalScreenNewState(); + _InsuranceApprovalScreenNewState createState() => + _InsuranceApprovalScreenNewState(); } -class _InsuranceApprovalScreenNewState extends State { +class _InsuranceApprovalScreenNewState + extends State { @override Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); @@ -39,9 +42,11 @@ class _InsuranceApprovalScreenNewState extends State ? (model) => model.getInsuranceInPatient(mrn: patient.patientId) : patient.appointmentNo != null ? (model) => model.getInsuranceApproval(patient, - appointmentNo: int.parse(patient?.appointmentNo.toString()), projectId: patient.projectId) + appointmentNo: int.parse(patient?.appointmentNo.toString()), + projectId: patient.projectId) : (model) => model.getInsuranceApproval(patient), - builder: (BuildContext context, InsuranceViewModel model, Widget child) => AppScaffold( + builder: (BuildContext context, InsuranceViewModel model, Widget child) => + AppScaffold( appBar: PatientProfileAppBar( patient, isInpatient: isInpatient, @@ -59,32 +64,11 @@ class _InsuranceApprovalScreenNewState extends State ), child: model.insuranceApprovalInPatient.length != 0 ? Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ - Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - children: [ - Row( - children: [ - AppText( - TranslationBase.of(context).insurance22, - fontSize: 15.0, - fontWeight: FontWeight.w600, - fontFamily: 'Poppins', - ), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context).approvals22, - fontSize: 30.0, - fontWeight: FontWeight.w700, - ), - ], - ), - ], - ), + ServiceTitle( + title: TranslationBase.of(context).insurance22, + subTitle: TranslationBase.of(context).approvals22, ), ...List.generate( model.insuranceApprovalInPatient.length, @@ -94,25 +78,40 @@ class _InsuranceApprovalScreenNewState extends State Navigator.push( context, MaterialPageRoute( - builder: (context) => InsuranceApprovalsDetails( + builder: (context) => + InsuranceApprovalsDetails( patient: patient, indexInsurance: index, patientType: patientType, ), - settings: RouteSettings(name: 'InsuranceApprovalsDetails'), + settings: RouteSettings( + name: 'InsuranceApprovalsDetails'), ), ); }, child: DoctorCardInsurance( patientOut: "In Patient", - profileUrl: model.insuranceApprovalInPatient[index].doctorImage, - clinic: model.insuranceApprovalInPatient[index].clinicName, - doctorName: model.insuranceApprovalInPatient[index].doctorName, - branch: model.insuranceApprovalInPatient[index].approvalNo.toString(), - isPrescriptions: true, - approvalStatus: - model.insuranceApprovalInPatient[index].approvalStatusDescption ?? '', - branch2: model.insuranceApprovalInPatient[index].projectName, + profileUrl: model + .insuranceApprovalInPatient[index] + .doctorImage, + clinic: model + .insuranceApprovalInPatient[index] + .clinicName, + doctorName: model + .insuranceApprovalInPatient[index] + .doctorName, + approvalNo: model + .insuranceApprovalInPatient[index] + .approvalNo + .toString(), + isInsurance: true, + approvalStatus: model + .insuranceApprovalInPatient[index] + .approvalStatusDescption ?? + '', + branch2: model + .insuranceApprovalInPatient[index] + .projectName, ), ), ), @@ -129,7 +128,8 @@ class _InsuranceApprovalScreenNewState extends State Image.asset('assets/images/no-data.png'), Padding( padding: const EdgeInsets.all(8.0), - child: AppText(TranslationBase.of(context).noInsuranceApprovalFound), + child: AppText(TranslationBase.of(context) + .noInsuranceApprovalFound), ), SizedBox( height: 150.0, @@ -149,62 +149,57 @@ class _InsuranceApprovalScreenNewState extends State child: model.insuranceApproval.length != 0 ? Column( children: [ - Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - children: [ - Row( - children: [ - AppText( - TranslationBase.of(context).insurance22, - fontSize: 15.0, - fontWeight: FontWeight.w600, - fontFamily: 'Poppins', - ), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context).approvals22, - fontSize: 30.0, - fontWeight: FontWeight.w700, - ), - ], - ), - ], - ), + ServiceTitle( + title: TranslationBase.of(context).insurance22, + subTitle: + TranslationBase.of(context).approvals22, ), ...List.generate( model.insuranceApproval.length, (index) => Container( child: InkWell( onTap: () async { - await locator().logEvent( - eventCategory: "Insurance Approval Screen New", - eventAction: "Insurance Approval Details", + await locator() + .logEvent( + eventCategory: + "Insurance Approval Screen New", + eventAction: + "Insurance Approval Details", ); Navigator.push( context, MaterialPageRoute( - builder: (context) => InsuranceApprovalsDetails( + builder: (context) => + InsuranceApprovalsDetails( patient: patient, indexInsurance: index, patientType: patientType, ), - settings: RouteSettings(name: 'InsuranceApprovalsDetails'), + settings: RouteSettings( + name: + 'InsuranceApprovalsDetails'), ), ); }, child: DoctorCardInsurance( - patientOut: model.insuranceApproval[index].patientDescription, - profileUrl: model.insuranceApproval[index].doctorImage, - clinic: model.insuranceApproval[index].clinicName, - doctorName: model.insuranceApproval[index].doctorName, - branch: model.insuranceApproval[index].approvalNo.toString(), - isPrescriptions: true, - approvalStatus: model.insuranceApproval[index].approvalStatusDescption ?? '', - branch2: model.insuranceApproval[index].projectName, + patientOut: model.insuranceApproval[index] + .patientDescription, + profileUrl: model + .insuranceApproval[index].doctorImage, + clinic: model + .insuranceApproval[index].clinicName, + doctorName: model + .insuranceApproval[index].doctorName, + approvalNo: model + .insuranceApproval[index].approvalNo + .toString(), + isInsurance: true, + approvalStatus: model + .insuranceApproval[index] + .approvalStatusDescption ?? + '', + branch2: model + .insuranceApproval[index].projectName, ), ), ), @@ -221,7 +216,8 @@ class _InsuranceApprovalScreenNewState extends State Image.asset('assets/images/no-data.png'), Padding( padding: const EdgeInsets.all(8.0), - child: AppText(TranslationBase.of(context).noInsuranceApprovalFound), + child: AppText(TranslationBase.of(context) + .noInsuranceApprovalFound), ) ], ), diff --git a/lib/screens/patients/insurance_approvals_details.dart b/lib/screens/patients/insurance_approvals_details.dart index 0945df37..e81a843a 100644 --- a/lib/screens/patients/insurance_approvals_details.dart +++ b/lib/screens/patients/insurance_approvals_details.dart @@ -5,9 +5,11 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/patient_service_title.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/user-guid/CusomRow.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; @@ -54,38 +56,16 @@ class _InsuranceApprovalsDetailsState extends State { AppScaffold( isShowAppBar: true, baseViewModel: model, - appBar: PatientProfileAppBar( - patient), + appBar: PatientProfileAppBar(patient), body: patient.admissionNo != null ? SingleChildScrollView( child: Container( child: Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ - Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - children: [ - Row( - children: [ - AppText( - TranslationBase.of(context).insurance22, - fontSize: 15.0, - fontWeight: FontWeight.w600, - fontFamily: 'Poppins', - ), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context).approvals22, - fontSize: 30.0, - fontWeight: FontWeight.w700, - ), - ], - ), - ], - ), + ServiceTitle( + title: TranslationBase.of(context).insurance22, + subTitle: TranslationBase.of(context).approvals22, ), Container( margin: EdgeInsets.all(10), @@ -128,6 +108,11 @@ class _InsuranceApprovalsDetailsState extends State { ? Color(0xff359846) : Color(0xffD02127) : Color(0xffD02127), + letterSpacing: -0.4, + fontWeight: FontWeight.w600, + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 2.7, ), ], ), @@ -139,9 +124,10 @@ class _InsuranceApprovalsDetailsState extends State { indexInsurance] .doctorName .toUpperCase(), - color: Colors.black, - fontSize: 18, - fontWeight: FontWeight.bold, + color: Color(0xff2E303A), + fontSize: 16, + letterSpacing: -0.64, + fontWeight: FontWeight.w600, ) ], ), @@ -153,8 +139,14 @@ class _InsuranceApprovalsDetailsState extends State { Column( children: [ Container( - height: 85.0, - width: 85.0, + height: MediaQuery.of(context) + .size + .height * + 0.065, + width: MediaQuery.of(context) + .size + .height * + 0.065, child: CircleAvatar( radius: SizeConfig .imageSizeMultiplier * @@ -192,112 +184,55 @@ class _InsuranceApprovalsDetailsState extends State { SizedBox( height: 25.0, ), - Row( - children: [ - AppText( - TranslationBase.of( - context) - .clinic + - ": ", - color: Colors.grey[500], - fontSize: 14, - ), - Expanded( - child: AppText( - model - .insuranceApprovalInPatient[ - indexInsurance] - .clinicName, - fontSize: 14, - ), - ) - ], + CustomRow( + label: TranslationBase.of( + context) + .clinic + + ": ", + value: model + .insuranceApprovalInPatient[ + indexInsurance] + .clinicName, ), - Row( - children: [ - AppText( - TranslationBase.of( - context) - .approvalNo + - ": ", - color: Colors.grey[500], - fontSize: 14, - ), - AppText( - model - .insuranceApprovalInPatient[ - indexInsurance] - .approvalNo - .toString(), - fontSize: 14, - ) - ], - ), - Row( - children: [ - AppText( - 'Unused Count:', - color: Colors.grey[500], - fontSize: 14, - ), - AppText( - model - .insuranceApprovalInPatient[ - indexInsurance] - .unUsedCount - .toString(), - fontSize: 14, - ) - ], - ), - Row( - children: [ - AppText( - TranslationBase.of( - context) - .companyName + - ": ", - color: Colors.grey[500], - ), - AppText('Sample') - ], - ), - Row( - children: [ - AppText( - TranslationBase.of( - context) - .receiptOn + - ": ", - color: Colors.grey[500], - ), - Expanded( - child: AppText( - '${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(model.insuranceApprovalInPatient[indexInsurance].receiptOn), isArabic: projectViewModel.isArabic)}', - color: Colors.black, - fontWeight: - FontWeight.w600, - ), - ), - ], + CustomRow( + label: TranslationBase.of( + context) + .approvalNo + + ": ", + value: model + .insuranceApprovalInPatient[ + indexInsurance] + .approvalNo + .toString(), ), - Row( - children: [ - AppText( - TranslationBase.of( - context) - .expiryDate + - ": ", - color: Colors.grey[500], - ), - AppText( - '${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(model.insuranceApprovalInPatient[indexInsurance].expiryDate), isArabic: projectViewModel.isArabic)}', - color: Colors.black, - fontWeight: - FontWeight.w600, - ), - ], + CustomRow( + label: 'Unused Count:', + value: model + .insuranceApprovalInPatient[ + indexInsurance] + .unUsedCount + .toString(), ), + CustomRow( + label: TranslationBase.of( + context) + .companyName + + ": ", + value: 'Sample'), + CustomRow( + label: TranslationBase.of( + context) + .receiptOn + + ": ", + value: + '${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(model.insuranceApprovalInPatient[indexInsurance].receiptOn ?? ""), isArabic: projectViewModel.isArabic)}'), + CustomRow( + label: TranslationBase.of( + context) + .expiryDate + + ": ", + value: + '${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(model.insuranceApprovalInPatient[indexInsurance].expiryDate ?? ""), isArabic: projectViewModel.isArabic)}'), ], ), ), @@ -320,21 +255,36 @@ class _InsuranceApprovalsDetailsState extends State { child: AppText( TranslationBase.of(context) .procedure, - fontWeight: FontWeight.w700, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.48, + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 2.9, ), ), Expanded( child: AppText( TranslationBase.of(context) .status, - fontWeight: FontWeight.w700, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.48, + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 2.9, ), ), Expanded( child: AppText( TranslationBase.of(context) .usageStatus, - fontWeight: FontWeight.w700, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.48, + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 2.9, ), ) ], @@ -374,7 +324,18 @@ class _InsuranceApprovalsDetailsState extends State { "", textAlign: TextAlign - .start, + .center, + fontSize: + SizeConfig + .getTextMultiplierBasedOnWidth() * + 2.7, + letterSpacing: + -0.4, + color: Color( + 0xff575757), + fontWeight: + FontWeight + .w500, ), ), ), @@ -391,6 +352,17 @@ class _InsuranceApprovalsDetailsState extends State { textAlign: TextAlign .center, + fontSize: + SizeConfig + .getTextMultiplierBasedOnWidth() * + 2.7, + letterSpacing: + -0.4, + color: Color( + 0xff575757), + fontWeight: + FontWeight + .w500, ), ), ), @@ -407,6 +379,17 @@ class _InsuranceApprovalsDetailsState extends State { textAlign: TextAlign .center, + fontSize: + SizeConfig + .getTextMultiplierBasedOnWidth() * + 2.7, + letterSpacing: + -0.4, + color: Color( + 0xff575757), + fontWeight: + FontWeight + .w500, ), ), ), diff --git a/lib/screens/patients/out_patient/out_patient_screen.dart b/lib/screens/patients/out_patient/out_patient_screen.dart index e0e4fb4a..a43a4582 100644 --- a/lib/screens/patients/out_patient/out_patient_screen.dart +++ b/lib/screens/patients/out_patient/out_patient_screen.dart @@ -11,6 +11,7 @@ import 'package:doctor_app_flutter/models/patient/patient_model.dart'; import 'package:doctor_app_flutter/routes.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_header.dart'; +import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/patient_card/PatientCard.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; @@ -105,10 +106,8 @@ class _OutPatientsScreenState extends State { children: [ Container( // color: Colors.red, - height: screenSize.height * 0.070, - decoration: TextFieldsUtils.containerBorderDecoration( - Color(0Xffffffff), Color(0xFFCCCCCC), - borderRadius: 4, borderWidth: 0), + height: Helpers.getTabHeight(context), + color: Helpers.getBgTabColor(), child: Row( mainAxisSize: MainAxisSize.max, crossAxisAlignment: CrossAxisAlignment.center, @@ -143,52 +142,26 @@ class _OutPatientsScreenState extends State { child: Center( child: Container( height: screenSize.height * 0.070, - decoration: - TextFieldsUtils.containerBorderDecoration( - _isActive - ? Color(0xFFD02127 /*B8382B*/) - : Color(0xFFEAEAEA), - _isActive - ? Color(0xFFD02127) - : Color(0xFFEAEAEA), - borderRadius: 4, - borderWidth: 0), + decoration: Helpers.getBoxTabsBoxDecoration( + isActive: _isActive, + isFirst: _times.indexOf(item) == 0, + isLast: + _times.indexOf(item) == _times.length - 1, + isMiddle: _times.indexOf(item) != 0 && + _times.indexOf(item) != _times.length - 1, + projectViewModel: projectsProvider), child: Center( child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - AppText( - item, - fontSize: SizeConfig.textMultiplier * 1.8, - color: _isActive - ? Colors.white - : Color(0xFF2B353E), - fontWeight: FontWeight.w700, - ), + Helpers.getTabText( + title: item, isActive: _isActive), _isActive && _activeLocation != 0 && model.state == ViewState.Idle - ? Container( - padding: EdgeInsets.all(2), - margin: EdgeInsets.symmetric( - horizontal: 5), - decoration: new BoxDecoration( - color: Colors.white, - borderRadius: - BorderRadius.circular(50), - ), - constraints: BoxConstraints( - minWidth: 20, - minHeight: 20, - ), - child: new Text( - model.filterData.length.toString(), - style: new TextStyle( - color: Colors.red, - fontSize: 10), - textAlign: TextAlign.center, - ), - ) + ? Helpers.getTabCounter( + isActive: _isActive, + counter: model.filterData.length) : Container(), ], ), @@ -245,9 +218,6 @@ class _OutPatientsScreenState extends State { }, ), ), - SizedBox( - height: 10.0, - ), Expanded( child: Container( child: model.filterData.isEmpty @@ -269,7 +239,8 @@ class _OutPatientsScreenState extends State { .patientStatusType == 43)) return Padding( - padding: EdgeInsets.all(8.0), + padding: EdgeInsets.symmetric( + horizontal: 8, vertical: 0), child: PatientCard( patientInfo: model.filterData[index], patientType: patientType, diff --git a/lib/screens/patients/patient_search/patient_search_header.dart b/lib/screens/patients/patient_search/patient_search_header.dart index 7df6905f..2dd01e1a 100644 --- a/lib/screens/patients/patient_search/patient_search_header.dart +++ b/lib/screens/patients/patient_search/patient_search_header.dart @@ -9,27 +9,28 @@ class PatientSearchHeader extends StatelessWidget with PreferredSizeWidget { @override Widget build(BuildContext context) { - return Container( + return Container( padding: EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5), decoration: BoxDecoration( color: Colors.white, ), child: Container( - padding: EdgeInsets.only(left: 10, right: 10, bottom: 10), + padding: EdgeInsets.only(left: 10, right: 10, bottom: 5), margin: EdgeInsets.only(top: 35), child: Row(children: [ IconButton( icon: Icon(Icons.arrow_back_ios), - color: Colors.black, //Colors.black, + color: Color(0xFF2B353E), //Colors.black, onPressed: () => Navigator.pop(context), ), Expanded( child: AppText( title, - fontSize: SizeConfig.textMultiplier * 2.8, - fontWeight: FontWeight.bold, + fontSize: 24.0, + fontWeight: FontWeight.w700, color: Color(0xFF2B353E), fontFamily: 'Poppins', + letterSpacing: -1.44, ), ), ]), @@ -38,5 +39,5 @@ class PatientSearchHeader extends StatelessWidget with PreferredSizeWidget { } @override - Size get preferredSize => Size(double.maxFinite,65); + Size get preferredSize => Size(double.maxFinite, 65); } diff --git a/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart b/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart index 9268b031..901dcfe1 100644 --- a/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart +++ b/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; @@ -522,7 +523,7 @@ class ProceduresWidget extends StatelessWidget { AppText( "${procedure.isCovered}", fontWeight: FontWeight.normal, - color: procedure.isCovered ? Colors.green : Colors.red, + color: procedure.isCovered ? AppGlobal.appGreenColor : Colors.red, fontSize: SizeConfig.textMultiplier * 2.0, ), SizedBox( diff --git a/lib/screens/patients/profile/UCAF/page-stepper-widget.dart b/lib/screens/patients/profile/UCAF/page-stepper-widget.dart index da0381ed..6d9838f4 100644 --- a/lib/screens/patients/profile/UCAF/page-stepper-widget.dart +++ b/lib/screens/patients/profile/UCAF/page-stepper-widget.dart @@ -16,8 +16,9 @@ class PageStepperWidget extends StatelessWidget { final int stepsCount; final int currentStepIndex; final Size screenSize; + final List stepsTitles; - PageStepperWidget({this.stepsCount, this.currentStepIndex, this.screenSize}); + PageStepperWidget({this.stepsCount, this.currentStepIndex, this.screenSize, this.stepsTitles}); @override Widget build(BuildContext context) { @@ -33,10 +34,10 @@ class PageStepperWidget extends StatelessWidget { for (int i = 1; i <= stepsCount; i++) if (i == currentStepIndex) StepWidget(i, true, i == stepsCount, i < currentStepIndex, - dividerWidth) + dividerWidth, stepsTitles: stepsTitles,) else StepWidget(i, false, i == stepsCount, i < currentStepIndex, - dividerWidth) + dividerWidth, stepsTitles: stepsTitles,) ], ) ], @@ -52,9 +53,10 @@ class StepWidget extends StatelessWidget { final bool isFinalStep; final bool isStepFinish; final double dividerWidth; + final List stepsTitles; StepWidget(this.index, this.isInProgress, this.isFinalStep, this.isStepFinish, - this.dividerWidth); + this.dividerWidth, {this.stepsTitles}); @override Widget build(BuildContext context) { @@ -106,7 +108,7 @@ class StepWidget extends StatelessWidget { height: 8, ), AppText( - "${TranslationBase.of(context).step} $index", + stepsTitles == null ? "${TranslationBase.of(context).step} $index" : "${stepsTitles[index - 1]}", fontWeight: FontWeight.bold, color: status == StepStatus.Locked ? Color(0xFF969696) : Colors.black, fontFamily: 'Poppins', diff --git a/lib/screens/patients/profile/UCAF/ucaf_pager_screen.dart b/lib/screens/patients/profile/UCAF/ucaf_pager_screen.dart index 8c38ece7..b6fce680 100644 --- a/lib/screens/patients/profile/UCAF/ucaf_pager_screen.dart +++ b/lib/screens/patients/profile/UCAF/ucaf_pager_screen.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-ucaf-viewmodel.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; @@ -9,6 +10,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; import '../../../../routes.dart'; import 'UCAF-detail-screen.dart'; @@ -195,7 +197,7 @@ class _UCAFPagerScreenState extends State vPadding: 8, hPadding: 8, borderColor: Color(0xFFB8382B), - color: Color(0xFFB8382B), + color: AppGlobal.appRedColor, fontColor: Colors.white, fontSize: 2.0, onPressed: () { diff --git a/lib/screens/patients/profile/admission-orders/admission_orders_screen.dart b/lib/screens/patients/profile/admission-orders/admission_orders_screen.dart new file mode 100644 index 00000000..9719b525 --- /dev/null +++ b/lib/screens/patients/profile/admission-orders/admission_orders_screen.dart @@ -0,0 +1,299 @@ +import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/pednding_orders_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; +import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class AdmissionOrdersScreen extends StatefulWidget { + const AdmissionOrdersScreen({Key key}) : super(key: key); + + @override + _AdmissionOrdersScreenState createState() => _AdmissionOrdersScreenState(); +} + +class _AdmissionOrdersScreenState extends State { + bool isDischargedPatient = false; + + AuthenticationViewModel authenticationViewModel; + + ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + authenticationViewModel = Provider.of(context); + projectViewModel = Provider.of(context); + final routeArgs = ModalRoute.of(context).settings.arguments as Map; + PatiantInformtion patient = routeArgs['patient']; + String arrivalType = routeArgs['arrivalType']; + if (routeArgs.containsKey('isDischargedPatient')) + isDischargedPatient = routeArgs['isDischargedPatient']; + return BaseView( + onModelReady: (model) => model.getAdmissionOrders( + admissionNo: int.parse(patient.admissionNo), + patientId: patient.patientMRN), + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + backgroundColor: Theme.of(context).scaffoldBackgroundColor, + //appBarTitle: TranslationBase.of(context).progressNote, + appBar: PatientProfileAppBar( + patient, + isInpatient: true, + ), + body: model.admissionOrderList == null || + model.admissionOrderList.length == 0 + ? Center( + child: ErrorMessage( + error: TranslationBase.of(context).noDataAvailable, + ), + ) + : Container( + color: Colors.grey[200], + child: Column( + children: [ + Padding( + padding: EdgeInsets.all(12.0), + child: Column( + children: [ + Row( + children: [ + AppText( + TranslationBase.of(context).admission, + fontSize: 15.0, + fontWeight: FontWeight.w600, + fontFamily: 'Poppins', + ), + ], + ), + Row( + children: [ + AppText( + TranslationBase.of(context).orders, + fontSize: 30.0, + fontWeight: FontWeight.w700, + ), + ], + ), + ], + ), + ), + Expanded( + child: Container( + child: ListView.builder( + itemCount: model.admissionOrderList.length, + itemBuilder: (BuildContext ctxt, int index) { + return FractionallySizedBox( + widthFactor: 0.95, + child: CardWithBgWidget( + hasBorder: false, + bgColor: Colors.white, + widget: Column( + children: [ + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Container( + width: MediaQuery.of(context) + .size + .width * + 0.60, + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Row( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + AppText( + TranslationBase.of( + context) + .createdBy + .toString(), + fontSize: 13, + ), + Expanded( + child: AppText( + model + .admissionOrderList[ + index] + .createdByName + .toString() ?? + '', + fontWeight: + FontWeight.w600, + fontSize: 12, + isCopyable: true, + ), + ), + ], + ), + Row( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + AppText( + TranslationBase.of( + context) + .procedureName + .toString() + + ": ", + fontSize: 13, + ), + Expanded( + child: AppText( + model + .admissionOrderList[ + index] + .procedureName + .toString() ?? + '', + fontWeight: + FontWeight.w600, + fontSize: 12, + isCopyable: true, + ), + ), + ], + ), + Row( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + AppText( + TranslationBase.of( + context) + .orderNo + .toString(), + fontSize: 13, + ), + Expanded( + child: AppText( + model + .admissionOrderList[ + index] + .orderNo + .toString() ?? + '', + fontWeight: + FontWeight.w600, + fontSize: 12, + isCopyable: true, + ), + ), + ], + ), + ], + ), + ), + Column( + children: [ + AppText( + model + .admissionOrderList[ + index] + .createdOn != + null + ? AppDateUtils.getDayMonthYearDateFormatted( + AppDateUtils + .getDateTimeFromServerFormat(model + .admissionOrderList[ + index] + .createdOn), + isArabic: + projectViewModel + .isArabic, + isMonthShort: true) + : AppDateUtils + .getDayMonthYearDateFormatted( + DateTime.now(), + isArabic: + projectViewModel + .isArabic), + fontWeight: FontWeight.w600, + fontSize: 14, + isCopyable: true, + ), + AppText( + model + .admissionOrderList[ + index] + .createdOn != + null + ? AppDateUtils.getHour( + AppDateUtils + .getDateTimeFromServerFormat(model + .admissionOrderList[ + index] + .createdOn)) + : AppDateUtils.getHour( + DateTime.now()), + fontWeight: FontWeight.w600, + fontSize: 14, + isCopyable: true, + ), + ], + crossAxisAlignment: + CrossAxisAlignment.end, + ) + ], + ), + SizedBox( + height: 8, + ), + // Row( + // mainAxisAlignment: + // MainAxisAlignment.start, + // children: [ + // Expanded( + // child: AppText( + // model + // .admissionOrderList[ + // index] + // .notes, + // fontSize: 10, + // isCopyable: true, + // ), + // ), + // ]) + ], + ), + SizedBox( + height: 20, + ), + ], + ), + ), + ); + }), + ), + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/screens/patients/profile/diabetic_chart/diabetic_chart.dart b/lib/screens/patients/profile/diabetic_chart/diabetic_chart.dart new file mode 100644 index 00000000..593850a7 --- /dev/null +++ b/lib/screens/patients/profile/diabetic_chart/diabetic_chart.dart @@ -0,0 +1,255 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/enum/viewstate.dart'; +import 'package:doctor_app_flutter/core/model/diabetic_chart/DiabeticType.dart'; +import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart'; +import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/diabetic_chart/line_chart_for_diabetic.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_details_blood_pressurewideget.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; +import 'package:doctor_app_flutter/util/helpers.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/charts/app_time_series_chart.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; +import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart'; +import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import 'diabetic_details_blood_pressurewideget.dart'; + +class DiabeticChart extends StatefulWidget { + DiabeticChart({ + Key key, + }) : super(key: key); + + @override + _DiabeticChartState createState() => _DiabeticChartState(); +} + +class _DiabeticChartState extends State { + List timeSeriesData1 = []; + + List timeSeriesData2 = []; + + List diabeticType = [ + DiabeticType(nameAr: "Urine Glucose", nameEn: "Urine Glucose", value: 1), + DiabeticType(nameAr: "Urine Acet", nameEn: "Urine Acet", value: 2), + DiabeticType(nameAr: "Blood Glucose", nameEn: "Blood Glucose", value: 3), + DiabeticType(nameAr: "Blood Glucose(Glucometer)", nameEn: "Blood Glucose(Glucometer)", value: 4) + ]; + + DiabeticType selectedDiabeticType; + + @override + Widget build(BuildContext context) { + final routeArgs = ModalRoute.of(context).settings.arguments as Map; + PatiantInformtion patient = routeArgs['patient']; + ProjectViewModel projectsProvider = Provider.of(context); + return BaseView( + onModelReady: (model) async { + selectedDiabeticType = diabeticType[2]; + + await model.getDiabeticChartValues(patient, selectedDiabeticType.value, isLocalBusy: false); + generateData(model); + }, + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + backgroundColor: Theme.of(context).scaffoldBackgroundColor, + appBar: PatientProfileAppBar( + patient, + isInpatient: true, + ), + body: SingleChildScrollView( + child: Column( + children: [ + Container( + width: MediaQuery.of(context).size.width * 0.7, + child: DropdownButtonHideUnderline( + child: DropdownButton( + dropdownColor: Colors.white, + iconEnabledColor: Colors.black, + isExpanded: true, + value: selectedDiabeticType.value, + iconSize: 25, + elevation: 16, + selectedItemBuilder: (BuildContext context) { + return diabeticType + .map((item) { + return Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: + MainAxisAlignment.end, + children: [ + Column( + mainAxisAlignment: + MainAxisAlignment.center, + children: [ + Container( + + padding: EdgeInsets.all(2), + margin: EdgeInsets.all(2), + decoration: new BoxDecoration( + color: Colors.red[800], + borderRadius: + BorderRadius.circular( + 20), + ), + constraints: BoxConstraints( + minWidth: 20, + minHeight: 20, + ), + child: Center( + child: AppText( + diabeticType + .length + .toString(), + color: Colors.white, + fontSize: projectsProvider + .isArabic + ? 10 + : 11, + textAlign: + TextAlign.center, + ), + )), + ], + ), + AppText( + selectedDiabeticType.nameEn, + fontSize: 12, + color: Colors.black, + fontWeight: FontWeight.bold, + textAlign: TextAlign.end), + ], + ); + }).toList(); + }, + onChanged: (newValue) async { + await onChangeFunc(newValue, model, patient); + setState(() { + + }); + }, + items: diabeticType + .map((item) { + return DropdownMenuItem( + child: AppText( + item.nameEn, + textAlign: TextAlign.left, + ), + value: item.value, + ); + }).toList(), + )), + ), + timeSeriesData1.length != 0 || timeSeriesData2.length != 0 + ? Padding( + padding: const EdgeInsets.all(10.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + + Container( + margin: EdgeInsets.symmetric(horizontal: 8), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(12)), + child: LineChartForDiabetic( + title: selectedDiabeticType.nameEn, + isOX: false, + timeSeries1: timeSeriesData1, + // timeSeries2: timeSeriesData2, + indexes: timeSeriesData1.length ~/ 5.5, + ), + ), + Container( + margin: EdgeInsets.symmetric( + horizontal: 8, vertical: 16), + padding: EdgeInsets.only( + top: 16, right: 18.0, left: 16.0), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(12)), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).graphDetails, + fontSize: SizeConfig.textMultiplier * 2.3, + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + ), + SizedBox( + height: 8, + ), + DiabeticDetails( + diabeticDetailsList: + model.diabeticChartValuesList, + ), + ], + ), + ), + ], + ), + ) + : Center(child: ErrorMessage(error: TranslationBase.of(context).noItem)), + ], + ), + )), + ); + } + + generateData(PatientViewModel model) { + if (model.diabeticChartValuesList.length > 0) { + model.diabeticChartValuesList.toList().forEach( + (element) { + DateTime elementDate = + AppDateUtils.getDateTimeFromServerFormat(element.dateChart); + if (element.resultValue.toInt() != 0) + timeSeriesData1.add( + TimeSeriesSales2( + new DateTime( + elementDate.year, elementDate.month, elementDate.day), + element.resultValue.toDouble(), + ), + ); + if (element.resultValue.toInt() != 0) + timeSeriesData2.add( + TimeSeriesSales2( + new DateTime( + elementDate.year, elementDate.month, elementDate.day), + element.resultValue.toDouble(), + ), + ); + }, + ); + } + } + + onChangeFunc(newValue, PatientViewModel model, patient) async { + GifLoaderDialogUtils.showMyDialog(context); + setState(() { + selectedDiabeticType = diabeticType[newValue-1]; + timeSeriesData1.clear(); + timeSeriesData2.clear(); + }); + + await model.getDiabeticChartValues(patient, selectedDiabeticType.value,isLocalBusy:true); + if(model.state == ViewState.ErrorLocal){ + Helpers.showErrorToast(model.error); + } + generateData(model); + GifLoaderDialogUtils.hideDialog(context); + + + + + } +} diff --git a/lib/screens/patients/profile/diabetic_chart/diabetic_details_blood_pressurewideget.dart b/lib/screens/patients/profile/diabetic_chart/diabetic_details_blood_pressurewideget.dart new file mode 100644 index 00000000..b3b1b581 --- /dev/null +++ b/lib/screens/patients/profile/diabetic_chart/diabetic_details_blood_pressurewideget.dart @@ -0,0 +1,123 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/model/diabetic_chart/GetDiabeticChartValuesResponseModel.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class DiabeticDetails extends StatefulWidget { + final List diabeticDetailsList; + + DiabeticDetails( + {Key key, this.diabeticDetailsList,}); + + @override + _VitalSignDetailsWidgetState createState() => _VitalSignDetailsWidgetState(); +} + +class _VitalSignDetailsWidgetState extends State { + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return Container( + margin: EdgeInsets.all(0), + child: Container( + color: Colors.transparent, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Expanded( + child: Container( + child: Container( + padding: EdgeInsets.all(8), + child: AppText( + TranslationBase.of(context).date, + fontSize: SizeConfig.textMultiplier * 1.5, + fontWeight: FontWeight.bold, + + fontFamily: 'Poppins', + ), + // height: 60, + ), + ), + ), + Expanded( + child: Container( + padding: EdgeInsets.all(8), + child: Container( + child: AppText( + "Result", + fontSize: SizeConfig.textMultiplier * 1.5, + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + ), + // height: 60 + ), + ), + ), + ], + ), + const Divider( + height: 1, + thickness: 1, + color: Colors.black, + ), + Table( + border: TableBorder( + horizontalInside: BorderSide(width: 1.0, color: Colors.grey[300]), + ), + children: fullData(projectViewModel), + ), + ], + ), + ), + ); + } + + List fullData(ProjectViewModel projectViewModel) { + List tableRow = []; + widget.diabeticDetailsList.forEach((diabetic) { + var data = diabetic.resultValue; + DateTime elementDate = + AppDateUtils.getDateTimeFromServerFormat(diabetic.dateChart); + if (data != 0) + tableRow.add(TableRow(children: [ + Container( + child: Container( + padding: EdgeInsets.all(10), + color: Colors.white, + child: AppText( + '${projectViewModel.isArabic ? AppDateUtils.getWeekDayArabic(elementDate.weekday) : AppDateUtils.getWeekDay(elementDate.weekday)}, ${elementDate.day} ${projectViewModel.isArabic ? AppDateUtils.getMonthArabic(elementDate.month) : AppDateUtils.getMonth(elementDate.month)}, ${elementDate.year} ${AppDateUtils.getHour(elementDate)}', + // textAlign: TextAlign.center, + fontSize: SizeConfig.textMultiplier * 1.6, + fontWeight: FontWeight.w600, + + fontFamily: 'Poppins', + ), + ), + ), + Container( + child: Container( + padding: EdgeInsets.all(10), + color: Colors.white, + child: AppText( + '${diabetic.resultValue}', + // textAlign: TextAlign.center, + fontSize: SizeConfig.textMultiplier * 1.6, + fontWeight: FontWeight.w600, + + fontFamily: 'Poppins', + ), + ), + ), + ])); + }); + return tableRow; + } +} diff --git a/lib/screens/patients/profile/diabetic_chart/line_chart_for_diabetic.dart b/lib/screens/patients/profile/diabetic_chart/line_chart_for_diabetic.dart new file mode 100644 index 00000000..671230c2 --- /dev/null +++ b/lib/screens/patients/profile/diabetic_chart/line_chart_for_diabetic.dart @@ -0,0 +1,237 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/charts/app_time_series_chart.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:fl_chart/fl_chart.dart'; +import 'package:flutter/material.dart'; + +class LineChartForDiabetic extends StatelessWidget { + final String title; + final List timeSeries1; + final int indexes; + final bool isOX; + + LineChartForDiabetic( + {this.title, this.timeSeries1, this.indexes, this.isOX= false}); + + List xAxixs = List(); + List yAxixs = List(); + + @override + Widget build(BuildContext context) { + getXaxix(); + return AspectRatio( + aspectRatio: 1.1, + child: Container( + decoration: const BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(18)), + // color: Colors.white, + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + const SizedBox( + height: 4, + ), + Container( + padding: const EdgeInsets.only(right: 18.0, left: 16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + title, + fontSize: SizeConfig.textMultiplier * 2.1, + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + textAlign: TextAlign.center, + ), + ], + ), + ), + SizedBox( + height: 10, + ), + Expanded( + child: Padding( + padding: + const EdgeInsets.only(right: 18.0, left: 16.0, top: 15), + child: LineChart( + sampleData1(context), + swapAnimationDuration: const Duration(milliseconds: 250), + ), + ), + ), + SizedBox( + height: 10, + ), + ], + ), + ), + ); + } + + getXaxix() { + for (int index = 0; index < timeSeries1.length; index++) { + int mIndex = indexes * index; + if (mIndex < timeSeries1.length) { + xAxixs.add(mIndex); + } + } + } + + LineChartData sampleData1(context) { + return LineChartData( + lineTouchData: LineTouchData( + touchTooltipData: LineTouchTooltipData( + tooltipBgColor: Colors.white, + ), + touchCallback: (LineTouchResponse touchResponse) {}, + handleBuiltInTouches: true, + ), + gridData: FlGridData( + show: true, drawVerticalLine: true, drawHorizontalLine: true), + titlesData: FlTitlesData( + bottomTitles: SideTitles( + showTitles: true, + getTextStyles: (value) => const TextStyle( + color: Colors.black, + fontSize: 10, + ), + rotateAngle: -65, + //rotateAngle:-65, + interval: 100, + margin: 22, + getTitles: (value) { + if (timeSeries1.length < 15) { + if (timeSeries1.length > value.toInt()) { + return '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}'; + } else + return ''; + } else { + if (value.toInt() == 0) + return '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}'; + if (value.toInt() == timeSeries1.length - 1) + return '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}'; + if (xAxixs.contains(value.toInt())) { + return '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}'; + } + } + return ''; + }, + ), + leftTitles: SideTitles( + showTitles: true, + getTextStyles: (value) => const TextStyle( + color: Colors.black, + fontWeight: FontWeight.bold, + fontSize: 10, + ), + interval:getMaxY() - getMinY() <=500?50:getMaxY() - getMinY() <=1000?100:200, + + margin: 12, + ), + ), + borderData: FlBorderData( + show: true, + border: const Border( + bottom: BorderSide( + color: Colors.black, + width: 0.5, + ), + left: BorderSide( + color: Colors.black, + ), + right: BorderSide( + color: Colors.black, + ), + top: BorderSide( + color: Colors.transparent, + ), + ), + ), + minX: 0, + maxX: (timeSeries1.length - 1).toDouble(), + maxY: getMaxY() + 0.3, + minY: getMinY(), + lineBarsData: getData(context), + ); + } + + double getMaxY() { + double max = 0; + timeSeries1.forEach((element) { + double resultValueDouble = element.sales; + if (resultValueDouble > max) max = resultValueDouble; + }); + // timeSeries2.forEach((element) { + // double resultValueDouble = element.sales; + // if (resultValueDouble > max) max = resultValueDouble; + // }); + + return max.roundToDouble(); + } + + double getMinY() { + double min = timeSeries1[0].sales; + timeSeries1.forEach((element) { + double resultValueDouble = element.sales; + if (resultValueDouble < min) min = resultValueDouble; + }); + // timeSeries2.forEach((element) { + // double resultValueDouble = element.sales; + // if (resultValueDouble < min) min = resultValueDouble; + // }); + + int value = min.toInt(); + + return value.toDouble(); + } + + List getData(context) { + List spots = List(); + for (int index = 0; index < timeSeries1.length; index++) { + spots.add(FlSpot(index.toDouble(), timeSeries1[index].sales)); + } + + List spots2 = List(); + // for (int index = 0; index < timeSeries2.length; index++) { + // spots2.add(FlSpot(index.toDouble(), timeSeries2[index].sales)); + // } + + final LineChartBarData lineChartBarData1 = LineChartBarData( + spots: spots, + isCurved: true, + colors: [Colors.red], + barWidth: 5, + isStrokeCapRound: true, + dotData: FlDotData( + show: false, + ), + belowBarData: BarAreaData( + show: false, + ), + ); + final LineChartBarData lineChartBarData2 = LineChartBarData( + spots: spots2, + isCurved: true, + colors: [Colors.red], + barWidth: 5, + isStrokeCapRound: true, + dotData: FlDotData( + show: false, + ), + belowBarData: BarAreaData( + show: false, + ), + ); + + List lineChartData = List(); + if(spots.isNotEmpty){ + lineChartData.add(lineChartBarData1); + } + if(spots2.isNotEmpty){ + lineChartData.add(lineChartBarData2); + } + return lineChartData; + } +} diff --git a/lib/screens/patients/profile/diagnosis/diagnosis_screen.dart b/lib/screens/patients/profile/diagnosis/diagnosis_screen.dart new file mode 100644 index 00000000..e52a67df --- /dev/null +++ b/lib/screens/patients/profile/diagnosis/diagnosis_screen.dart @@ -0,0 +1,270 @@ +import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; +import 'package:doctor_app_flutter/core/model/diagnosis/GetDiagnosisForInPatientRequestModel.dart'; +import 'package:doctor_app_flutter/core/model/note/GetNursingProgressNoteRequestModel.dart'; +import 'package:doctor_app_flutter/core/model/note/note_model.dart'; +import 'package:doctor_app_flutter/core/model/note/update_note_model.dart'; +import 'package:doctor_app_flutter/core/service/AnalyticsService.dart'; +import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; +import 'package:doctor_app_flutter/locator.dart'; +import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/models/patient/progress_note_request.dart'; +import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/notes/note/update_note.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; +import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart'; +import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; +import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart'; +import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; +import 'package:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'package:provider/provider.dart'; + +DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); + +class DiagnosisScreen extends StatefulWidget { + const DiagnosisScreen({Key key}) : super(key: key); + + @override + _ProgressNoteState createState() => _ProgressNoteState(); +} + +class _ProgressNoteState extends State { + bool isDischargedPatient = false; + AuthenticationViewModel authenticationViewModel; + ProjectViewModel projectViewModel; + + getDiagnosisForInPatient(BuildContext context, PatientViewModel model, + {bool isLocalBusy = false}) async { + final routeArgs = ModalRoute.of(context).settings.arguments as Map; + PatiantInformtion patient = routeArgs['patient']; + String type = await sharedPref.getString(SLECTED_PATIENT_TYPE); + + print(type); + GetDiagnosisForInPatientRequestModel getDiagnosisForInPatientRequestModel = + GetDiagnosisForInPatientRequestModel( + admissionNo: int.parse(patient.admissionNo), + patientTypeID: patient.patientType, + patientID: patient.patientId, + setupID: "010266"); + model.getDiagnosisForInPatient(getDiagnosisForInPatientRequestModel); + } + + @override + Widget build(BuildContext context) { + authenticationViewModel = Provider.of(context); + projectViewModel = Provider.of(context); + final routeArgs = ModalRoute.of(context).settings.arguments as Map; + PatiantInformtion patient = routeArgs['patient']; + if (routeArgs.containsKey('isDischargedPatient')) + isDischargedPatient = routeArgs['isDischargedPatient']; + return BaseView( + onModelReady: (model) => getDiagnosisForInPatient(context, model), + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + backgroundColor: Theme.of(context).scaffoldBackgroundColor, + appBar: PatientProfileAppBar( + patient, + isInpatient: true, + ), + body: model.diagnosisForInPatientList == null || + model.diagnosisForInPatientList.length == 0 + ? Center( + child: ErrorMessage( + error: TranslationBase.of(context).noDataAvailable, + ), + ) + : Container( + color: Colors.grey[200], + child: Column( + children: [ + Expanded( + child: Container( + child: ListView.builder( + itemCount: model.diagnosisForInPatientList.length, + itemBuilder: (BuildContext ctxt, int index) { + return FractionallySizedBox( + widthFactor: 0.95, + child: CardWithBgWidget( + hasBorder: false, + bgColor: Colors.transparent, + widget: Column( + children: [ + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Container( + width: MediaQuery.of(context) + .size + .width * + 0.60, + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Row( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + AppText( + TranslationBase.of( + context) + .createdBy, + fontSize: 12, + ), + Expanded( + child: AppText( + model + .diagnosisForInPatientList[ + index] + .createdByName + .toString() ?? + '', + fontWeight: + FontWeight.w600, + fontSize: 12, + isCopyable: true, + ), + ), + ], + ), + ], + ), + ), + Column( + children: [ + AppText( + model + .diagnosisForInPatientList[ + index] + .createdOn != + null + ? AppDateUtils.getDayMonthYearDateFormatted( + AppDateUtils + .getDateTimeFromServerFormat(model + .diagnosisForInPatientList[ + index] + .createdOn), + isArabic: + projectViewModel + .isArabic, + isMonthShort: true) + : AppDateUtils + .getDayMonthYearDateFormatted( + DateTime.now(), + isArabic: + projectViewModel + .isArabic), + fontWeight: FontWeight.w600, + fontSize: 14, + isCopyable: true, + ), + AppText( + model + .diagnosisForInPatientList[ + index] + .createdOn != + null + ? AppDateUtils.getHour( + AppDateUtils + .getDateTimeFromServerFormat(model + .diagnosisForInPatientList[ + index] + .createdOn)) + : AppDateUtils.getHour( + DateTime.now()), + fontWeight: FontWeight.w600, + fontSize: 14, + isCopyable: true, + ), + ], + crossAxisAlignment: + CrossAxisAlignment.end, + ) + ], + ), + SizedBox( + height: 8, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .icd + + " : ", + fontSize: 12, + ), + Expanded( + child: AppText( + model + .diagnosisForInPatientList[ + index] + .iCDCode10ID, + fontSize: 12, + isCopyable: true, + ), + ), + ]), + SizedBox( + height: 8, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + "Ascii Desc : ", + fontSize: 12, + ), + Expanded( + child: AppText( + model + .diagnosisForInPatientList[ + index] + .asciiDesc, + fontSize: 12, + isCopyable: true, + ), + ), + ]) + ], + ), + SizedBox( + height: 20, + ), + ], + ), + ), + ); + }), + ), + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/screens/patients/profile/discharge_summary/all_discharge_summary.dart b/lib/screens/patients/profile/discharge_summary/all_discharge_summary.dart new file mode 100644 index 00000000..532d5e46 --- /dev/null +++ b/lib/screens/patients/profile/discharge_summary/all_discharge_summary.dart @@ -0,0 +1,95 @@ +import 'package:doctor_app_flutter/core/viewModel/profile/discharge_summary_view_model.dart'; +import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart'; +import 'package:flutter/material.dart'; + +import 'discharge_Summary_widget.dart'; + +class AllDischargeSummary extends StatefulWidget { + final Function changeCurrentTab; + final PatiantInformtion patient; + + const AllDischargeSummary({this.changeCurrentTab, this.patient}); + + @override + _AllDischargeSummaryState createState() => _AllDischargeSummaryState(); +} + +class _AllDischargeSummaryState extends State { + int pageIndex = 1; + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) { + model.getAllDischargeSummary( + patientId: widget.patient.patientId, + admissionNo: int.parse(widget.patient.admissionNo), + ); + }, + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + isShowAppBar: false, + body: // DrAppEmbeddedError(error: TranslationBase.of(context).noItem) + model.allDisChargeSummaryList.isEmpty + ? Center( + child: ErrorMessage( + error: TranslationBase.of(context).noDataAvailable), + ) + : Column( + children: [ + Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + children: [ + Row( + children: [ + AppText( + TranslationBase.of(context).discharge, + fontSize: 15.0, + fontWeight: FontWeight.w600, + fontFamily: 'Poppins', + ), + ], + ), + Row( + children: [ + AppText( + TranslationBase.of(context).summary, + fontSize: 25.0, + fontWeight: FontWeight.w700, + ), + ], + ), + ], + ), + ), + Expanded( + child: Container( + padding: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 0), + child: ListView.builder( + scrollDirection: Axis.vertical, + itemCount: model.allDisChargeSummaryList.length, + shrinkWrap: true, + itemBuilder: (BuildContext ctxt, int index) { + return Column( + children: [ + InkWell( + child: DischargeSummaryWidget( + dischargeSummary: model + .allDisChargeSummaryList[index]), + ), + ], + ); + }), + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/screens/patients/profile/discharge_summary/discharge_Summary_widget.dart b/lib/screens/patients/profile/discharge_summary/discharge_Summary_widget.dart new file mode 100644 index 00000000..e88c242f --- /dev/null +++ b/lib/screens/patients/profile/discharge_summary/discharge_Summary_widget.dart @@ -0,0 +1,287 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/models/discharge_summary/GetDischargeSummaryResModel.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; +import 'package:doctor_app_flutter/util/helpers.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart'; +import 'package:doctor_app_flutter/widgets/shared/user-guid/CusomRow.dart'; +import 'package:eva_icons_flutter/eva_icons_flutter.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class DischargeSummaryWidget extends StatefulWidget { + final GetDischargeSummaryResModel dischargeSummary; + bool isShowMore = false; + + DischargeSummaryWidget({Key key, this.dischargeSummary}); + + @override + _DischargeSummaryWidgetState createState() => _DischargeSummaryWidgetState(); +} + +class _DischargeSummaryWidgetState extends State { + bool isCardExpanded = false; + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + + return Column( + children: [ + Container( + width: double.infinity, + margin: EdgeInsets.only(top: 8.0, left: 8.0, right: 8.0), + padding: EdgeInsets.all(8.0), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + border: Border.all(color: Colors.grey[200], width: 0.5), + ), + child: Padding( + padding: EdgeInsets.all(15.0), + child: HeaderBodyExpandableNotifier( + headerWidget: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + CustomRow( + label: TranslationBase.of(context).doctorName + ": ", + value: + widget.dischargeSummary.createdByName.toString() ?? + "".toString(), + isCopyable: false, + ), + CustomRow( + label: TranslationBase.of(context).branch + ": ", + value: widget.dischargeSummary.projectName.toString() ?? + "".toString(), + isCopyable: false, + ), + CustomRow( + label: TranslationBase.of(context).clinicName + ": ", + value: widget.dischargeSummary.clinicName.toString() ?? + "".toString(), + isCopyable: false, + ), + CustomRow( + label: TranslationBase.of(context).dischargeDate + ": ", + value: AppDateUtils.getDateTimeFromServerFormat( + widget.dischargeSummary.createdOn) + .day + .toString() + + " " + + AppDateUtils.getMonth( + AppDateUtils.getDateTimeFromServerFormat( + widget.dischargeSummary.createdOn) + .month) + .toString() + .substring(0, 3) + + ' ' + + AppDateUtils.getDateTimeFromServerFormat( + widget.dischargeSummary.createdOn) + .year + .toString(), + isCopyable: false, + ), + ], + ), + Column( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + InkWell( + onTap: () { + setState(() { + isCardExpanded = !isCardExpanded; + }); + }, + child: Icon(isCardExpanded + ? EvaIcons.arrowUp + : EvaIcons.arrowDown)) + ], + ), + ], + ), + bodyWidget: Row( + children: [ + Column( + children: [ + SizedBox( + height: 15.0, + ), + //AppText(TranslationBase.of(context).moreDetails), + SizedBox( + height: 15.0, + ), + Container( + width: MediaQuery.of(context).size.width * 0.5, + child: RichText( + maxLines: 3, + overflow: TextOverflow.ellipsis, + text: new TextSpan( + style: new TextStyle( + fontSize: 1.3 * SizeConfig.textMultiplier, + color: Color(0xFF575757)), + children: [ + new TextSpan( + text: TranslationBase.of(context) + .pastMedicalHistory + + ": ", + style: TextStyle( + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 2.8, + color: Color(0xFF575757), + //TranslationBase.of(context).doctorResponse + " : ", + )), + new TextSpan( + text: Helpers.parseHtmlString( + widget.dischargeSummary.pastHistory), + style: TextStyle( + fontFamily: 'Poppins', + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3, + color: Color(0xFF2E303A), + fontWeight: FontWeight.w700, + )), + ], + ), + ), + ), + SizedBox( + height: 5.0, + ), + Container( + width: MediaQuery.of(context).size.width * 0.5, + child: RichText( + maxLines: 3, + overflow: TextOverflow.ellipsis, + text: new TextSpan( + style: new TextStyle( + fontSize: 1.3 * SizeConfig.textMultiplier, + color: Color(0xFF575757)), + children: [ + new TextSpan( + text: TranslationBase.of(context) + .investigation + + ": ", + style: TextStyle( + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 2.8, + color: Color(0xFF575757), + //TranslationBase.of(context).doctorResponse + " : ", + )), + new TextSpan( + text: Helpers.parseHtmlString( + widget.dischargeSummary.investigations ?? + ""), + style: TextStyle( + fontFamily: 'Poppins', + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3, + color: Color(0xFF2E303A), + fontWeight: FontWeight.w700, + )), + ], + ), + ), + ), + SizedBox( + height: 5.0, + ), + Container( + width: MediaQuery.of(context).size.width * 0.5, + child: RichText( + maxLines: 3, + overflow: TextOverflow.ellipsis, + text: new TextSpan( + style: new TextStyle( + fontSize: 1.3 * SizeConfig.textMultiplier, + color: Color(0xFF575757)), + children: [ + new TextSpan( + text: TranslationBase.of(context) + .investigation + + ": ", + style: TextStyle( + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 2.8, + color: Color(0xFF575757), + //TranslationBase.of(context).doctorResponse + " : ", + )), + new TextSpan( + text: Helpers.parseHtmlString(widget + .dischargeSummary.conditionOnDischarge), + style: TextStyle( + fontFamily: 'Poppins', + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3, + color: Color(0xFF2E303A), + fontWeight: FontWeight.w700, + )), + ], + ), + ), + ), + SizedBox( + height: 5.0, + ), + Container( + width: MediaQuery.of(context).size.width * 0.5, + child: RichText( + maxLines: 3, + overflow: TextOverflow.ellipsis, + text: new TextSpan( + style: new TextStyle( + fontSize: 1.3 * SizeConfig.textMultiplier, + color: Color(0xFF575757)), + children: [ + new TextSpan( + text: TranslationBase.of(context) + .planedProcedure + + ": ", + style: TextStyle( + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 2.8, + color: Color(0xFF575757), + //TranslationBase.of(context).doctorResponse + " : ", + )), + new TextSpan( + text: Helpers.parseHtmlString( + widget.dischargeSummary.planedProcedure), + style: TextStyle( + fontFamily: 'Poppins', + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3, + color: Color(0xFF2E303A), + fontWeight: FontWeight.w700, + )), + ], + ), + ), + ), + ], + ) + ], + ), + isExpand: isCardExpanded, + ), + ), + ), + ], + ); + } +} diff --git a/lib/screens/patients/profile/discharge_summary/discharge_summary.dart b/lib/screens/patients/profile/discharge_summary/discharge_summary.dart new file mode 100644 index 00000000..0878994a --- /dev/null +++ b/lib/screens/patients/profile/discharge_summary/discharge_summary.dart @@ -0,0 +1,181 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/text_fields_utils.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +import 'all_discharge_summary.dart'; +import 'pending_discharge_summary.dart'; + +class DischargeSummaryPage extends StatefulWidget { + final Function changeCurrentTab; + + const DischargeSummaryPage({Key key, this.changeCurrentTab}) + : super(key: key); + + @override + _DoctorReplyScreenState createState() => _DoctorReplyScreenState(); +} + +class _DoctorReplyScreenState extends State + with SingleTickerProviderStateMixin { + TabController _tabController; + int _activeTab = 0; + int pageIndex = 1; + + @override + void initState() { + super.initState(); + _tabController = TabController(length: 2, vsync: this); + _tabController.addListener(_handleTabSelection); + } + + @override + void dispose() { + super.dispose(); + _tabController.dispose(); + } + + _handleTabSelection() { + setState(() { + _activeTab = _tabController.index; + }); + } + + @override + Widget build(BuildContext context) { + final screenSize = MediaQuery.of(context).size; + final routeArgs = ModalRoute.of(context).settings.arguments as Map; + PatiantInformtion patient = routeArgs['patient']; + + return WillPopScope( + onWillPop: () async { + widget.changeCurrentTab(); + return false; + }, + child: AppScaffold( + appBarTitle: TranslationBase.of(context).replay2, + isShowAppBar: true, + // appBarTitle: TranslationBase.of(context).progressNote, + appBar: PatientProfileAppBar( + patient, + isInpatient: true, + ), + body: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: Scaffold( + extendBodyBehindAppBar: false, + appBar: PreferredSize( + preferredSize: Size.fromHeight( + MediaQuery.of(context).size.height * 0.070), + child: Container( + height: MediaQuery.of(context).size.height * 0.070, + decoration: BoxDecoration( + border: Border( + bottom: BorderSide( + color: Theme.of(context).dividerColor, + width: 0.5), //width: 0.7 + ), + color: Colors.white), + child: Center( + child: TabBar( + isScrollable: false, + controller: _tabController, + indicatorColor: Colors.transparent, + indicatorWeight: 1.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Theme.of(context).primaryColor, + labelPadding: EdgeInsets.only( + top: 0, left: 0, right: 0, bottom: 0), + unselectedLabelColor: Colors.grey[800], + tabs: [ + tabWidget( + screenSize, + _activeTab == 0, + TranslationBase.of(context).pending, + ), + tabWidget( + screenSize, + _activeTab == 1, + TranslationBase.of(context).all, + ), + ], + ), + ), + ), + ), + body: Column( + children: [ + Expanded( + child: TabBarView( + physics: BouncingScrollPhysics(), + controller: _tabController, + children: [ + PendingDischargeSummary( + patient: patient, + ), + AllDischargeSummary(patient: patient), + ], + ), + ), + ], + ), + ), + ), + ], + ), + ), + ); + } +} + +Widget tabWidget(Size screenSize, bool isActive, String title, + {int counter = -1}) { + return Center( + child: Container( + height: screenSize.height * 0.070, + decoration: TextFieldsUtils.containerBorderDecoration( + isActive ? Color(0xFFD02127 /*B8382B*/) : Color(0xFFEAEAEA), + isActive ? Color(0xFFD02127) : Color(0xFFEAEAEA), + borderRadius: 4, + borderWidth: 0), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + AppText( + title, + fontSize: SizeConfig.textMultiplier * 1.5, + color: isActive ? Colors.white : Color(0xFF2B353E), + fontWeight: FontWeight.w700, + ), + if (counter != -1) + Container( + margin: EdgeInsets.all(4), + width: 15, + height: 15, + decoration: BoxDecoration( + color: isActive ? Colors.white : Color(0xFFD02127), + shape: BoxShape.circle, + ), + child: Center( + child: FittedBox( + child: AppText( + "$counter", + fontSize: SizeConfig.textMultiplier * 1.5, + color: !isActive ? Colors.white : Color(0xFFD02127), + fontWeight: FontWeight.w700, + ), + ), + ), + ), + ], + ), + ), + ); +} diff --git a/lib/screens/patients/profile/discharge_summary/pending_discharge_summary.dart b/lib/screens/patients/profile/discharge_summary/pending_discharge_summary.dart new file mode 100644 index 00000000..0313371b --- /dev/null +++ b/lib/screens/patients/profile/discharge_summary/pending_discharge_summary.dart @@ -0,0 +1,96 @@ +import 'package:doctor_app_flutter/core/viewModel/profile/discharge_summary_view_model.dart'; +import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart'; +import 'package:flutter/material.dart'; +import 'discharge_Summary_widget.dart'; + +class PendingDischargeSummary extends StatefulWidget { + final Function changeCurrentTab; + final PatiantInformtion patient; + + const PendingDischargeSummary({Key key, this.changeCurrentTab, this.patient}) + : super(key: key); + + @override + _PendingDischargeSummaryState createState() => + _PendingDischargeSummaryState(); +} + +class _PendingDischargeSummaryState extends State { + int pageIndex = 1; + + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) { + model.getPendingDischargeSummary( + patientId: widget.patient.patientId, + admissionNo: int.parse(widget.patient.admissionNo), + ); + }, + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + isShowAppBar: false, + body: model.pendingDischargeSummaryList.isEmpty + ? Center( + child: ErrorMessage( + error: TranslationBase.of(context).noDataAvailable), + ) // DrAppEmbeddedError(error: TranslationBase.of(context).noItem) + : Column( + children: [ + Padding( + padding: EdgeInsets.all(12.0), + child: Column( + children: [ + Row( + children: [ + AppText( + TranslationBase.of(context).discharge, + fontSize: 15.0, + fontWeight: FontWeight.w600, + fontFamily: 'Poppins', + ), + ], + ), + Row( + children: [ + AppText( + TranslationBase.of(context).summary, + fontSize: 25.0, + fontWeight: FontWeight.w700, + ), + ], + ), + ], + ), + ), + Expanded( + child: Container( + padding: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 0), + child: ListView.builder( + scrollDirection: Axis.vertical, + itemCount: model.pendingDischargeSummaryList.length, + shrinkWrap: true, + itemBuilder: (BuildContext ctxt, int index) { + return Column( + children: [ + InkWell( + child: DischargeSummaryWidget( + dischargeSummary: model + .pendingDischargeSummaryList[index]), + ), + ], + ); + }), + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/screens/patients/profile/lab_result/all_lab_special_result_page.dart b/lib/screens/patients/profile/lab_result/all_lab_special_result_page.dart index 443534ea..545b4378 100644 --- a/lib/screens/patients/profile/lab_result/all_lab_special_result_page.dart +++ b/lib/screens/patients/profile/lab_result/all_lab_special_result_page.dart @@ -3,6 +3,7 @@ import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/lab_result/special_lab_result_details_page.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; @@ -44,7 +45,8 @@ class _AllLabSpecialResultState extends State { Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); return BaseView( - onModelReady: (model) => model.getAllSpecialLabResult(patientId: patient.patientMRN), + onModelReady: (model) => + model.getAllSpecialLabResult(patientId: patient.patientMRN), builder: (context, LabsViewModel model, widget) => AppScaffold( baseViewModel: model, backgroundColor: Colors.grey[100], @@ -69,7 +71,9 @@ class _AllLabSpecialResultState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText( - TranslationBase.of(context).special + " " + TranslationBase.of(context).lab, + TranslationBase.of(context).special + + " " + + TranslationBase.of(context).lab, style: "caption2", color: Colors.black, fontSize: 13, @@ -105,26 +109,44 @@ class _AllLabSpecialResultState extends State { width: 20, height: 160, decoration: BoxDecoration( - color: model.allSpecialLabList[index].isLiveCareAppointment + color: model.allSpecialLabList[index] + .isLiveCareAppointment ? Colors.red[900] - : !model.allSpecialLabList[index].isInOutPatient + : !model.allSpecialLabList[index] + .isInOutPatient ? Colors.black : Color(0xffa9a089), 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)), + 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( - model.allSpecialLabList[index].isLiveCareAppointment - ? TranslationBase.of(context).liveCare.toUpperCase() - : !model.allSpecialLabList[index].isInOutPatient - ? TranslationBase.of(context).inPatientLabel.toUpperCase() - : TranslationBase.of(context).outpatient.toUpperCase(), + model.allSpecialLabList[index] + .isLiveCareAppointment + ? TranslationBase.of(context) + .liveCare + .toUpperCase() + : !model.allSpecialLabList[index] + .isInOutPatient + ? TranslationBase.of(context) + .inPatientLabel + .toUpperCase() + : TranslationBase.of(context) + .outpatient + .toUpperCase(), style: TextStyle(color: Colors.white), ), )), @@ -136,17 +158,26 @@ class _AllLabSpecialResultState extends State { context, FadePage( page: SpecialLabResultDetailsPage( - resultData: model.allSpecialLabList[index].resultDataHTML, + resultData: model.allSpecialLabList[index] + .resultDataHTML, patient: patient, ), ), ), - doctorName: model.allSpecialLabList[index].doctorName, - invoiceNO: ' ${model.allSpecialLabList[index].invoiceNo}', - profileUrl: model.allSpecialLabList[index].doctorImageURL, - branch: model.allSpecialLabList[index].projectName, - clinic: model.allSpecialLabList[index].clinicDescription, - appointmentDate: model.allSpecialLabList[index].orderDate, + doctorName: + model.allSpecialLabList[index].doctorName, + invoiceNO: + ' ${model.allSpecialLabList[index].invoiceNo}', + profileUrl: model + .allSpecialLabList[index].doctorImageURL, + branch: + model.allSpecialLabList[index].projectName, + clinic: model + .allSpecialLabList[index].clinicDescription, + appointmentDate: + AppDateUtils.getDateTimeFromServerFormat( + model.allSpecialLabList[index].createdOn, + ), orderNo: model.allSpecialLabList[index].orderNo, isShowTime: false, ), @@ -155,7 +186,8 @@ class _AllLabSpecialResultState extends State { ), ); }), - if (model.allSpecialLabList.isEmpty && patient.patientStatusType != 43) + if (model.allSpecialLabList.isEmpty && + patient.patientStatusType != 43) Center( child: Column( crossAxisAlignment: CrossAxisAlignment.center, diff --git a/lib/screens/patients/profile/lab_result/labs_home_page.dart b/lib/screens/patients/profile/lab_result/labs_home_page.dart index 2c6dbb0c..67303256 100644 --- a/lib/screens/patients/profile/lab_result/labs_home_page.dart +++ b/lib/screens/patients/profile/lab_result/labs_home_page.dart @@ -6,6 +6,7 @@ import 'package:doctor_app_flutter/screens/patients/profile/lab_result/laborator import 'package:doctor_app_flutter/screens/procedures/ProcedureType.dart'; import 'package:doctor_app_flutter/screens/procedures/base_add_procedure_tab_page.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/patient_service_title.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; @@ -66,27 +67,14 @@ class _LabsHomePageState extends State { SizedBox( height: 12, ), - if (model.patientLabOrdersList.isNotEmpty && patient.patientStatusType != 43) - Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).lab, - style: "caption2", - color: Colors.black, - fontSize: 13, - ), - AppText( - TranslationBase.of(context).result, - bold: true, - fontSize: 22, - ), - ], - ), + if (model.patientLabOrdersList.isNotEmpty && + patient.patientStatusType != 43) + ServiceTitle( + title: TranslationBase.of(context).lab, + subTitle: TranslationBase.of(context).result, ), - if (patient.patientStatusType != null && patient.patientStatusType == 43) + if (patient.patientStatusType != null && + patient.patientStatusType == 43) Padding( padding: const EdgeInsets.all(8.0), child: Column( @@ -106,7 +94,8 @@ class _LabsHomePageState extends State { ], ), ), - if ((patient.patientStatusType != null && patient.patientStatusType == 43) || + if ((patient.patientStatusType != null && + patient.patientStatusType == 43) || (isFromLiveCare && patient.appointmentNo != null)) AddNewOrder( onTap: () { @@ -146,26 +135,44 @@ class _LabsHomePageState extends State { child: Container( width: 20, decoration: BoxDecoration( - color: model.patientLabOrdersList[index].isLiveCareAppointment + color: model.patientLabOrdersList[index] + .isLiveCareAppointment ? Colors.red[900] - : !model.patientLabOrdersList[index].isInOutPatient + : !model.patientLabOrdersList[index] + .isInOutPatient ? Colors.black : Color(0xffa9a089), 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)), + 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( - model.patientLabOrdersList[index].isLiveCareAppointment - ? TranslationBase.of(context).liveCare.toUpperCase() - : !model.patientLabOrdersList[index].isInOutPatient - ? TranslationBase.of(context).inPatientLabel.toUpperCase() - : TranslationBase.of(context).outpatient.toUpperCase(), + model.patientLabOrdersList[index] + .isLiveCareAppointment + ? TranslationBase.of(context) + .liveCare + .toUpperCase() + : !model.patientLabOrdersList[index] + .isInOutPatient + ? TranslationBase.of(context) + .inPatientLabel + .toUpperCase() + : TranslationBase.of(context) + .outpatient + .toUpperCase(), style: TextStyle(color: Colors.white), ), )), @@ -181,7 +188,8 @@ class _LabsHomePageState extends State { context, FadePage( page: LaboratoryResultPage( - patientLabOrders: model.patientLabOrdersList[index], + patientLabOrders: + model.patientLabOrdersList[index], patient: patient, isInpatient: isInpatient, arrivalType: arrivalType, @@ -189,12 +197,18 @@ class _LabsHomePageState extends State { ), ), ), - doctorName: model.patientLabOrdersList[index].doctorName, - invoiceNO: ' ${model.patientLabOrdersList[index].invoiceNo}', - profileUrl: model.patientLabOrdersList[index].doctorImageURL, - branch: model.patientLabOrdersList[index].projectName, - clinic: model.patientLabOrdersList[index].clinicDescription, - appointmentDate: model.patientLabOrdersList[index].orderDate, + doctorName: + model.patientLabOrdersList[index].doctorName, + invoiceNO: + ' ${model.patientLabOrdersList[index].invoiceNo}', + profileUrl: model + .patientLabOrdersList[index].doctorImageURL, + branch: + model.patientLabOrdersList[index].projectName, + clinic: model + .patientLabOrdersList[index].clinicDescription, + appointmentDate: + model.patientLabOrdersList[index].orderDate, orderNo: model.patientLabOrdersList[index].orderNo, isShowTime: false, ), @@ -203,7 +217,8 @@ class _LabsHomePageState extends State { ), ), ), - if (model.patientLabOrdersList.isEmpty && patient.patientStatusType != 43) + if (model.patientLabOrdersList.isEmpty && + patient.patientStatusType != 43) Center( child: Column( crossAxisAlignment: CrossAxisAlignment.center, diff --git a/lib/screens/patients/profile/medical_report/MedicalReportPage.dart b/lib/screens/patients/profile/medical_report/MedicalReportPage.dart index a25d03b4..bb03a9bc 100644 --- a/lib/screens/patients/profile/medical_report/MedicalReportPage.dart +++ b/lib/screens/patients/profile/medical_report/MedicalReportPage.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/service/AnalyticsService.dart'; @@ -135,7 +136,7 @@ class _MedicalReportPageState extends State { margin: EdgeInsets.symmetric(horizontal: 8), child: CardWithBgWidget( hasBorder: false, - bgColor: model.medicalReportList[index].status == 1 ? Color(0xFFCC9B14) : Colors.green[700], + bgColor: model.medicalReportList[index].status == 1 ? Color(0xFFCC9B14) : AppGlobal.appGreenColor, widget: Column( children: [ Row( @@ -150,7 +151,7 @@ class _MedicalReportPageState extends State { : TranslationBase.of(context).verified, color: model.medicalReportList[index].status == 1 ? Color(0xFFCC9B14) - : Colors.green[700], + : AppGlobal.appGreenColor, fontSize: 1.4 * SizeConfig.textMultiplier, bold: true, ), diff --git a/lib/screens/patients/profile/note/progress_note_screen.dart b/lib/screens/patients/profile/notes/note/progress_note_screen.dart similarity index 97% rename from lib/screens/patients/profile/note/progress_note_screen.dart rename to lib/screens/patients/profile/notes/note/progress_note_screen.dart index 054817c2..f47c99ae 100644 --- a/lib/screens/patients/profile/note/progress_note_screen.dart +++ b/lib/screens/patients/profile/notes/note/progress_note_screen.dart @@ -1,3 +1,5 @@ +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/core/model/note/note_model.dart'; import 'package:doctor_app_flutter/core/model/note/update_note_model.dart'; import 'package:doctor_app_flutter/core/service/AnalyticsService.dart'; @@ -6,13 +8,17 @@ import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/locator.dart'; +import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/patient/progress_note_request.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; -import 'package:doctor_app_flutter/screens/patients/profile/note/update_note.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/notes/note/update_note.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; +import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart'; import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; @@ -21,11 +27,7 @@ import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:provider/provider.dart'; -import '../../../../config/shared_pref_kay.dart'; -import '../../../../models/patient/patiant_info_model.dart'; -import '../../../../util/dr_app_shared_pref.dart'; -import '../../../../widgets/shared/app_scaffold_widget.dart'; -import '../../../../widgets/shared/app_texts_widget.dart'; + DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); @@ -146,7 +148,7 @@ class _ProgressNoteState extends State { : model.patientProgressNoteList[index] .status == 2 - ? Colors.green[600] + ? AppGlobal.appGreenColor : Color(0xFFCC9B14), widget: Column( children: [ @@ -166,8 +168,10 @@ class _ProgressNoteState extends State { index] .createdBy) AppText( + TranslationBase.of(context) .notePending, + fontWeight: FontWeight.bold, color: Color(0xFFCC9B14), fontSize: 12, @@ -193,7 +197,7 @@ class _ProgressNoteState extends State { TranslationBase.of(context) .noteVerified, fontWeight: FontWeight.bold, - color: Colors.green[600], + color: AppGlobal.appGreenColor, fontSize: 12, ), if (model.patientProgressNoteList[index].status != 2 && @@ -315,7 +319,7 @@ class _ProgressNoteState extends State { }, child: Container( decoration: BoxDecoration( - color: Colors.green[600], + color: AppGlobal.appGreenColor, borderRadius: BorderRadius.circular( 10), @@ -472,6 +476,7 @@ class _ProgressNoteState extends State { fontWeight: FontWeight.w600, fontSize: 12, + isCopyable:true, ), ), ], @@ -505,6 +510,7 @@ class _ProgressNoteState extends State { .isArabic), fontWeight: FontWeight.w600, fontSize: 14, + isCopyable:true, ), AppText( model @@ -522,6 +528,7 @@ class _ProgressNoteState extends State { DateTime.now()), fontWeight: FontWeight.w600, fontSize: 14, + isCopyable:true, ), ], crossAxisAlignment: @@ -543,6 +550,7 @@ class _ProgressNoteState extends State { index] .notes, fontSize: 10, + isCopyable:true, ), ), ]) diff --git a/lib/screens/patients/profile/note/update_note.dart b/lib/screens/patients/profile/notes/note/update_note.dart similarity index 100% rename from lib/screens/patients/profile/note/update_note.dart rename to lib/screens/patients/profile/notes/note/update_note.dart diff --git a/lib/screens/patients/profile/notes/nursing_note/nursing_note_screen.dart b/lib/screens/patients/profile/notes/nursing_note/nursing_note_screen.dart new file mode 100644 index 00000000..80e13a84 --- /dev/null +++ b/lib/screens/patients/profile/notes/nursing_note/nursing_note_screen.dart @@ -0,0 +1,245 @@ +import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; +import 'package:doctor_app_flutter/core/model/note/GetNursingProgressNoteRequestModel.dart'; +import 'package:doctor_app_flutter/core/model/note/note_model.dart'; +import 'package:doctor_app_flutter/core/model/note/update_note_model.dart'; +import 'package:doctor_app_flutter/core/service/AnalyticsService.dart'; +import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; +import 'package:doctor_app_flutter/locator.dart'; +import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/models/patient/progress_note_request.dart'; +import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/notes/note/update_note.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; +import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart'; +import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; +import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart'; +import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; +import 'package:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'package:provider/provider.dart'; + +DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); + +class NursingProgressNoteScreen extends StatefulWidget { + const NursingProgressNoteScreen({Key key}) : super(key: key); + + @override + _ProgressNoteState createState() => _ProgressNoteState(); +} + +class _ProgressNoteState extends State { + List notesList; + var filteredNotesList; + bool isDischargedPatient = false; + AuthenticationViewModel authenticationViewModel; + ProjectViewModel projectViewModel; + + getProgressNoteList(BuildContext context, PatientViewModel model, + {bool isLocalBusy = false}) async { + final routeArgs = ModalRoute.of(context).settings.arguments as Map; + PatiantInformtion patient = routeArgs['patient']; + String type = await sharedPref.getString(SLECTED_PATIENT_TYPE); + + print(type); + GetNursingProgressNoteRequestModel getNursingProgressNoteRequestModel = + GetNursingProgressNoteRequestModel( + admissionNo: int.parse(patient.admissionNo), + patientTypeID: patient.patientType, + patientID: patient.patientId, + setupID: "010266"); + model.getNursingProgressNote(getNursingProgressNoteRequestModel); + } + + @override + Widget build(BuildContext context) { + authenticationViewModel = Provider.of(context); + projectViewModel = Provider.of(context); + final routeArgs = ModalRoute.of(context).settings.arguments as Map; + PatiantInformtion patient = routeArgs['patient']; + if (routeArgs.containsKey('isDischargedPatient')) + isDischargedPatient = routeArgs['isDischargedPatient']; + return BaseView( + onModelReady: (model) => getProgressNoteList(context, model), + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + backgroundColor: Theme.of(context).scaffoldBackgroundColor, + // appBarTitle: TranslationBase.of(context).progressNote, + appBar: PatientProfileAppBar( + patient, + isInpatient: true, + ), + body: model.patientNursingProgressNoteList == null || + model.patientNursingProgressNoteList.length == 0 + ? Center( + child: ErrorMessage( + error: TranslationBase.of(context).noDataAvailable, + ), + ) + : Container( + color: Colors.grey[200], + child: Column( + children: [ + Expanded( + child: Container( + child: ListView.builder( + itemCount: + model.patientNursingProgressNoteList.length, + itemBuilder: (BuildContext ctxt, int index) { + return FractionallySizedBox( + widthFactor: 0.95, + child: CardWithBgWidget( + hasBorder: false, + bgColor: Colors.transparent, + widget: Column( + children: [ + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Container( + width: MediaQuery.of(context) + .size + .width * + 0.60, + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Row( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + AppText( + TranslationBase.of( + context) + .createdBy, + fontSize: 10, + ), + Expanded( + child: AppText( + model + .patientNursingProgressNoteList[ + index] + .createdByName + .toString() ?? + '', + fontWeight: + FontWeight.w600, + fontSize: 12, + isCopyable: true, + ), + ), + ], + ), + ], + ), + ), + Column( + children: [ + AppText( + model + .patientNursingProgressNoteList[ + index] + .createdOn != + null + ? AppDateUtils.getDayMonthYearDateFormatted( + AppDateUtils + .getDateTimeFromServerFormat(model + .patientNursingProgressNoteList[ + index] + .createdOn), + isArabic: + projectViewModel + .isArabic, + isMonthShort: true) + : AppDateUtils + .getDayMonthYearDateFormatted( + DateTime.now(), + isArabic: + projectViewModel + .isArabic), + fontWeight: FontWeight.w600, + fontSize: 14, + isCopyable: true, + ), + AppText( + model + .patientNursingProgressNoteList[ + index] + .createdOn != + null + ? AppDateUtils.getHour( + AppDateUtils + .getDateTimeFromServerFormat(model + .patientNursingProgressNoteList[ + index] + .createdOn)) + : AppDateUtils.getHour( + DateTime.now()), + fontWeight: FontWeight.w600, + fontSize: 14, + isCopyable: true, + ), + ], + crossAxisAlignment: + CrossAxisAlignment.end, + ) + ], + ), + SizedBox( + height: 8, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + Expanded( + child: AppText( + model + .patientNursingProgressNoteList[ + index] + .notes, + fontSize: 10, + isCopyable: true, + ), + ), + ]) + ], + ), + SizedBox( + height: 20, + ), + ], + ), + ), + ); + }), + ), + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/screens/patients/profile/operation_report/operation_report.dart b/lib/screens/patients/profile/operation_report/operation_report.dart new file mode 100644 index 00000000..4d566e6c --- /dev/null +++ b/lib/screens/patients/profile/operation_report/operation_report.dart @@ -0,0 +1,375 @@ +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/core/model/note/note_model.dart'; +import 'package:doctor_app_flutter/core/model/note/update_note_model.dart'; +import 'package:doctor_app_flutter/core/service/AnalyticsService.dart'; +import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/profile/operation_report_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; +import 'package:doctor_app_flutter/locator.dart'; +import 'package:doctor_app_flutter/models/patient/progress_note_request.dart'; +import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/operation_report/update_operation_report.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart'; +import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; +import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart'; +import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; +import 'package:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'package:provider/provider.dart'; + +import '../../../../config/shared_pref_kay.dart'; +import '../../../../models/patient/patiant_info_model.dart'; +import '../../../../util/dr_app_shared_pref.dart'; +import '../../../../widgets/shared/app_scaffold_widget.dart'; +import '../../../../widgets/shared/app_texts_widget.dart'; + +DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); + +class OperationReportScreen extends StatefulWidget { + final int visitType; + + const OperationReportScreen({Key key, this.visitType}) : super(key: key); + + @override + _ProgressNoteState createState() => _ProgressNoteState(); +} + +class _ProgressNoteState extends State { + List notesList; + var filteredNotesList; + bool isDischargedPatient = false; + AuthenticationViewModel authenticationViewModel; + ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + authenticationViewModel = Provider.of(context); + projectViewModel = Provider.of(context); + final routeArgs = ModalRoute.of(context).settings.arguments as Map; + PatiantInformtion patient = routeArgs['patient']; + if (routeArgs.containsKey('isDischargedPatient')) + isDischargedPatient = routeArgs['isDischargedPatient']; + return BaseView( + onModelReady: (model) => model.getReservations(patient.patientMRN), + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + backgroundColor: Theme.of(context).scaffoldBackgroundColor, + // appBarTitle: TranslationBase.of(context).progressNote, + appBar: PatientProfileAppBar( + patient, + isInpatient: true, + ), + body: Container( + color: Colors.grey[200], + child:model.reservationList == null || + model.reservationList.length == 0 + ? Center( + child: ErrorMessage( + error: TranslationBase.of(context).noDataAvailable, ), + ): Column( + children: [ + Expanded( + child: Container( + child: ListView.builder( + itemCount: model.reservationList.length, + itemBuilder: (BuildContext ctxt, int index) { + return FractionallySizedBox( + widthFactor: 0.95, + child: CardWithBgWidget( + hasBorder: false, + bgColor: Colors.white, + widget: Column( + children: [ + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Container( + width: MediaQuery.of(context) + .size + .width * + 0.60, + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Row( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + AppText( + TranslationBase.of( + context) + .createdBy, + fontSize: 10, + ), + Expanded( + child: AppText( + model + .reservationList[ + index] + .doctorName ?? + '', + fontWeight: + FontWeight.w600, + fontSize: 12, + ), + ), + ], + ), + ], + ), + ), + Column( + children: [ + AppText( + model + .reservationList[ + index] + .createdOn != + null + ? AppDateUtils.getDayMonthYearDateFormatted( + AppDateUtils + .getDateTimeFromServerFormat(model + .reservationList[ + index] + .createdOn), + isArabic: + projectViewModel + .isArabic, + isMonthShort: true) + : AppDateUtils + .getDayMonthYearDateFormatted( + DateTime.now(), + isArabic: + projectViewModel + .isArabic), + fontWeight: FontWeight.w600, + fontSize: 14, + ), + AppText( + model + .reservationList[ + index] + .createdOn != + null + ? AppDateUtils.getHour( + AppDateUtils + .getDateTimeFromServerFormat(model + .reservationList[ + index] + .createdOn)) + : AppDateUtils.getHour( + DateTime.now()), + fontWeight: FontWeight.w600, + fontSize: 14, + ), + ], + crossAxisAlignment: + CrossAxisAlignment.end, + ) + ], + ), + SizedBox( + height: 8, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).reservation, + fontSize: 10, + ), + Expanded( + child: AppText( + model.reservationList[index].oTReservationID.toString(), + fontSize: 10, + ), + ) + ]), + SizedBox( + height: 8, + ), + if (model.reservationList[index] + .operationDate != + null) + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).operationDate, + fontSize: 10, + ), + Expanded( + child: AppText( + AppDateUtils.getDayMonthYearDateFormatted( + AppDateUtils + .getDateTimeFromServerFormat(model + .reservationList[ + index] + .operationDate), + isArabic: + projectViewModel + .isArabic, + isMonthShort: true), + fontSize: 10, + ), + ) + ]), + if (model.reservationList[index] + .timeStart != + null) + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).operationTimeStart , + fontSize: 10, + ), + Expanded( + child: AppText( + model + .reservationList[ + index] + .timeStart, + fontSize: 10, + ), + ) + ]), + if (model.reservationList[index] + .remarks != + null) + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).remarks, + fontSize: 10, + ), + Expanded( + child: AppText( + model + .reservationList[ + index] + .remarks ?? + '', + fontSize: 10, + ), + ), + ]) + ], + ), + + SizedBox( + height: 20, + ), + + // if ( + // authenticationViewModel + // .doctorProfile.doctorID == + // model + // .operationReportList[ + // index] + // .createdBy) + Row( + crossAxisAlignment: + CrossAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment.end, + children: [ + InkWell( + onTap: () async { + await locator() + .logEvent( + eventCategory: + "Operation Report Screen", + eventAction: + "Update Operation Report ", + ); + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + UpdateOperationReport( + reservation: model + .reservationList[ + index], + patient: patient, + isUpdate: true, + )), + ); + }, + child: Container( + decoration: BoxDecoration( + color: AppGlobal.appGreenColor, + borderRadius: + BorderRadius.circular(10), + ), + // color:Colors.red[600], + + child: Row( + children: [ + Icon( + DoctorApp.edit_1, + size: 12, + color: Colors.white, + ), + SizedBox( + width: 2, + ), + AppText( + TranslationBase.of(context).operationReports, + fontSize: 10, + color: Colors.white, + ), + ], + ), + padding: EdgeInsets.all(6), + ), + ), + SizedBox( + width: 10, + ), + SizedBox( + width: 10, + ), + ], + ), + + SizedBox( + height: 10, + ), + ], + ), + ), + ); + }), + ), + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/screens/patients/profile/operation_report/update_operation_report.dart b/lib/screens/patients/profile/operation_report/update_operation_report.dart new file mode 100644 index 00000000..28141d45 --- /dev/null +++ b/lib/screens/patients/profile/operation_report/update_operation_report.dart @@ -0,0 +1,645 @@ +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/enum/viewstate.dart'; +import 'package:doctor_app_flutter/core/model/note/CreateNoteModel.dart'; +import 'package:doctor_app_flutter/core/model/note/note_model.dart'; +import 'package:doctor_app_flutter/core/model/note/update_note_model.dart'; +import 'package:doctor_app_flutter/core/provider/robot_provider.dart'; +import 'package:doctor_app_flutter/core/viewModel/profile/operation_report_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; +import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; +import 'package:doctor_app_flutter/models/operation_report/create_update_operation_report_request_model.dart'; +import 'package:doctor_app_flutter/models/operation_report/get_operation_details_response_modle.dart'; +import 'package:doctor_app_flutter/models/operation_report/get_reservations_response_model.dart'; +import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/models/patient/progress_note_request.dart'; +import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart'; +import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; +import 'package:doctor_app_flutter/util/helpers.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; +import 'package:doctor_app_flutter/widgets/shared/speech-text-popup.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; +import 'package:flutter/material.dart'; +import 'package:permission_handler/permission_handler.dart'; +import 'package:provider/provider.dart'; +import 'package:speech_to_text/speech_recognition_error.dart'; +import 'package:speech_to_text/speech_to_text.dart' as stt; + +class UpdateOperationReport extends StatefulWidget { + final GetReservationsResponseModel reservation; + // final OperationReportViewModel operationReportViewModel; + final PatiantInformtion patient; + final int visitType; + final bool isUpdate; + + const UpdateOperationReport( + {Key key, + // this.operationReportViewModel, + this.patient, + this.visitType, + this.isUpdate, + this.reservation}) + : super(key: key); + + @override + _UpdateOperationReportState createState() => _UpdateOperationReportState(); +} + +class _UpdateOperationReportState extends State { + int selectedType; + bool isSubmitted = false; + stt.SpeechToText speech = stt.SpeechToText(); + var reconizedWord; + var event = RobotProvider(); + ProjectViewModel projectViewModel; + + TextEditingController preOpDiagmosisController = TextEditingController(); + TextEditingController postOpDiagmosisNoteController = TextEditingController(); + TextEditingController surgeonController = TextEditingController(); + TextEditingController assistantNoteController = TextEditingController(); + TextEditingController operationController = TextEditingController(); + TextEditingController inasionController = TextEditingController(); + TextEditingController findingController = TextEditingController(); + TextEditingController surgeryProcedureController = TextEditingController(); + TextEditingController postOpInstructionController = TextEditingController(); + TextEditingController complicationDetailsController = TextEditingController(); + TextEditingController bloodLossDetailController = TextEditingController(); + TextEditingController histopathSpecimenController = TextEditingController(); + TextEditingController microbiologySpecimenController = + TextEditingController(); + TextEditingController otherSpecimenController = TextEditingController(); + TextEditingController scrubNurseController = TextEditingController(); + TextEditingController circulatingNurseController = TextEditingController(); + TextEditingController BloodTransfusedDetailController = + TextEditingController(); + TextEditingController anasthetistController = TextEditingController(); + TextEditingController OTReservationID = TextEditingController(); + + setSelectedType(int val) { + setState(() { + selectedType = val; + }); + } + + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + //TODO Elham* add translation to hints + + return BaseView( + onModelReady: (model) async { + await model + .getOperationReportDetails(widget.reservation); + OTReservationID.text = widget.reservation.oTReservationID.toString(); + + if (model.operationDetailsList.isNotEmpty) { + GetOperationDetailsResponseModel oldDetails = + model.operationDetailsList[0]; + + postOpDiagmosisNoteController.text = oldDetails.postOpInstruction; + preOpDiagmosisController.text = oldDetails.preOpDiagnosis; + surgeonController.text = oldDetails.surgeon; + assistantNoteController.text = oldDetails.assistant; + operationController.text = oldDetails.operation; + inasionController.text = oldDetails.inasion; + findingController.text = oldDetails.finding; + surgeryProcedureController.text = oldDetails.surgeryProcedure; + postOpInstructionController.text = oldDetails.postOpInstruction; + complicationDetailsController.text = oldDetails.complicationDetail; + bloodLossDetailController.text = oldDetails.bloodLossDetail; + histopathSpecimenController.text = oldDetails.histopathSpecimen; + microbiologySpecimenController.text = + oldDetails.microbiologySpecimen; + otherSpecimenController.text = oldDetails.otherSpecimen; + scrubNurseController.text = oldDetails.scrubNurse; + circulatingNurseController.text = oldDetails.circulatingNurse; + BloodTransfusedDetailController.text = + oldDetails.bloodTransfusedDetail; + anasthetistController.text = oldDetails.anasthetist; + } + }, + builder: (_, model, w) => AppScaffold( + isShowAppBar: true, + baseViewModel: model, + backgroundColor: Theme.of(context).scaffoldBackgroundColor, + appBar: BottomSheetTitle( + title: TranslationBase.of(context).operationReports, + ), + body: SingleChildScrollView( + child: Container( + height: MediaQuery.of(context).size.height * 1.0, + child: Padding( + padding: EdgeInsets.all(0.0), + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10.0, + ), + SingleChildScrollView( + child: Center( + child: FractionallySizedBox( + widthFactor: 0.9, + child: Column( + children: [ + AppTextFieldCustom( + hintText:TranslationBase.of(context).reservation, + controller: OTReservationID, + maxLines: 1, + minLines: 1, + enabled: false, + hasBorder: true, + ), + SizedBox( + height: 4, + ), + AppTextFieldCustom( + hintText:TranslationBase.of(context).preOperationDiagnosis, + controller: preOpDiagmosisController, + maxLines: 20, + minLines: 8, + hasBorder: true, + + // isTextFieldHasSuffix: true, + validationError: preOpDiagmosisController + .text.isEmpty && + isSubmitted + ? TranslationBase.of(context) + .emptyMessage + : null, + ), + SizedBox( + height: 4, + ), + AppTextFieldCustom( + hintText: TranslationBase.of(context).postOperationDiagnosis, + controller: postOpDiagmosisNoteController, + maxLines: 20, + minLines: 8, + hasBorder: true, + // isTextFieldHasSuffix: true, + validationError: + postOpDiagmosisNoteController + .text.isEmpty && + isSubmitted + ? TranslationBase.of(context) + .emptyMessage + : null, + ), + SizedBox( + height: 4, + ), + AppTextFieldCustom( + hintText: TranslationBase.of(context).surgeon, + controller: surgeonController, + maxLines: 1, + minLines: 1, + hasBorder: true, + // isTextFieldHasSuffix: true, + validationError: + surgeonController.text.isEmpty && + isSubmitted + ? TranslationBase.of(context) + .emptyMessage + : null, + ), + SizedBox( + height: 4, + ), + AppTextFieldCustom( + hintText:TranslationBase.of(context).assistant, + controller: assistantNoteController, + maxLines: 1, + minLines: 1, + hasBorder: true, + + // isTextFieldHasSuffix: true, + validationError: assistantNoteController + .text.isEmpty && + isSubmitted + ? TranslationBase.of(context) + .emptyMessage + : null, + ), + SizedBox( + height: 4, + ), + AppTextFieldCustom( + hintText: + TranslationBase.of(context).operation, + controller: operationController, + maxLines: 20, + minLines: 4, + hasBorder: true, + + // isTextFieldHasSuffix: true, + validationError: + operationController.text.isEmpty && + isSubmitted + ? TranslationBase.of(context) + .emptyMessage + : null, + ), + SizedBox( + height: 4, + ), + AppTextFieldCustom( + hintText: "inasion", + //TranslationBase.of(context).addoperationReports, + controller: inasionController, + maxLines: 1, + minLines: 1, + hasBorder: true, + + // isTextFieldHasSuffix: true, + validationError: + inasionController.text.isEmpty && + isSubmitted + ? TranslationBase.of(context) + .emptyMessage + : null, + ), + SizedBox( + height: 4, + ), + AppTextFieldCustom( + hintText: TranslationBase.of(context).finding, + controller: findingController, + maxLines: 20, + minLines: 4, + hasBorder: true, + + // isTextFieldHasSuffix: true, + validationError: + findingController.text.isEmpty && + isSubmitted + ? TranslationBase.of(context) + .emptyMessage + : null, + ), + SizedBox( + height: 4, + ), + AppTextFieldCustom( + hintText: TranslationBase.of(context).surgeryProcedure, + controller: surgeryProcedureController, + maxLines: 20, + minLines: 8, + hasBorder: true, + + // isTextFieldHasSuffix: true, + validationError: + surgeryProcedureController + .text.isEmpty && + isSubmitted + ? TranslationBase.of(context) + .emptyMessage + : null, + ), + SizedBox( + height: 4, + ), + AppTextFieldCustom( + hintText: TranslationBase.of(context).postOperationInstruction, + controller: postOpInstructionController, + maxLines: 20, + minLines: 8, + hasBorder: true, + + // isTextFieldHasSuffix: true, + validationError: + postOpInstructionController + .text.isEmpty && + isSubmitted + ? TranslationBase.of(context) + .emptyMessage + : null, + ), + SizedBox( + height: 4, + ), + AppTextFieldCustom( + hintText: TranslationBase.of(context).complicationDetails1, + controller: complicationDetailsController, + maxLines: 20, + minLines: 4, + hasBorder: true, + // isTextFieldHasSuffix: true, + validationError: + complicationDetailsController + .text.isEmpty && + isSubmitted + ? TranslationBase.of(context) + .emptyMessage + : null, + ), + SizedBox( + height: 4, + ), + AppTextFieldCustom( + hintText: TranslationBase.of(context).bloodLossDetail, + controller: bloodLossDetailController, + maxLines: 20, + minLines: 4, + hasBorder: true, + + // isTextFieldHasSuffix: true, + validationError: bloodLossDetailController + .text.isEmpty && + isSubmitted + ? TranslationBase.of(context) + .emptyMessage + : null, + ), + SizedBox( + height: 4, + ), + AppTextFieldCustom( + hintText: TranslationBase.of(context).histopathSpecimen, + controller: histopathSpecimenController, + maxLines: 20, + minLines: 4, + hasBorder: true, + + // isTextFieldHasSuffix: true, + validationError: + histopathSpecimenController + .text.isEmpty && + isSubmitted + ? TranslationBase.of(context) + .emptyMessage + : null, + ), + SizedBox( + height: 4, + ), + AppTextFieldCustom( + hintText: TranslationBase.of(context).microbiologySpecimen, + controller: + microbiologySpecimenController, + maxLines: 20, + minLines: 4, + hasBorder: true, + + // isTextFieldHasSuffix: true, + validationError: + microbiologySpecimenController + .text.isEmpty && + isSubmitted + ? TranslationBase.of(context) + .emptyMessage + : null, + ), + SizedBox( + height: 4, + ), + AppTextFieldCustom( + hintText: TranslationBase.of(context).otherSpecimen, + controller: otherSpecimenController, + maxLines: 20, + minLines: 4, + hasBorder: true, + + // isTextFieldHasSuffix: true, + validationError: otherSpecimenController + .text.isEmpty && + isSubmitted + ? TranslationBase.of(context) + .emptyMessage + : null, + ), + SizedBox( + height: 4, + ), + AppTextFieldCustom( + hintText: TranslationBase.of(context).scrubNurse, + controller: scrubNurseController, + maxLines: 1, + minLines: 1, + hasBorder: true, + + // isTextFieldHasSuffix: true, + validationError: + scrubNurseController.text.isEmpty && + isSubmitted + ? TranslationBase.of(context) + .emptyMessage + : null, + ), + SizedBox( + height: 4, + ), + AppTextFieldCustom( + hintText:TranslationBase.of(context).circulatingNurse, + controller: circulatingNurseController, + maxLines: 1, + minLines: 1, + hasBorder: true, + + // isTextFieldHasSuffix: true, + validationError: + circulatingNurseController + .text.isEmpty && + isSubmitted + ? TranslationBase.of(context) + .emptyMessage + : null, + ), + SizedBox( + height: 4, + ), + AppTextFieldCustom( + hintText: TranslationBase.of(context).bloodTransfusedDetail, + controller: + BloodTransfusedDetailController, + maxLines: 20, + minLines: 4, + hasBorder: true, + + // isTextFieldHasSuffix: true, + validationError: + BloodTransfusedDetailController + .text.isEmpty && + isSubmitted + ? TranslationBase.of(context) + .emptyMessage + : null, + ), + SizedBox( + height: 4, + ), + AppTextFieldCustom( + hintText: TranslationBase.of(context).anesthetist, + controller: anasthetistController, + maxLines: 1, + minLines: 1, + hasBorder: true, + + // isTextFieldHasSuffix: true, + validationError: + anasthetistController.text.isEmpty && + isSubmitted + ? TranslationBase.of(context) + .emptyMessage + : null, + ), + SizedBox( + height: 250, + ), + ], + ), + ), + ), + ), + ], + ), + ), + ), + ), + ), + bottomSheet: model.state != ViewState.Idle?Container(height: 0,): Container( + height: 70, + margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5), + child: Column( + children: [ + Container( + margin: EdgeInsets.all(5), + child: AppButton( + title: (widget.isUpdate + ? TranslationBase.of(context).noteUpdate + : TranslationBase.of(context).noteAdd) +" "+ + TranslationBase.of(context).operationReports, + color: Color(0xff359846), + // disabled: operationReportsController.text.isEmpty, + fontWeight: FontWeight.w700, + onPressed: () async { + setState(() { + isSubmitted = true; + }); + if (isFormValid()) { + GifLoaderDialogUtils.showMyDialog(context); + await model + .getDoctorProfile(); + + CreateUpdateOperationReportRequestModel + createUpdateOperationReportRequestModel = + CreateUpdateOperationReportRequestModel( + inasion: inasionController.text, + + /// TODO Elham* Add dynamic reservation + reservationNo: + widget.reservation.oTReservationID, + preOpDiagmosis: + preOpDiagmosisController.text, + postOpDiagmosis: + postOpDiagmosisNoteController.text, + surgeon: surgeonController.text, + assistant: assistantNoteController.text, + anasthetist: assistantNoteController.text, + operation: operationController.text, + finding: findingController.text, + surgeryProcedure: surgeonController.text, + postOpInstruction: + postOpInstructionController.text, + complicationDetails: + complicationDetailsController.text, + bloodLossDetail: + bloodLossDetailController.text, + histopathSpecimen: + histopathSpecimenController.text, + microbiologySpecimen: + microbiologySpecimenController.text, + otherSpecimen: otherSpecimenController.text, + scrubNurse: surgeonController.text, + circulatingNurse: + circulatingNurseController.text, + bloodTransfusedDetail: + bloodLossDetailController.text, + patientID: widget.patient.patientId, + admissionNo: + int.parse(widget.patient.admissionNo), + createdBy: model + .doctorProfile.doctorID, + setupID: "010266"); + await model + .updateOperationReport( + createUpdateOperationReportRequestModel); + + if (model.state == + ViewState.ErrorLocal) { + Helpers.showErrorToast( + model.error); + } else { + // await model.( + // operationReportsRequest.toJson()); + + DrAppToastMsg.showSuccesToast( + "Your Order added Successfully"); + } + GifLoaderDialogUtils.hideDialog(context); + } + }, + ), + ), + ], + ), + ), + )); + } + + isFormValid() { + if (preOpDiagmosisController.text != null && + preOpDiagmosisController.text.isNotEmpty && + postOpDiagmosisNoteController.text != null && + postOpDiagmosisNoteController.text.isNotEmpty && + surgeonController.text != null && + surgeonController.text.isNotEmpty && + assistantNoteController.text != null && + assistantNoteController.text.isNotEmpty && + operationController.text != null && + operationController.text.isNotEmpty && + inasionController.text != null && + inasionController.text.isNotEmpty && + findingController.text != null && + findingController.text.isNotEmpty && + surgeryProcedureController.text != null && + surgeryProcedureController.text.isNotEmpty && + postOpInstructionController.text != null && + postOpInstructionController.text.isNotEmpty && + complicationDetailsController.text != null && + complicationDetailsController.text.isNotEmpty && + bloodLossDetailController.text != null && + bloodLossDetailController.text.isNotEmpty && + histopathSpecimenController.text != null && + histopathSpecimenController.text.isNotEmpty && + microbiologySpecimenController.text != null && + microbiologySpecimenController.text.isNotEmpty && + otherSpecimenController.text != null && + otherSpecimenController.text.isNotEmpty && + scrubNurseController.text != null && + scrubNurseController.text.isNotEmpty && + circulatingNurseController.text != null && + circulatingNurseController.text.isNotEmpty && + BloodTransfusedDetailController.text != null && + BloodTransfusedDetailController.text.isNotEmpty && + anasthetistController.text != null && + anasthetistController.text.isNotEmpty) { + return true; + } else { + return false; + } + } +} diff --git a/lib/screens/patients/profile/pending_orders/pending_orders_screen.dart b/lib/screens/patients/profile/pending_orders/pending_orders_screen.dart new file mode 100644 index 00000000..74d075e3 --- /dev/null +++ b/lib/screens/patients/profile/pending_orders/pending_orders_screen.dart @@ -0,0 +1,105 @@ +import 'package:doctor_app_flutter/core/viewModel/pednding_orders_view_model.dart'; +import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; +import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart'; +import 'package:flutter/material.dart'; + +class PendingOrdersScreen extends StatelessWidget { + const PendingOrdersScreen({Key key}) : super(key: key); + + @override + Widget build(BuildContext context) { + final routeArgs = ModalRoute.of(context).settings.arguments as Map; + PatiantInformtion patient = routeArgs['patient']; + patient = routeArgs['patient']; + String patientType = routeArgs['patientType']; + bool isInpatient = routeArgs['isInpatient']; + return BaseView( + onModelReady: (model) => model.getPendingOrders( + patientId: patient.patientMRN, + admissionNo: int.parse(patient.admissionNo)), + builder: + (BuildContext context, PendingOrdersViewModel model, Widget child) => + AppScaffold( + appBar: PatientProfileAppBar( + patient, + isInpatient: isInpatient, + ), + isShowAppBar: true, + baseViewModel: model, + appBarTitle: "Pending Orders", + body: model.pendingOrdersList == null || + model.pendingOrdersList.length == 0 + ? Center( + child: ErrorMessage( + error: TranslationBase.of(context).noDataAvailable, ), + ) + : Column( + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + children: [ + Row( + children: [ + AppText( + TranslationBase.of(context).pending, + fontSize: 15.0, + fontWeight: FontWeight.w600, + fontFamily: 'Poppins', + ), + ], + ), + Row( + children: [ + AppText( + TranslationBase.of(context).orders, + fontSize: 25.0, + fontWeight: FontWeight.w700, + ), + ], + ), + ], + ), + ), + Expanded( + child: Container( + height: MediaQuery.of(context).size.height *.9, + child: ListView.builder( + itemCount: + model.pendingOrdersList.length, + itemBuilder: (BuildContext ctxt, int index) { + return FractionallySizedBox( + widthFactor: 0.95, + child: CardWithBgWidget( + hasBorder: false, + bgColor: Colors.transparent, + widget: Column( + children: [ + Padding( + padding: EdgeInsets.all(8.0), + child: AppText( + model.pendingOrdersList[index].notes), + ), + SizedBox( + height: 20, + ), + ], + ), + ), + ); + }), + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart b/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart index 0c66b493..a62fae57 100644 --- a/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart +++ b/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart @@ -1,5 +1,6 @@ import 'dart:async'; +import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/service/AnalyticsService.dart'; import 'package:doctor_app_flutter/core/service/VideoCallService.dart'; @@ -21,6 +22,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:quiver/async.dart'; @@ -249,9 +251,9 @@ class _PatientProfileScreenState extends State radius: 30, hPadding: 20, fontWeight: FontWeight.normal, - fontSize: 1.6, - icon: Image.asset( - "assets/images/create-episod.png", + fontSize: 12, + icon: SvgPicture.asset( + "assets/images/svgs/profile_screen/create episode.svg", color: Colors.white, height: 30, ), @@ -281,9 +283,9 @@ class _PatientProfileScreenState extends State radius: 30, hPadding: 20, fontWeight: FontWeight.normal, - fontSize: 1.6, - icon: Image.asset( - "assets/images/modilfy-episode.png", + fontSize: 12, + icon: SvgPicture.asset( + "assets/images/svgs/profile_screen/modify episode.svg", color: Colors.white, height: 30, ), @@ -334,7 +336,7 @@ class _PatientProfileScreenState extends State fontWeight: FontWeight.w700, color: isCallFinished ? Colors.red[600] - : Colors.green[600], + : AppGlobal.appGreenColor, title: isCallFinished ? TranslationBase.of(context).endCall : TranslationBase.of(context).initiateCall, diff --git a/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart b/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart index 5ac21f91..6dc954c3 100644 --- a/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart +++ b/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart @@ -35,55 +35,137 @@ class ProfileGridForInPatient extends StatelessWidget { @override Widget build(BuildContext context) { final List cardsList = [ - PatientProfileCardModel(TranslationBase.of(context).vital, TranslationBase.of(context).signs, VITAL_SIGN_DETAILS, - 'patient/vital_signs.png', + PatientProfileCardModel( + TranslationBase.of(context).vital, + TranslationBase.of(context).signs, + VITAL_SIGN_DETAILS, + 'assets/images/svgs/profile_screen/vital signs.svg', isInPatient: isInpatient), PatientProfileCardModel( - TranslationBase.of(context).lab, TranslationBase.of(context).result, LAB_RESULT, 'patient/lab_results.png', + TranslationBase.of(context).lab, + TranslationBase.of(context).result, + LAB_RESULT, + 'assets/images/svgs/profile_screen/lab results.svg', isInPatient: isInpatient), - PatientProfileCardModel(TranslationBase.of(context).lab, TranslationBase.of(context).special, - ALL_SPECIAL_LAB_RESULT, 'patient/lab_results.png', + PatientProfileCardModel( + TranslationBase.of(context).lab, + TranslationBase.of(context).special, + ALL_SPECIAL_LAB_RESULT, + 'assets/images/svgs/profile_screen/lab results.svg', isInPatient: isInpatient), - PatientProfileCardModel(TranslationBase.of(context).radiology, TranslationBase.of(context).result, - RADIOLOGY_PATIENT, 'patient/health_summary.png', + PatientProfileCardModel( + TranslationBase.of(context).radiology, + TranslationBase.of(context).result, + RADIOLOGY_PATIENT, + 'assets/images/svgs/profile_screen/Radiology.svg', isInPatient: isInpatient), - PatientProfileCardModel(TranslationBase.of(context).patient, TranslationBase.of(context).prescription, - ORDER_PRESCRIPTION_NEW, 'patient/order_prescription.png', + PatientProfileCardModel( + TranslationBase.of(context).patient, + TranslationBase.of(context).prescription, + ORDER_PRESCRIPTION_NEW, + 'assets/images/svgs/profile_screen/order prescription.svg', isInPatient: isInpatient), - PatientProfileCardModel(TranslationBase.of(context).progress, TranslationBase.of(context).note, PROGRESS_NOTE, - 'patient/Progress_notes.png', - isInPatient: isInpatient, isDischargedPatient: isDischargedPatient), - PatientProfileCardModel(TranslationBase.of(context).order, TranslationBase.of(context).sheet, ORDER_NOTE, - 'patient/Progress_notes.png', - isInPatient: isInpatient, isDischargedPatient: isDischargedPatient), - PatientProfileCardModel(TranslationBase.of(context).orders, TranslationBase.of(context).procedures, - ORDER_PROCEDURE, 'patient/Order_Procedures.png', + PatientProfileCardModel( + TranslationBase.of(context).progress, + TranslationBase.of(context).note, + PROGRESS_NOTE, + 'assets/images/svgs/profile_screen/Progress notes.svg', + isInPatient: isInpatient, + isDischargedPatient: isDischargedPatient), + PatientProfileCardModel( + TranslationBase.of(context).order, + TranslationBase.of(context).sheet, + ORDER_NOTE, + 'assets/images/svgs/profile_screen/order sheets.svg', + isInPatient: isInpatient, + isDischargedPatient: isDischargedPatient), + PatientProfileCardModel( + TranslationBase.of(context).orders, + TranslationBase.of(context).procedures, + ORDER_PROCEDURE, + 'assets/images/svgs/profile_screen/Order Procedures.svg', isInPatient: isInpatient), - PatientProfileCardModel(TranslationBase.of(context).health, TranslationBase.of(context).summary, HEALTH_SUMMARY, - 'patient/health_summary.png', + PatientProfileCardModel( + TranslationBase.of(context).health, + TranslationBase.of(context).summary, + HEALTH_SUMMARY, + 'assets/images/svgs/profile_screen/health summary.svg', isInPatient: isInpatient), - PatientProfileCardModel(TranslationBase.of(context).medical, TranslationBase.of(context).report, - PATIENT_MEDICAL_REPORT, 'patient/health_summary.png', - isInPatient: isInpatient, isDisable: false), + PatientProfileCardModel( + TranslationBase.of(context).medical, + TranslationBase.of(context).report, + PATIENT_MEDICAL_REPORT, + 'assets/images/svgs/profile_screen/medical report.svg', + isInPatient: isInpatient, + isDisable: false), PatientProfileCardModel( TranslationBase.of(context).referral, TranslationBase.of(context).patient, REFER_IN_PATIENT_TO_DOCTOR, - 'patient/refer_patient.png', + 'assets/images/svgs/profile_screen/refer patient.svg', isInPatient: isInpatient, isDisable: isDischargedPatient || isFromSearch, ), - PatientProfileCardModel(TranslationBase.of(context).insurance, TranslationBase.of(context).approvals, - PATIENT_INSURANCE_APPROVALS_NEW, 'patient/vital_signs.png', + PatientProfileCardModel( + TranslationBase.of(context).insurance, + TranslationBase.of(context).approvals, + PATIENT_INSURANCE_APPROVALS_NEW, + 'assets/images/svgs/profile_screen/insurance approval.svg', isInPatient: isInpatient), - PatientProfileCardModel(TranslationBase.of(context).discharge, TranslationBase.of(context).report, null, - 'patient/patient_sick_leave.png', - isInPatient: isInpatient, isDisable: true), + PatientProfileCardModel( + TranslationBase.of(context).discharge, + TranslationBase.of(context).report, + DISCHARGE_SUMMARY, + 'assets/images/svgs/profile_screen/discharge summary.svg', + isInPatient: isInpatient, + ), PatientProfileCardModel( TranslationBase.of(context).patientSick, TranslationBase.of(context).leave, ADD_SICKLEAVE, - 'patient/patient_sick_leave.png', + 'assets/images/svgs/profile_screen/patient sick leave.svg', + isInPatient: isInpatient, + ), + PatientProfileCardModel( + TranslationBase.of(context).operation, + TranslationBase.of(context).report, + GET_OPERATION_REPORT, + 'assets/images/svgs/profile_screen/operating report.svg', + isInPatient: isInpatient, + ), + PatientProfileCardModel( + TranslationBase.of(context).pending, + TranslationBase.of(context).orders, + PENDING_ORDERS, + 'assets/images/svgs/profile_screen/pending orders.svg', + isInPatient: isInpatient, + ), + PatientProfileCardModel( + TranslationBase.of(context).admission, + TranslationBase.of(context).orders, + ADMISSION_ORDERS, + 'assets/images/svgs/profile_screen/admission req.svg', + isInPatient: isInpatient, + ), + PatientProfileCardModel( + "Nursing", + TranslationBase.of(context).progressNote, + NURSING_PROGRESS_NOTE, + 'assets/images/svgs/profile_screen/Progress notes.svg', + isInPatient: isInpatient, + ), + PatientProfileCardModel( + TranslationBase.of(context).diagnosis, + "", + DIAGNOSIS_FOR_IN_PATIENT, + 'assets/images/svgs/profile_screen/diagnosis.svg', + isInPatient: isInpatient, + ), + PatientProfileCardModel( + TranslationBase.of(context).diabetic, + TranslationBase.of(context).chart, + DIABETIC_CHART_VALUES, + 'assets/images/svgs/profile_screen/diabetic chart.svg', isInPatient: isInpatient, ), ]; @@ -97,7 +179,7 @@ class ProfileGridForInPatient extends StatelessWidget { // if you want IOS bouncing effect, otherwise remove this line gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( crossAxisSpacing: 10, - mainAxisSpacing: 10, + mainAxisSpacing: 8, crossAxisCount: 3, ), //change the number as you want diff --git a/lib/screens/patients/profile/profile_screen/profile_gird_for_other.dart b/lib/screens/patients/profile/profile_screen/profile_gird_for_other.dart index a374898c..0c3da34b 100644 --- a/lib/screens/patients/profile/profile_screen/profile_gird_for_other.dart +++ b/lib/screens/patients/profile/profile_screen/profile_gird_for_other.dart @@ -34,37 +34,37 @@ class ProfileGridForOther extends StatelessWidget { Widget build(BuildContext context) { final List cardsList = [ PatientProfileCardModel(TranslationBase.of(context).vital, TranslationBase.of(context).signs, VITAL_SIGN_DETAILS, - 'patient/vital_signs.png', + 'assets/images/svgs/profile_screen/vital signs.svg', isInPatient: isInpatient), PatientProfileCardModel( - TranslationBase.of(context).lab, TranslationBase.of(context).result, LAB_RESULT, 'patient/lab_results.png', + TranslationBase.of(context).lab, TranslationBase.of(context).result, LAB_RESULT, 'assets/images/svgs/profile_screen/lab results.svg', isInPatient: isInpatient), PatientProfileCardModel(TranslationBase.of(context).lab, TranslationBase.of(context).special, - ALL_SPECIAL_LAB_RESULT, 'patient/lab_results.png', + ALL_SPECIAL_LAB_RESULT, 'assets/images/svgs/profile_screen/lab results.svg', isInPatient: isInpatient), PatientProfileCardModel(TranslationBase.of(context).radiology, TranslationBase.of(context).service, - RADIOLOGY_PATIENT, 'patient/health_summary.png', + RADIOLOGY_PATIENT, 'assets/images/svgs/profile_screen/health summary.svg', isInPatient: isInpatient), PatientProfileCardModel(TranslationBase.of(context).orders, TranslationBase.of(context).prescription, - ORDER_PRESCRIPTION_NEW, 'patient/order_prescription.png', + ORDER_PRESCRIPTION_NEW, 'assets/images/svgs/profile_screen/order prescription.svg', isInPatient: isInpatient), PatientProfileCardModel(TranslationBase.of(context).health, TranslationBase.of(context).summary, HEALTH_SUMMARY, - 'patient/health_summary.png', + 'assets/images/svgs/profile_screen/health summary.svg', isInPatient: isInpatient), - PatientProfileCardModel(TranslationBase.of(context).patient, "ECG", PATIENT_ECG, 'patient/patient_sick_leave.png', + PatientProfileCardModel(TranslationBase.of(context).patient, "ECG", PATIENT_ECG, 'assets/images/svgs/profile_screen/ECG.svg', isInPatient: isInpatient), PatientProfileCardModel(TranslationBase.of(context).orders, TranslationBase.of(context).procedures, - ORDER_PROCEDURE, 'patient/Order_Procedures.png', + ORDER_PROCEDURE, 'assets/images/svgs/profile_screen/Order Procedures.svg', isInPatient: isInpatient), PatientProfileCardModel(TranslationBase.of(context).insurance, TranslationBase.of(context).service, - PATIENT_INSURANCE_APPROVALS_NEW, 'patient/vital_signs.png', + PATIENT_INSURANCE_APPROVALS_NEW, 'assets/images/svgs/profile_screen/insurance approval.svg', isInPatient: isInpatient), PatientProfileCardModel(TranslationBase.of(context).patientSick, TranslationBase.of(context).leave, ADD_SICKLEAVE, - 'patient/patient_sick_leave.png', + 'assets/images/svgs/profile_screen/patient sick leave.svg', isInPatient: isInpatient), if (isFromLiveCare || (patient.appointmentNo != null && patient.appointmentNo != 0)) PatientProfileCardModel(TranslationBase.of(context).patient, TranslationBase.of(context).ucaf, - PATIENT_UCAF_REQUEST, 'patient/ucaf.png', + PATIENT_UCAF_REQUEST, 'assets/images/svgs/profile_screen/UCAF.svg', isInPatient: isInpatient, isDisable: isFromLiveCare ? patient.appointmentNo == null @@ -74,7 +74,7 @@ class ProfileGridForOther extends StatelessWidget { TranslationBase.of(context).referral, TranslationBase.of(context).patient, REFER_PATIENT_TO_DOCTOR, - 'patient/refer_patient.png', + 'assets/images/svgs/profile_screen/refer patient.svg', isInPatient: isInpatient, isDisable: isFromLiveCare ? patient.appointmentNo == null @@ -82,44 +82,44 @@ class ProfileGridForOther extends StatelessWidget { ), if (isFromLiveCare || (patient.appointmentNo != null && patient.appointmentNo != 0)) PatientProfileCardModel(TranslationBase.of(context).admission, TranslationBase.of(context).request, - PATIENT_ADMISSION_REQUEST, 'patient/admission_req.png', + PATIENT_ADMISSION_REQUEST, 'assets/images/svgs/profile_screen/admission req.svg', isInPatient: isInpatient, isDisable: isFromLiveCare ? patient.appointmentNo == null : patient.patientStatusType != 43 || patient.appointmentNo == null), ]; + return Padding( + padding: const EdgeInsets.symmetric(vertical: 15.0, horizontal: 15), + child: GridView( + shrinkWrap: true, - return Column( - children: [ - Padding( - padding: const EdgeInsets.symmetric(vertical: 15.0, horizontal: 15), - child: StaggeredGridView.countBuilder( - shrinkWrap: true, - physics: NeverScrollableScrollPhysics(), - crossAxisSpacing: 10, - mainAxisSpacing: 10, - crossAxisCount: 3, - itemCount: cardsList.length, - staggeredTileBuilder: (int index) => StaggeredTile.fit(1), - itemBuilder: (BuildContext context, int index) => PatientProfileButton( - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - from: from, - to: to, - nameLine1: cardsList[index].nameLine1, - nameLine2: cardsList[index].nameLine2, - route: cardsList[index].route, - icon: cardsList[index].icon, - isInPatient: cardsList[index].isInPatient, - isDischargedPatient: cardsList[index].isDischargedPatient, - isDisable: cardsList[index].isDisable, - onTap: cardsList[index].onTap, - isLoading: cardsList[index].isLoading, - isFromLiveCare: isFromLiveCare), - ), + physics: BouncingScrollPhysics(), + // if you want IOS bouncing effect, otherwise remove this line + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + crossAxisSpacing: 10, + mainAxisSpacing: 8, + crossAxisCount: 3, ), - ], + //change the number as you want + children: cardsList.map((item) { + return PatientProfileButton( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + from: from, + to: to, + nameLine1: item.nameLine1, + nameLine2: item.nameLine2, + route: item.route, + icon: item.icon, + isInPatient: item.isInPatient, + isDischargedPatient: item.isDischargedPatient, + isDisable: item.isDisable, + onTap: item.onTap, + isLoading: item.isLoading, + ); + }).toList(), + ), ); } } diff --git a/lib/screens/patients/profile/profile_screen/profile_gird_for_search.dart b/lib/screens/patients/profile/profile_screen/profile_gird_for_search.dart index 5bcc398d..cc738b17 100644 --- a/lib/screens/patients/profile/profile_screen/profile_gird_for_search.dart +++ b/lib/screens/patients/profile/profile_screen/profile_gird_for_search.dart @@ -24,79 +24,81 @@ class ProfileGridForSearch extends StatelessWidget { Widget build(BuildContext context) { final List cardsList = [ PatientProfileCardModel(TranslationBase.of(context).vital, TranslationBase.of(context).signs, VITAL_SIGN_DETAILS, - 'patient/vital_signs.png', + 'assets/images/svgs/profile_screen/vital signs.svg', isInPatient: isInpatient), PatientProfileCardModel( - TranslationBase.of(context).lab, TranslationBase.of(context).result, LAB_RESULT, 'patient/lab_results.png', + TranslationBase.of(context).lab, TranslationBase.of(context).result, LAB_RESULT, 'assets/images/svgs/profile_screen/lab results.svg', isInPatient: isInpatient), PatientProfileCardModel(TranslationBase.of(context).lab, TranslationBase.of(context).special, - ALL_SPECIAL_LAB_RESULT, 'patient/lab_results.png', + ALL_SPECIAL_LAB_RESULT, 'assets/images/svgs/profile_screen/lab results.svg', isInPatient: isInpatient), PatientProfileCardModel(TranslationBase.of(context).radiology, TranslationBase.of(context).service, - RADIOLOGY_PATIENT, 'patient/health_summary.png', + RADIOLOGY_PATIENT, 'assets/images/svgs/profile_screen/health summary.svg', isInPatient: isInpatient), PatientProfileCardModel(TranslationBase.of(context).orders, TranslationBase.of(context).prescription, - ORDER_PRESCRIPTION_NEW, 'patient/order_prescription.png', + ORDER_PRESCRIPTION_NEW, 'assets/images/svgs/profile_screen/order prescription.svg', isInPatient: isInpatient), PatientProfileCardModel(TranslationBase.of(context).health, TranslationBase.of(context).summary, HEALTH_SUMMARY, - 'patient/health_summary.png', + 'assets/images/svgs/profile_screen/health summary.svg', isInPatient: isInpatient), - PatientProfileCardModel(TranslationBase.of(context).patient, "ECG", PATIENT_ECG, 'patient/patient_sick_leave.png', + PatientProfileCardModel(TranslationBase.of(context).patient, "ECG", PATIENT_ECG, 'assets/images/svgs/profile_screen/ECG.svg', isInPatient: isInpatient), PatientProfileCardModel(TranslationBase.of(context).orders, TranslationBase.of(context).procedures, - ORDER_PROCEDURE, 'patient/Order_Procedures.png', + ORDER_PROCEDURE, 'assets/images/svgs/profile_screen/Order Procedures.svg', isInPatient: isInpatient), PatientProfileCardModel(TranslationBase.of(context).insurance, TranslationBase.of(context).service, - PATIENT_INSURANCE_APPROVALS_NEW, 'patient/vital_signs.png', + PATIENT_INSURANCE_APPROVALS_NEW, 'assets/images/svgs/profile_screen/vital signs.svg', isInPatient: isInpatient), PatientProfileCardModel(TranslationBase.of(context).patientSick, TranslationBase.of(context).leave, ADD_SICKLEAVE, - 'patient/patient_sick_leave.png', + 'assets/images/svgs/profile_screen/patient sick leave.svg', isInPatient: isInpatient), if (patient.appointmentNo != null && patient.appointmentNo != 0) PatientProfileCardModel(TranslationBase.of(context).patient, TranslationBase.of(context).ucaf, - PATIENT_UCAF_REQUEST, 'patient/ucaf.png', + PATIENT_UCAF_REQUEST, 'assets/images/svgs/profile_screen/UCAF.svg', isInPatient: isInpatient, isDisable: patient.patientStatusType != 43 ? true : false), if (patient.appointmentNo != null && patient.appointmentNo != 0) PatientProfileCardModel(TranslationBase.of(context).referral, TranslationBase.of(context).patient, - REFER_PATIENT_TO_DOCTOR, 'patient/refer_patient.png', + REFER_PATIENT_TO_DOCTOR, 'assets/images/svgs/profile_screen/refer patient.svg', isInPatient: isInpatient, isDisable: patient.patientStatusType != 43 ? true : false), if (patient.appointmentNo != null && patient.appointmentNo != 0) PatientProfileCardModel(TranslationBase.of(context).admission, TranslationBase.of(context).request, - PATIENT_ADMISSION_REQUEST, 'patient/admission_req.png', + PATIENT_ADMISSION_REQUEST, 'assets/images/svgs/profile_screen/admission req.svg', isInPatient: isInpatient, isDisable: patient.patientStatusType != 43 ? true : false), ]; - return Column( - children: [ - Padding( - padding: const EdgeInsets.symmetric(vertical: 15.0, horizontal: 15), - child: StaggeredGridView.countBuilder( - shrinkWrap: true, - physics: NeverScrollableScrollPhysics(), - crossAxisSpacing: 10, - mainAxisSpacing: 10, - crossAxisCount: 3, - itemCount: cardsList.length, - staggeredTileBuilder: (int index) => StaggeredTile.fit(1), - itemBuilder: (BuildContext context, int index) => PatientProfileButton( - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - from: from, - to: to, - nameLine1: cardsList[index].nameLine1, - nameLine2: cardsList[index].nameLine2, - route: cardsList[index].route, - icon: cardsList[index].icon, - isInPatient: cardsList[index].isInPatient, - isDischargedPatient: cardsList[index].isDischargedPatient, - isDisable: cardsList[index].isDisable, - onTap: cardsList[index].onTap, - isLoading: cardsList[index].isLoading, - ), - ), + + return Padding( + padding: const EdgeInsets.symmetric(vertical: 15.0, horizontal: 15), + child: GridView( + shrinkWrap: true, + + physics: BouncingScrollPhysics(), + // if you want IOS bouncing effect, otherwise remove this line + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + crossAxisSpacing: 10, + mainAxisSpacing: 8, + crossAxisCount: 3, ), - ], + //change the number as you want + children: cardsList.map((item) { + return PatientProfileButton( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + from: from, + to: to, + nameLine1: item.nameLine1, + nameLine2: item.nameLine2, + route: item.route, + icon: item.icon, + isInPatient: item.isInPatient, + isDischargedPatient: item.isDischargedPatient, + isDisable: item.isDisable, + onTap: item.onTap, + isLoading: item.isLoading, + ); + }).toList(), + ), ); } } diff --git a/lib/screens/patients/profile/radiology/radiology_home_page.dart b/lib/screens/patients/profile/radiology/radiology_home_page.dart index 46b5ad28..958301fd 100644 --- a/lib/screens/patients/profile/radiology/radiology_home_page.dart +++ b/lib/screens/patients/profile/radiology/radiology_home_page.dart @@ -12,6 +12,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/doctor_card.dart'; import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; +import 'package:doctor_app_flutter/widgets/transitions/slide_up_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; @@ -44,8 +45,7 @@ class _RadiologyHomePageState extends State { Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); return BaseView( - onModelReady: (model) => model.getPatientRadOrders(patient, - patientType: patientType, isInPatient: false), + onModelReady: (model) => model.getPatientRadOrders(patient, patientType: patientType, isInPatient: false), builder: (_, model, widget) => AppScaffold( isShowAppBar: true, backgroundColor: Colors.grey[100], @@ -63,8 +63,7 @@ class _RadiologyHomePageState extends State { SizedBox( height: 12, ), - if (model.radiologyList.isNotEmpty && - patient.patientStatusType != 43) + if (model.radiologyList.isNotEmpty && patient.patientStatusType != 43) Padding( padding: const EdgeInsets.all(8.0), child: Column( @@ -84,8 +83,7 @@ class _RadiologyHomePageState extends State { ], ), ), - if (patient.patientStatusType != null && - patient.patientStatusType == 43) + if (patient.patientStatusType != null && patient.patientStatusType == 43) Padding( padding: const EdgeInsets.all(8.0), child: Column( @@ -105,20 +103,19 @@ class _RadiologyHomePageState extends State { ], ), ), - if ((patient.patientStatusType != null && - patient.patientStatusType == 43) || + if ((patient.patientStatusType != null && patient.patientStatusType == 43) || (isFromLiveCare && patient.appointmentNo != null)) AddNewOrder( onTap: () { Navigator.push( context, - MaterialPageRoute( - builder: (context) => BaseAddProcedureTabPage( - patient: patient, - model: model, - procedureType: ProcedureType.RADIOLOGY, - ), settings: RouteSettings(name: 'AddProcedureTabPage') - ), + SlideUpPageRoute( + widget: BaseAddProcedureTabPage( + patient: patient, + model: model, + procedureType: ProcedureType.RADIOLOGY, + ), + settingRoute: 'AddProcedureTabPage'), ); }, label: TranslationBase.of(context).applyForRadiologyOrder, @@ -143,43 +140,26 @@ class _RadiologyHomePageState extends State { height: 160, decoration: BoxDecoration( //Colors.red[900] Color(0xff404545) - color: model.radiologyList[index] - .isLiveCareAppodynamicment + color: model.radiologyList[index].isLiveCareAppodynamicment ? Colors.red[900] : !model.radiologyList[index].isInOutPatient ? Colors.black : Color(0xffa9a089), 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)), + 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( - model.radiologyList[index] - .isLiveCareAppodynamicment - ? TranslationBase.of(context) - .liveCare - .toUpperCase() - : !model.radiologyList[index] - .isInOutPatient - ? TranslationBase.of(context) - .inPatientLabel - .toUpperCase() - : TranslationBase.of(context) - .outpatient - .toUpperCase(), + model.radiologyList[index].isLiveCareAppodynamicment + ? TranslationBase.of(context).liveCare.toUpperCase() + : !model.radiologyList[index].isInOutPatient + ? TranslationBase.of(context).inPatientLabel.toUpperCase() + : TranslationBase.of(context).outpatient.toUpperCase(), style: TextStyle(color: Colors.white), ), )), @@ -187,29 +167,21 @@ class _RadiologyHomePageState extends State { Expanded( child: DoctorCard( isNoMargin: true, - doctorName: - model.radiologyList[index].doctorName, - profileUrl: - model.radiologyList[index].doctorImageURL, - invoiceNO: - '${model.radiologyList[index].invoiceNo}', - branch: - '${model.radiologyList[index].projectName}', - clinic: model - .radiologyList[index].clinicDescription, + doctorName: model.radiologyList[index].doctorName, + profileUrl: model.radiologyList[index].doctorImageURL, + invoiceNO: '${model.radiologyList[index].invoiceNo}', + branch: '${model.radiologyList[index].projectName}', + clinic: model.radiologyList[index].clinicDescription, appointmentDate: - model.radiologyList[index].orderDate ?? - model.radiologyList[index].reportDate, + model.radiologyList[index].orderDate ?? model.radiologyList[index].reportDate, onTap: () { Navigator.push( context, FadePage( page: RadiologyDetailsPage( - finalRadiology: - model.radiologyList[index], - patient: patient, - isInpatient:isInpatient - ), + finalRadiology: model.radiologyList[index], + patient: patient, + isInpatient: isInpatient), ), ); }, @@ -218,8 +190,7 @@ class _RadiologyHomePageState extends State { ], ), )), - if (model.radiologyList.isEmpty && - patient.patientStatusType != 43) + if (model.radiologyList.isEmpty && patient.patientStatusType != 43) Center( child: Column( crossAxisAlignment: CrossAxisAlignment.center, diff --git a/lib/screens/patients/profile/referral/AddReplayOnReferralPatient.dart b/lib/screens/patients/profile/referral/AddReplayOnReferralPatient.dart index 251a91fa..15d176d0 100644 --- a/lib/screens/patients/profile/referral/AddReplayOnReferralPatient.dart +++ b/lib/screens/patients/profile/referral/AddReplayOnReferralPatient.dart @@ -198,7 +198,7 @@ class _AddReplayOnReferralPatientState extends State }, title: TranslationBase.of(context).noteConfirm, fontColor: Colors.white, - color: Colors.green[600], + color: AppGlobal.appGreenColor, ), ), ], diff --git a/lib/screens/patients/profile/referral/ReplySummeryOnReferralPatient.dart b/lib/screens/patients/profile/referral/ReplySummeryOnReferralPatient.dart index 2a48e079..72bd6825 100644 --- a/lib/screens/patients/profile/referral/ReplySummeryOnReferralPatient.dart +++ b/lib/screens/patients/profile/referral/ReplySummeryOnReferralPatient.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/model/referral/MyReferralPatientModel.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart'; @@ -105,7 +106,7 @@ class _ReplySummeryOnReferralPatientState onPressed: () {}, title: TranslationBase.of(context).noteConfirm, fontColor: Colors.white, - color: Colors.green[600], + color: AppGlobal.appGreenColor, ), ), ], diff --git a/lib/screens/patients/profile/referral/my-referral-detail-screen.dart b/lib/screens/patients/profile/referral/my-referral-detail-screen.dart index 8bf89d87..bd349f0f 100644 --- a/lib/screens/patients/profile/referral/my-referral-detail-screen.dart +++ b/lib/screens/patients/profile/referral/my-referral-detail-screen.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/model/referral/MyReferralPatientModel.dart'; @@ -18,7 +19,8 @@ import 'package:flutter/material.dart'; class MyReferralDetailScreen extends StatelessWidget { final MyReferralPatientModel referralPatient; - const MyReferralDetailScreen({Key key, this.referralPatient}) : super(key: key); + const MyReferralDetailScreen({Key key, this.referralPatient}) + : super(key: key); @override Widget build(BuildContext context) { @@ -53,7 +55,9 @@ class MyReferralDetailScreen extends StatelessWidget { ), Expanded( child: AppText( - (Helpers.capitalize(referralPatient.firstName + " " + referralPatient.lastName)), + (Helpers.capitalize(referralPatient.firstName + + " " + + referralPatient.lastName)), fontSize: SizeConfig.textMultiplier * 2.5, fontWeight: FontWeight.bold, fontFamily: 'Poppins', @@ -93,23 +97,31 @@ class MyReferralDetailScreen extends StatelessWidget { child: Column( children: [ Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, children: [ AppText( referralPatient.referralStatus != null - ? model.getReferralStatusNameByCode(referralPatient.referralStatus, context) + ? model.getReferralStatusNameByCode( + referralPatient.referralStatus, + context) : "", fontFamily: 'Poppins', fontSize: 1.9 * SizeConfig.textMultiplier, fontWeight: FontWeight.w700, color: referralPatient.referralStatus == 1 ? Color(0xffc4aa54) - : referralPatient.referralStatus == 46 || referralPatient.referralStatus == 2 - ? Colors.green[700] + : referralPatient.referralStatus == + 46 || + referralPatient + .referralStatus == + 2 + ? AppGlobal.appGreenColor : Colors.red[700], ), AppText( - AppDateUtils.getDayMonthYearDateFormatted(referralPatient.referralDate), + AppDateUtils.getDayMonthYearDateFormatted( + referralPatient.referralDate), fontFamily: 'Poppins', fontWeight: FontWeight.w600, fontSize: 2.0 * SizeConfig.textMultiplier, @@ -118,29 +130,35 @@ class MyReferralDetailScreen extends StatelessWidget { ], ), Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, children: [ Row( - mainAxisAlignment: MainAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment.start, children: [ AppText( - TranslationBase.of(context).fileNumber, + TranslationBase.of(context) + .fileNumber, fontFamily: 'Poppins', fontWeight: FontWeight.w600, - fontSize: 1.7 * SizeConfig.textMultiplier, + fontSize: + 1.7 * SizeConfig.textMultiplier, color: Color(0XFF575757), ), AppText( "${referralPatient.patientID}", fontFamily: 'Poppins', fontWeight: FontWeight.w700, - fontSize: 1.8 * SizeConfig.textMultiplier, + fontSize: + 1.8 * SizeConfig.textMultiplier, color: Color(0XFF2E303A), ), ], ), AppText( - AppDateUtils.getTimeHHMMA(referralPatient.referralDate), + AppDateUtils.getTimeHHMMA( + referralPatient.referralDate), fontFamily: 'Poppins', fontWeight: FontWeight.w600, fontSize: 1.8 * SizeConfig.textMultiplier, @@ -149,50 +167,70 @@ class MyReferralDetailScreen extends StatelessWidget { ], ), Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.center, children: [ Expanded( child: Column( children: [ Row( - mainAxisAlignment: MainAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment.start, children: [ AppText( - TranslationBase.of(context).referredFrom, + TranslationBase.of(context) + .referredFrom, fontFamily: 'Poppins', fontWeight: FontWeight.w600, - fontSize: 1.7 * SizeConfig.textMultiplier, + fontSize: 1.7 * + SizeConfig.textMultiplier, color: Color(0XFF575757), ), AppText( - referralPatient.targetProjectId == referralPatient.sourceProjectId - ? TranslationBase.of(context).sameBranch - : TranslationBase.of(context).otherBranch, + referralPatient + .targetProjectId == + referralPatient + .sourceProjectId + ? TranslationBase.of( + context) + .sameBranch + : TranslationBase.of( + context) + .otherBranch, fontFamily: 'Poppins', fontWeight: FontWeight.w700, - fontSize: 1.8 * SizeConfig.textMultiplier, + fontSize: 1.8 * + SizeConfig.textMultiplier, color: Color(0XFF2E303A), ), ], ), Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ AppText( - TranslationBase.of(context).remarks + " : ", + TranslationBase.of(context) + .remarks + + " : ", fontFamily: 'Poppins', fontWeight: FontWeight.w600, - fontSize: 1.7 * SizeConfig.textMultiplier, + fontSize: 1.7 * + SizeConfig.textMultiplier, color: Color(0XFF575757), ), Expanded( child: AppText( - referralPatient.referringDoctorRemarks ?? '', + referralPatient + .referringDoctorRemarks ?? + '', fontFamily: 'Poppins', fontWeight: FontWeight.w700, - fontSize: 1.8 * SizeConfig.textMultiplier, + fontSize: 1.8 * + SizeConfig.textMultiplier, color: Color(0XFF2E303A), ), ), @@ -204,22 +242,29 @@ class MyReferralDetailScreen extends StatelessWidget { Row( children: [ AppText( - referralPatient.nationalityName != null + referralPatient.nationalityName != + null ? referralPatient.nationalityName : "", fontWeight: FontWeight.bold, color: Color(0xFF2E303A), - fontSize: 1.4 * SizeConfig.textMultiplier, + fontSize: + 1.4 * SizeConfig.textMultiplier, ), - referralPatient.nationalityFlagURL != null + referralPatient.nationalityFlagURL != + null ? ClipRRect( - borderRadius: BorderRadius.circular(20.0), + borderRadius: + BorderRadius.circular(20.0), child: Image.network( - referralPatient.nationalityFlagURL, + referralPatient + .nationalityFlagURL, height: 25, width: 30, - errorBuilder: - (BuildContext context, Object exception, StackTrace stackTrace) { + errorBuilder: (BuildContext + context, + Object exception, + StackTrace stackTrace) { return Text('No Image'); }, )) @@ -232,7 +277,8 @@ class MyReferralDetailScreen extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( - margin: EdgeInsets.only(left: 10, right: 0), + margin: + EdgeInsets.only(left: 10, right: 0), child: Image.asset( 'assets/images/patient/ic_ref_arrow_up.png', height: 50, @@ -240,14 +286,20 @@ class MyReferralDetailScreen extends StatelessWidget { ), ), Container( - margin: EdgeInsets.only(left: 0, top: 25, right: 0, bottom: 0), - padding: EdgeInsets.only(left: 4.0, right: 4.0), + margin: EdgeInsets.only( + left: 0, + top: 25, + right: 0, + bottom: 0), + padding: EdgeInsets.only( + left: 4.0, right: 4.0), child: Container( width: 40, height: 40, child: CircleAvatar( radius: 25.0, - backgroundImage: NetworkImage(referralPatient.doctorImageURL), + backgroundImage: NetworkImage( + referralPatient.doctorImageURL), backgroundColor: Colors.transparent, ), ), @@ -255,14 +307,19 @@ class MyReferralDetailScreen extends StatelessWidget { Expanded( flex: 4, child: Container( - margin: EdgeInsets.only(left: 10, top: 25, right: 10, bottom: 0), + margin: EdgeInsets.only( + left: 10, + top: 25, + right: 10, + bottom: 0), child: Column( children: [ AppText( referralPatient.doctorName, fontFamily: 'Poppins', fontWeight: FontWeight.w700, - fontSize: 1.7 * SizeConfig.textMultiplier, + fontSize: 1.7 * + SizeConfig.textMultiplier, color: Color(0XFF2E303A), ), ], @@ -293,7 +350,8 @@ class MyReferralDetailScreen extends StatelessWidget { padding: const EdgeInsets.symmetric(horizontal: 16), child: SizedBox( child: ProfileMedicalInfoWidgetSearch( - patient: model.getPatientFromReferralO(referralPatient), + patient: model + .getPatientFromReferralO(referralPatient), patientType: "7", isInpatient: false, from: null, @@ -325,7 +383,9 @@ class MyReferralDetailScreen extends StatelessWidget { if (model.state == ViewState.ErrorLocal) { DrAppToastMsg.showErrorToast(model.error); } else { - DrAppToastMsg.showSuccesToast(TranslationBase.of(context).referralSuccessMsgAccept); + DrAppToastMsg.showSuccesToast( + TranslationBase.of(context) + .referralSuccessMsgAccept); model.getMyReferralOutPatientService(); Navigator.pop(context); Navigator.pop(context); @@ -339,18 +399,21 @@ class MyReferralDetailScreen extends StatelessWidget { Expanded( child: AppButton( title: TranslationBase.of(context).reject, - color: Color(0xFFB9382C), + color: AppGlobal.appRedColor, fontColor: Colors.white, fontSize: 1.6, hPadding: 8, vPadding: 12, disabled: model.state == ViewState.Busy, onPressed: () async { - await model.responseReferral(referralPatient, false); + await model.responseReferral( + referralPatient, false); if (model.state == ViewState.ErrorLocal) { DrAppToastMsg.showErrorToast(model.error); } else { - DrAppToastMsg.showSuccesToast(TranslationBase.of(context).referralSuccessMsgReject); + DrAppToastMsg.showSuccesToast( + TranslationBase.of(context) + .referralSuccessMsgReject); model.getMyReferralOutPatientService(); Navigator.pop(context); Navigator.pop(context); diff --git a/lib/screens/patients/profile/referral/my-referral-inpatient-screen.dart b/lib/screens/patients/profile/referral/my-referral-inpatient-screen.dart index 29697dc1..b2242ff7 100644 --- a/lib/screens/patients/profile/referral/my-referral-inpatient-screen.dart +++ b/lib/screens/patients/profile/referral/my-referral-inpatient-screen.dart @@ -37,19 +37,21 @@ class _MyReferralInPatientScreenState extends State { children: [ Container( margin: EdgeInsets.only(top: 70), - child: PatientTypeRadioWidget( - (patientType) async { - setState(() { - this.patientType = patientType; - }); - GifLoaderDialogUtils.showMyDialog(context); - if (patientType == PatientType.IN_PATIENT) { - await model.getMyReferralPatientService(localBusy: true); - } else { - await model.getMyReferralOutPatientService(localBusy: true); - } - GifLoaderDialogUtils.hideDialog(context); - }, + child: Container( + child: PatientTypeRadioWidget( + (patientType) async { + setState(() { + this.patientType = patientType; + }); + GifLoaderDialogUtils.showMyDialog(context); + if (patientType == PatientType.IN_PATIENT) { + await model.getMyReferralPatientService(localBusy: true); + } else { + await model.getMyReferralOutPatientService(localBusy: true); + } + GifLoaderDialogUtils.hideDialog(context); + }, + ), ), ), model.myReferralPatients.isEmpty @@ -74,91 +76,93 @@ class _MyReferralInPatientScreenState extends State { : Expanded( child: SingleChildScrollView( child: Container( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - ListView.builder( - itemCount: model.myReferralPatients.length, - scrollDirection: Axis.vertical, - physics: ScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, index) { - return InkWell( - onTap: () { - if (patientType == - PatientType.OUT_PATIENT) { - Navigator.push( - context, - FadePage( - page: MyReferralDetailScreen( - referralPatient: model - .myReferralPatients[index]), - ), - ); - } else { - Navigator.push( - context, - FadePage( - page: ReferralPatientDetailScreen( - model.myReferralPatients[index], - model), - ), - ); - } - }, - child: PatientReferralItemWidget( - referralStatus: - model.getReferralStatusNameByCode( - model.myReferralPatients[index] - .referralStatus, - context), - referralStatusCode: model - .myReferralPatients[index] - .referralStatus, - patientName: model - .myReferralPatients[index] - .patientName, - patientGender: model - .myReferralPatients[index].gender, - referredDate: AppDateUtils - .getDayMonthYearDateFormatted(model - .myReferralPatients[index] - .referralDate), - referredTime: AppDateUtils.getTimeHHMMA( - model.myReferralPatients[index] - .referralDate), - patientID: - "${model.myReferralPatients[index].patientID}", - isSameBranch: false, - isReferral: true, - isReferralClinic: true, - referralClinic: - "${model.myReferralPatients[index].referringClinicDescription}", - remark: model.myReferralPatients[index] - .referringDoctorRemarks, - nationality: model - .myReferralPatients[index] - .nationalityName, - nationalityFlag: model - .myReferralPatients[index] - .nationalityFlagURL, - doctorAvatar: model - .myReferralPatients[index] - .doctorImageURL, - referralDoctorName: model - .myReferralPatients[index] - .referringDoctorName, - clinicDescription: model - .myReferralPatients[index] - .referringClinicDescription, - infoIcon: Icon( - FontAwesomeIcons.arrowRight, - size: 25, - color: Colors.black), - ), - ); - }) - ], + child: Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + ListView.builder( + itemCount: model.myReferralPatients.length, + scrollDirection: Axis.vertical, + physics: ScrollPhysics(), + shrinkWrap: true, + itemBuilder: (context, index) { + return InkWell( + onTap: () { + if (patientType == + PatientType.OUT_PATIENT) { + Navigator.push( + context, + FadePage( + page: MyReferralDetailScreen( + referralPatient: model + .myReferralPatients[index]), + ), + ); + } else { + Navigator.push( + context, + FadePage( + page: ReferralPatientDetailScreen( + model.myReferralPatients[index], + model), + ), + ); + } + }, + child: PatientReferralItemWidget( + referralStatus: + model.getReferralStatusNameByCode( + model.myReferralPatients[index] + .referralStatus, + context), + referralStatusCode: model + .myReferralPatients[index] + .referralStatus, + patientName: model + .myReferralPatients[index] + .patientName, + patientGender: model + .myReferralPatients[index].gender, + referredDate: AppDateUtils + .getDayMonthYearDateFormatted(model + .myReferralPatients[index] + .referralDate), + referredTime: AppDateUtils.getTimeHHMMA( + model.myReferralPatients[index] + .referralDate), + patientID: + "${model.myReferralPatients[index].patientID}", + isSameBranch: false, + isReferral: true, + isReferralClinic: true, + referralClinic: + "${model.myReferralPatients[index].referringClinicDescription}", + remark: model.myReferralPatients[index] + .referringDoctorRemarks, + nationality: model + .myReferralPatients[index] + .nationalityName, + nationalityFlag: model + .myReferralPatients[index] + .nationalityFlagURL, + doctorAvatar: model + .myReferralPatients[index] + .doctorImageURL, + referralDoctorName: model + .myReferralPatients[index] + .referringDoctorName, + clinicDescription: model + .myReferralPatients[index] + .referringClinicDescription, + infoIcon: Icon( + FontAwesomeIcons.arrowRight, + size: 25, + color: Colors.black), + ), + ); + }) + ], + ), ), ), ), diff --git a/lib/screens/patients/profile/referral/my-referral-patient-screen.dart b/lib/screens/patients/profile/referral/my-referral-patient-screen.dart index fe6fd2db..2eefeb43 100644 --- a/lib/screens/patients/profile/referral/my-referral-patient-screen.dart +++ b/lib/screens/patients/profile/referral/my-referral-patient-screen.dart @@ -12,7 +12,6 @@ import '../../../../routes.dart'; class MyReferralPatientScreen extends StatelessWidget { @override Widget build(BuildContext context) { - return BaseView( onModelReady: (model) => model.getPendingReferralPatients(), builder: (_, model, w) => AppScaffold( diff --git a/lib/screens/patients/profile/referral/patient_referral_screen.dart b/lib/screens/patients/profile/referral/patient_referral_screen.dart index de1d5958..59e58198 100644 --- a/lib/screens/patients/profile/referral/patient_referral_screen.dart +++ b/lib/screens/patients/profile/referral/patient_referral_screen.dart @@ -1,13 +1,17 @@ import 'dart:ui'; import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_header.dart'; import 'package:doctor_app_flutter/screens/patients/profile/referral/referred-patient-screen.dart'; +import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/text_fields/text_fields_utils.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; import '../../ReferralDischargedPatientPage.dart'; import 'my-referral-inpatient-screen.dart'; @@ -17,10 +21,10 @@ class PatientReferralScreen extends StatefulWidget { _PatientReferralScreen createState() => _PatientReferralScreen(); } -class _PatientReferralScreen extends State with SingleTickerProviderStateMixin { - +class _PatientReferralScreen extends State + with SingleTickerProviderStateMixin { TabController _tabController; - int index=0; + int index = 0; @override void initState() { @@ -41,27 +45,26 @@ class _PatientReferralScreen extends State with SingleTic _tabController.dispose(); } - @override Widget build(BuildContext context) { + ProjectViewModel projectsProvider = Provider.of(context); + return AppScaffold( isShowAppBar: true, + appBar: PatientSearchHeader( + title: TranslationBase.of(context).patientsreferral, + ), appBarTitle: TranslationBase.of(context).patientsreferral, body: Scaffold( extendBodyBehindAppBar: true, // backgroundColor: Colors.white, appBar: PreferredSize( - preferredSize: Size.fromHeight(MediaQuery.of(context).size.height * 0.070), + preferredSize: + Size.fromHeight(MediaQuery.of(context).size.height * 0.070), child: Center( child: Container( - height: MediaQuery.of(context).size.height * 0.070, - decoration: BoxDecoration( - border: Border( - bottom: BorderSide( - color: Theme.of(context).dividerColor, - width: 1), //width: 0.7 - ), - color: Colors.white), + height: Helpers.getTabHeight(context), + color: Helpers.getBgTabColor(), child: Center( child: TabBar( isScrollable: false, @@ -69,93 +72,36 @@ class _PatientReferralScreen extends State with SingleTic indicatorColor: Colors.transparent, indicatorWeight: 1.0, indicatorSize: TabBarIndicatorSize.tab, - labelColor: Theme.of(context).primaryColor, - labelPadding: EdgeInsets.only(top: 0, left:0, right: 0,bottom: 0), + labelPadding: + EdgeInsets.only(top: 0, left: 0, right: 0, bottom: 0), unselectedLabelColor: Colors.grey[800], tabs: [ Container( - width: MediaQuery.of(context).size.width * 0.33, - height: MediaQuery.of(context).size.height * 0.070, - decoration: TextFieldsUtils.containerBorderDecoration( - Color(0Xffffffff), Color(0xFFCCCCCC), - borderRadius: 4, borderWidth: 0), + decoration: Helpers.getBoxTabsBoxDecoration( + isActive: index == 0, isFirst: true, projectViewModel:projectsProvider ), child: Center( - child: Container( - height: MediaQuery.of(context).size.height * 0.070, - decoration: TextFieldsUtils.containerBorderDecoration( - index == 0 - ? Color(0xFFD02127 ) - : Color(0xFFEAEAEA), - index == 0 ? Color(0xFFD02127) : Color(0xFFEAEAEA), - borderRadius: 4, - borderWidth: 0), - child: Center( - child: AppText( - TranslationBase.of(context).myReferredPatient, - fontSize: SizeConfig.textMultiplier * 1.8, - color: index == 0 ? Colors.white : Color(0xFF2B353E), - fontWeight: FontWeight.w700, - ), - ), - ), + child: Helpers.getTabText(title:TranslationBase.of(context).myReferredPatient, isActive:index == 0 ) ), ), - Container( - width: MediaQuery.of(context).size.width * 0.34, - height: MediaQuery.of(context).size.height * 0.070, - decoration: TextFieldsUtils.containerBorderDecoration( - Color(0Xffffffff), Color(0xFFCCCCCC), - borderRadius: 4, borderWidth: 0), - child: Center( - child: Container( - height: MediaQuery.of(context).size.height * 0.070, - decoration: TextFieldsUtils.containerBorderDecoration( - index == 1 - ? Color(0xFFD02127 ) - : Color(0xFFEAEAEA), - index == 1 ? Color(0xFFD02127) : Color(0xFFEAEAEA), - borderRadius: 4, - borderWidth: 0), - child: Center( - child: AppText( - TranslationBase.of(context).referral, - fontSize: SizeConfig.textMultiplier * 1.8, - color: index == 1 ? Colors.white : Color(0xFF2B353E), - fontWeight: FontWeight.w700, - ), - ), + Center( + child: Container( + decoration:Helpers.getBoxTabsBoxDecoration( + isActive: index == 1, isMiddle: true, projectViewModel:projectsProvider ), + child: Center( + child:Helpers.getTabText(title:TranslationBase.of(context).referral, isActive:index == 1 ) ), ), ), - Container( - width: MediaQuery.of(context).size.width * 0.33, - height: MediaQuery.of(context).size.height * 0.070, - decoration: TextFieldsUtils.containerBorderDecoration( - Color(0Xffffffff), Color(0xFFCCCCCC), - borderRadius: 4, borderWidth: 0), - child: Center( - child: Container( - height: MediaQuery.of(context).size.height * 0.070, - decoration: TextFieldsUtils.containerBorderDecoration( - index == 2 - ? Color(0xFFD02127 ) - : Color(0xFFEAEAEA), - index == 2 ? Color(0xFFD02127) : Color(0xFFEAEAEA), - borderRadius: 4, - borderWidth: 0), - child: Center( - child: AppText( - TranslationBase.of(context).discharged, - fontSize: SizeConfig.textMultiplier * 1.8, - color: index == 2 ? Colors.white : Color(0xFF2B353E), - fontWeight: FontWeight.w700, - ), - ), + Center( + child: Container( + decoration:Helpers.getBoxTabsBoxDecoration( + isActive: index == 2, isLast: true, projectViewModel:projectsProvider ), + child: Center( + child: Helpers.getTabText(title:TranslationBase.of(context).discharged, isActive:index == 2 ), ), ), ), - ], ), ), diff --git a/lib/screens/patients/profile/referral/refer-patient-screen-in-patient.dart b/lib/screens/patients/profile/referral/refer-patient-screen-in-patient.dart index 66fd22fd..41686ead 100644 --- a/lib/screens/patients/profile/referral/refer-patient-screen-in-patient.dart +++ b/lib/screens/patients/profile/referral/refer-patient-screen-in-patient.dart @@ -25,10 +25,12 @@ import 'package:speech_to_text/speech_to_text.dart' as stt; class PatientMakeInPatientReferralScreen extends StatefulWidget { @override - _PatientMakeInPatientReferralScreenState createState() => _PatientMakeInPatientReferralScreenState(); + _PatientMakeInPatientReferralScreenState createState() => + _PatientMakeInPatientReferralScreenState(); } -class _PatientMakeInPatientReferralScreenState extends State { +class _PatientMakeInPatientReferralScreenState + extends State { PatiantInformtion patient; List referToList; dynamic _referTo; @@ -66,7 +68,8 @@ class _PatientMakeInPatientReferralScreenState extends State initSpeechState() async { - bool hasSpeech = await speech.initialize(onError: errorListener, onStatus: statusListener); + bool hasSpeech = await speech.initialize( + onError: errorListener, onStatus: statusListener); print(hasSpeech); if (!mounted) return; } @@ -123,8 +127,14 @@ class _PatientMakeInPatientReferralScreenState extends State GifLoaderDialogUtils.hideDialog(context)); - if (model.state == ViewState.ErrorLocal) { - DrAppToastMsg.showErrorToast(model.error); + .getClinics(_selectedBranch[ + 'facilityId']) + .then((_) => + GifLoaderDialogUtils + .hideDialog(context)); + if (model.state == + ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast( + model.error); } } else { _selectedBranch = null; @@ -226,7 +245,9 @@ class _PatientMakeInPatientReferralScreenState extends State GifLoaderDialogUtils.hideDialog(context)); - if (model.state == ViewState.ErrorLocal) { - DrAppToastMsg.showErrorToast(model.error); + .getClinics( + _selectedBranch['facilityId']) + .then((_) => GifLoaderDialogUtils + .hideDialog(context)); + if (model.state == + ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast( + model.error); } }); }, @@ -271,7 +297,9 @@ class _PatientMakeInPatientReferralScreenState extends State GifLoaderDialogUtils.hideDialog(context)); - if (model.state == ViewState.ErrorLocal) { - DrAppToastMsg.showErrorToast(model.error); + patient, + _selectedClinic['ClinicID'], + _selectedBranch['facilityId']) + .then((_) => GifLoaderDialogUtils + .hideDialog(context)); + if (model.state == + ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast( + model.error); } }); }, @@ -317,41 +353,49 @@ class _PatientMakeInPatientReferralScreenState extends State 0 - ? () { - ListSelectDialog dialog = ListSelectDialog( - list: model.doctorsList, - attributeName: 'Name', - attributeValueId: 'DoctorID', - usingSearch: true, - hintSearchText: TranslationBase.of(context).doctorSearch, - okText: TranslationBase.of(context).ok, - okFunction: (selectedValue) { - setState(() { - _selectedDoctor = selectedValue; - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: (BuildContext context) { - return dialog; - }, - ); - } - : () { - if (_selectedClinic == null) { - DrAppToastMsg.showErrorToast("You need to select a clinic first"); - } else if (model.doctorsList == null || model.doctorsList.length == 0) { - DrAppToastMsg.showErrorToast("There is no doctors for this clinic"); - } + onClick: _selectedClinic != null && + model.doctorsList != null && + model.doctorsList.length > 0 + ? () { + ListSelectDialog dialog = ListSelectDialog( + list: model.doctorsList, + attributeName: 'Name', + attributeValueId: 'DoctorID', + usingSearch: true, + hintSearchText: + TranslationBase.of(context) + .doctorSearch, + okText: TranslationBase.of(context).ok, + okFunction: (selectedValue) { + setState(() { + _selectedDoctor = selectedValue; + }); }, + ); + showDialog( + barrierDismissible: false, + context: context, + builder: (BuildContext context) { + return dialog; + }, + ); + } + : () { + if (_selectedClinic == null) { + DrAppToastMsg.showErrorToast( + "You need to select a clinic first"); + } else if (model.doctorsList == null || + model.doctorsList.length == 0) { + DrAppToastMsg.showErrorToast( + "There is no doctors for this clinic"); + } + }, ), SizedBox( height: 10, @@ -379,8 +423,11 @@ class _PatientMakeInPatientReferralScreenState extends State {onVoiceText()}); + initSpeechState() + .then((value) => {onVoiceText()}); }, ), ), @@ -454,15 +504,14 @@ class _PatientMakeInPatientReferralScreenState extends State _PatientMakeReferralScreenState(); + _PatientMakeReferralScreenState createState() => + _PatientMakeReferralScreenState(); } class _PatientMakeReferralScreenState extends State { @@ -56,8 +57,14 @@ class _PatientMakeReferralScreenState extends State { String arrivalType = routeArgs['arrivalType']; referToList = List(); - dynamic sameBranch = {"id": 1, "name": TranslationBase.of(context).sameBranch}; - dynamic otherBranch = {"id": 2, "name": TranslationBase.of(context).otherBranch}; + dynamic sameBranch = { + "id": 1, + "name": TranslationBase.of(context).sameBranch + }; + dynamic otherBranch = { + "id": 2, + "name": TranslationBase.of(context).otherBranch + }; referToList.add(sameBranch); referToList.add(otherBranch); @@ -103,25 +110,57 @@ class _PatientMakeReferralScreenState extends State { model.patientReferral.length == 0 ? referralForm(model, screenSize) : PatientReferralItemWidget( - referralStatus: model.patientReferral[model.patientReferral.length - 1].referralStatus, - patientName: model.patientReferral[model.patientReferral.length - 1].patientName, - patientGender: - model.patientReferral[model.patientReferral.length - 1].patientDetails.gender, - referredDate: - model.patientReferral[model.patientReferral.length - 1].referredOn.split(" ")[0], - referredTime: - model.patientReferral[model.patientReferral.length - 1].referredOn.split(" ")[1], - patientID: "${model.patientReferral[model.patientReferral.length - 1].patientID}", - isSameBranch: - model.patientReferral[model.patientReferral.length - 1].isReferralDoctorSameBranch, + referralStatus: model + .patientReferral[ + model.patientReferral.length - 1] + .referralStatus, + patientName: model + .patientReferral[ + model.patientReferral.length - 1] + .patientName, + patientGender: model + .patientReferral[ + model.patientReferral.length - 1] + .patientDetails + .gender, + referredDate: model + .patientReferral[ + model.patientReferral.length - 1] + .referredOn + .split(" ")[0], + referredTime: model + .patientReferral[ + model.patientReferral.length - 1] + .referredOn + .split(" ")[1], + patientID: + "${model.patientReferral[model.patientReferral.length - 1].patientID}", + isSameBranch: model + .patientReferral[ + model.patientReferral.length - 1] + .isReferralDoctorSameBranch, isReferral: true, - remark: model.patientReferral[model.patientReferral.length - 1].remarksFromSource, - nationality: - model.patientReferral[model.patientReferral.length - 1].patientDetails.nationalityName, - nationalityFlag: model.patientReferral[model.patientReferral.length - 1].nationalityFlagUrl, - doctorAvatar: model.patientReferral[model.patientReferral.length - 1].doctorImageUrl, - referralDoctorName: - model.patientReferral[model.patientReferral.length - 1].referredByDoctorInfo, + remark: model + .patientReferral[ + model.patientReferral.length - 1] + .remarksFromSource, + nationality: model + .patientReferral[ + model.patientReferral.length - 1] + .patientDetails + .nationalityName, + nationalityFlag: model + .patientReferral[ + model.patientReferral.length - 1] + .nationalityFlagUrl, + doctorAvatar: model + .patientReferral[ + model.patientReferral.length - 1] + .doctorImageUrl, + referralDoctorName: model + .patientReferral[ + model.patientReferral.length - 1] + .referredByDoctorInfo, clinicDescription: null, ), ], @@ -140,22 +179,26 @@ class _PatientMakeReferralScreenState extends State { eventAction: "Submit Refer", ); if (_referTo == null) { - branchError = TranslationBase.of(context).fieldRequired; + branchError = + TranslationBase.of(context).fieldRequired; } else { branchError = null; } if (_selectedBranch == null) { - hospitalError = TranslationBase.of(context).fieldRequired; + hospitalError = + TranslationBase.of(context).fieldRequired; } else { hospitalError = null; } if (_selectedClinic == null) { - clinicError = TranslationBase.of(context).fieldRequired; + clinicError = + TranslationBase.of(context).fieldRequired; } else { clinicError = null; } if (_selectedDoctor == null) { - doctorError = TranslationBase.of(context).fieldRequired; + doctorError = + TranslationBase.of(context).fieldRequired; } else { doctorError = null; } @@ -166,10 +209,16 @@ class _PatientMakeReferralScreenState extends State { _selectedDoctor == null || _remarksController.text == null) return; model - .makeReferral(patient, appointmentDate.toIso8601String(), _selectedBranch['facilityId'], - _selectedClinic['ClinicID'], _selectedDoctor['DoctorID'], _remarksController.text) + .makeReferral( + patient, + appointmentDate.toIso8601String(), + _selectedBranch['facilityId'], + _selectedClinic['ClinicID'], + _selectedDoctor['DoctorID'], + _remarksController.text) .then((_) { - DrAppToastMsg.showSuccesToast(TranslationBase.of(context).referralSuccessMsg); + DrAppToastMsg.showSuccesToast( + TranslationBase.of(context).referralSuccessMsg); Navigator.pop(context); }); }, @@ -215,7 +264,8 @@ class _PatientMakeReferralScreenState extends State { GifLoaderDialogUtils.showMyDialog(context); await model .getClinics(_selectedBranch['facilityId']) - .then((_) => GifLoaderDialogUtils.hideDialog(context)); + .then((_) => + GifLoaderDialogUtils.hideDialog(context)); if (model.state == ViewState.ErrorLocal) { DrAppToastMsg.showErrorToast(model.error); } @@ -242,42 +292,47 @@ class _PatientMakeReferralScreenState extends State { AppTextFieldCustom( height: screenSize.height * 0.075, hintText: TranslationBase.of(context).hospital, - dropDownText: _selectedBranch != null ? _selectedBranch['facilityName'] : null, + dropDownText: _selectedBranch != null + ? _selectedBranch['facilityName'] + : null, enabled: false, isTextFieldHasSuffix: true, validationError: hospitalError, - onClick: - model.branchesList != null && model.branchesList.length > 0 && _referTo != null && _referTo['id'] == 2 - ? () { - ListSelectDialog dialog = ListSelectDialog( - list: model.branchesList, - attributeName: 'facilityName', - attributeValueId: 'facilityId', - okText: TranslationBase.of(context).ok, - okFunction: (selectedValue) { - setState(() async { - _selectedBranch = selectedValue; - _selectedClinic = null; - _selectedDoctor = null; - GifLoaderDialogUtils.showMyDialog(context); - await model - .getClinics(_selectedBranch['facilityId']) - .then((_) => GifLoaderDialogUtils.hideDialog(context)); - if (model.state == ViewState.ErrorLocal) { - DrAppToastMsg.showErrorToast(model.error); - } - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: (BuildContext context) { - return dialog; - }, - ); - } - : null, + onClick: model.branchesList != null && + model.branchesList.length > 0 && + _referTo != null && + _referTo['id'] == 2 + ? () { + ListSelectDialog dialog = ListSelectDialog( + list: model.branchesList, + attributeName: 'facilityName', + attributeValueId: 'facilityId', + okText: TranslationBase.of(context).ok, + okFunction: (selectedValue) { + setState(() async { + _selectedBranch = selectedValue; + _selectedClinic = null; + _selectedDoctor = null; + GifLoaderDialogUtils.showMyDialog(context); + await model + .getClinics(_selectedBranch['facilityId']) + .then((_) => + GifLoaderDialogUtils.hideDialog(context)); + if (model.state == ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast(model.error); + } + }); + }, + ); + showDialog( + barrierDismissible: false, + context: context, + builder: (BuildContext context) { + return dialog; + }, + ); + } + : null, ), SizedBox( height: 10, @@ -285,11 +340,15 @@ class _PatientMakeReferralScreenState extends State { AppTextFieldCustom( height: screenSize.height * 0.075, hintText: TranslationBase.of(context).clinic, - dropDownText: _selectedClinic != null ? _selectedClinic['ClinicDescription'] : null, + dropDownText: _selectedClinic != null + ? _selectedClinic['ClinicDescription'] + : null, enabled: false, isTextFieldHasSuffix: true, validationError: clinicError, - onClick: _selectedBranch != null && model.clinicsList != null && model.clinicsList.length > 0 + onClick: _selectedBranch != null && + model.clinicsList != null && + model.clinicsList.length > 0 ? () { ListSelectDialog dialog = ListSelectDialog( list: model.clinicsList, @@ -304,8 +363,12 @@ class _PatientMakeReferralScreenState extends State { _selectedClinic = selectedValue; GifLoaderDialogUtils.showMyDialog(context); await model - .getClinicDoctors(patient, _selectedClinic['ClinicID'], _selectedBranch['facilityId']) - .then((_) => GifLoaderDialogUtils.hideDialog(context)); + .getClinicDoctors( + patient, + _selectedClinic['ClinicID'], + _selectedBranch['facilityId']) + .then((_) => + GifLoaderDialogUtils.hideDialog(context)); if (model.state == ViewState.ErrorLocal) { DrAppToastMsg.showErrorToast(model.error); } @@ -328,11 +391,14 @@ class _PatientMakeReferralScreenState extends State { AppTextFieldCustom( height: screenSize.height * 0.075, hintText: TranslationBase.of(context).doctor, - dropDownText: _selectedDoctor != null ? _selectedDoctor['Name'] : null, + dropDownText: + _selectedDoctor != null ? _selectedDoctor['Name'] : null, enabled: false, isTextFieldHasSuffix: true, validationError: doctorError, - onClick: _selectedClinic != null && model.doctorsList != null && model.doctorsList.length > 0 + onClick: _selectedClinic != null && + model.doctorsList != null && + model.doctorsList.length > 0 ? () { ListSelectDialog dialog = ListSelectDialog( list: model.doctorsList, @@ -357,9 +423,12 @@ class _PatientMakeReferralScreenState extends State { } : () { if (_selectedClinic == null) { - DrAppToastMsg.showErrorToast("You need to select a clinic first"); - } else if (model.doctorsList == null || model.doctorsList.length == 0) { - DrAppToastMsg.showErrorToast("There is no doctors for this clinic"); + DrAppToastMsg.showErrorToast( + "You need to select a clinic first"); + } else if (model.doctorsList == null || + model.doctorsList.length == 0) { + DrAppToastMsg.showErrorToast( + "There is no doctors for this clinic"); } }, ), @@ -369,8 +438,9 @@ class _PatientMakeReferralScreenState extends State { AppTextFieldCustom( height: screenSize.height * 0.075, hintText: TranslationBase.of(context).date, - dropDownText: - appointmentDate != null ? "${AppDateUtils.convertDateToFormat(appointmentDate, "yyyy-MM-dd")}" : null, + dropDownText: appointmentDate != null + ? "${AppDateUtils.convertDateToFormat(appointmentDate, "yyyy-MM-dd")}" + : null, enabled: false, isTextFieldHasSuffix: true, suffixIcon: IconButton( diff --git a/lib/screens/patients/profile/referral/referral_patient_detail_in-paint.dart b/lib/screens/patients/profile/referral/referral_patient_detail_in-paint.dart index cfc26eee..d88d5a95 100644 --- a/lib/screens/patients/profile/referral/referral_patient_detail_in-paint.dart +++ b/lib/screens/patients/profile/referral/referral_patient_detail_in-paint.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/model/referral/MyReferralPatientModel.dart'; import 'package:doctor_app_flutter/core/service/AnalyticsService.dart'; @@ -146,7 +147,7 @@ class ReferralPatientDetailScreen extends StatelessWidget { color: referredPatient.referralStatus == 1 ? Color(0xffc4aa54) : referredPatient.referralStatus == 46 || referredPatient.referralStatus == 2 - ? Colors.green[700] + ? AppGlobal.appGreenColor : Colors.red[700], ), AppText( diff --git a/lib/screens/patients/profile/referral/referred_patient_detail_in-paint.dart b/lib/screens/patients/profile/referral/referred_patient_detail_in-paint.dart index f6d3b8d7..21634d0f 100644 --- a/lib/screens/patients/profile/referral/referred_patient_detail_in-paint.dart +++ b/lib/screens/patients/profile/referral/referred_patient_detail_in-paint.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/PatientType.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; @@ -157,7 +158,7 @@ class ReferredPatientDetailScreen extends StatelessWidget { color: referredPatient.referralStatus == 1 ? Color(0xffc4aa54) : referredPatient.referralStatus == 46 - ? Colors.green[700] + ? AppGlobal.appGreenColor : Colors.red[700], ), AppText( diff --git a/lib/screens/patients/profile/soap_update/objective/examination_item_card.dart b/lib/screens/patients/profile/soap_update/objective/examination_item_card.dart index 9dd00302..89691cf2 100644 --- a/lib/screens/patients/profile/soap_update/objective/examination_item_card.dart +++ b/lib/screens/patients/profile/soap_update/objective/examination_item_card.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_examination.dart'; @@ -59,7 +60,7 @@ class ExaminationItemCard extends StatelessWidget { ? examination.isAbnormal ? Colors.red.shade800 : Colors.grey.shade800 - : Colors.green.shade800, + : AppGlobal.appGreenColor, fontSize: SizeConfig.textMultiplier * 1.8, ), if (!examination.notExamined) diff --git a/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart b/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart index 9712eafd..c4964975 100644 --- a/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart +++ b/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; @@ -167,7 +168,7 @@ class _UpdateObjectivePageState extends State "Verified", fontWeight: FontWeight.w600, fontFamily: 'Poppins', - color: Colors.green, + color: AppGlobal.appGreenColor, ), ], ), diff --git a/lib/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart b/lib/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart index d6c19372..f5134c1c 100644 --- a/lib/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart +++ b/lib/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart @@ -2,13 +2,14 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:flutter/material.dart'; -class BottomSheetTitle extends StatelessWidget with PreferredSizeWidget { - BottomSheetTitle({ - Key key, this.title, +class BottomSheetTitle extends StatelessWidget with PreferredSizeWidget { + BottomSheetTitle({ + Key key, + this.title, }) : super(key: key); final String title; - double headerHeight = SizeConfig.heightMultiplier*15; + double headerHeight = SizeConfig.heightMultiplier * 15; @override Widget build(BuildContext context) { return Container( @@ -20,29 +21,25 @@ class BottomSheetTitle extends StatelessWidget with PreferredSizeWidget { height: headerHeight, child: Center( child: Container( - padding: EdgeInsets.only( - left: 10, right: 10), - margin: EdgeInsets.only(top: headerHeight *0.5), + padding: EdgeInsets.only(left: 10, right: 10), + margin: EdgeInsets.only(top: headerHeight * 0.5), child: Column( children: [ Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ RichText( text: TextSpan( - style: TextStyle( - fontSize:20, - color: Colors.black), + style: TextStyle(fontSize: 20, color: Colors.black), children: [ new TextSpan( - text: title, style: TextStyle( color: Color(0xFF2B353E), - fontWeight: FontWeight.bold, + fontWeight: FontWeight.w700, fontFamily: 'Poppins', - fontSize: SizeConfig.getTextMultiplierBasedOnWidth()*6)), + letterSpacing: -1.44, + fontSize: 24.0)), ], ), ), @@ -51,7 +48,7 @@ class BottomSheetTitle extends StatelessWidget with PreferredSizeWidget { Navigator.pop(context); }, child: Icon(DoctorApp.close_1, - size:SizeConfig.getTextMultiplierBasedOnWidth()*5, + size: SizeConfig.getTextMultiplierBasedOnWidth() * 5, color: Color(0xFF2B353E))) ], ), @@ -63,5 +60,5 @@ class BottomSheetTitle extends StatelessWidget with PreferredSizeWidget { } @override - Size get preferredSize => Size(double.maxFinite,headerHeight); + Size get preferredSize => Size(double.maxFinite, headerHeight); } diff --git a/lib/screens/patients/profile/soap_update/subjective/history/priority_bar.dart b/lib/screens/patients/profile/soap_update/subjective/history/priority_bar.dart index 305b0c65..57698f56 100644 --- a/lib/screens/patients/profile/soap_update/subjective/history/priority_bar.dart +++ b/lib/screens/patients/profile/soap_update/subjective/history/priority_bar.dart @@ -76,7 +76,7 @@ class _PriorityBarState extends State { ), ), if(_isActive) - Container(width: 120,height: 4,color: AppGlobal.appPrimaryColor,) + Container(width: 120,height: 4,color: AppGlobal.appRedColor,) ], ), ), diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_details_blood_pressurewideget.dart b/lib/screens/patients/profile/vital_sign/vital_sign_details_blood_pressurewideget.dart index 1e593af7..69f45d6e 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_details_blood_pressurewideget.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_details_blood_pressurewideget.dart @@ -34,12 +34,6 @@ class _VitalSignDetailsWidgetState extends State { Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); return Container( - /*decoration: BoxDecoration( - color: Colors.transparent, - borderRadius: BorderRadius.only( - topLeft: Radius.circular(10.0), topRight: Radius.circular(10.0)), - border: Border.all(color: Colors.grey, width: 1), - ),*/ margin: EdgeInsets.all(0), child: Container( color: Colors.transparent, @@ -52,13 +46,6 @@ class _VitalSignDetailsWidgetState extends State { child: Container( child: Container( padding: EdgeInsets.all(8), - /*decoration: BoxDecoration( - color: Theme.of(context).primaryColor, - borderRadius: BorderRadius.only( - topLeft:projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0), - topRight: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0) - ), - ),*/ child: AppText( TranslationBase.of(context).date, fontSize: SizeConfig.textMultiplier * 1.5, @@ -74,13 +61,6 @@ class _VitalSignDetailsWidgetState extends State { child: Container( padding: EdgeInsets.all(8), child: Container( - /*decoration: BoxDecoration( - color: Theme.of(context).primaryColor, - borderRadius: BorderRadius.only( - topRight: projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0), - topLeft: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0) - ), - ),*/ child: AppText( widget.title2, fontSize: SizeConfig.textMultiplier * 1.5, @@ -96,13 +76,6 @@ class _VitalSignDetailsWidgetState extends State { child: Container( padding: EdgeInsets.all(8), child: Container( - /*decoration: BoxDecoration( - color: Theme.of(context).primaryColor, - borderRadius: BorderRadius.only( - topRight: projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0), - topLeft: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0) - ), - ),*/ child: AppText( widget.title3, fontSize: SizeConfig.textMultiplier * 1.5, diff --git a/lib/screens/patients/register_patient/CustomEditableText.dart b/lib/screens/patients/register_patient/CustomEditableText.dart new file mode 100644 index 00000000..17405829 --- /dev/null +++ b/lib/screens/patients/register_patient/CustomEditableText.dart @@ -0,0 +1,95 @@ +import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; +import 'package:flutter/material.dart'; + +class CustomEditableText extends StatefulWidget { + CustomEditableText({ + Key key, + @required this.controller, + this.hint, + this.isEditable = false, this.isSubmitted, + }) : super(key: key); + + final TextEditingController controller; + + final String hint; + bool isEditable; + final bool isSubmitted; + + @override + _CustomEditableTextState createState() => _CustomEditableTextState(); +} + +class _CustomEditableTextState extends State { + @override + Widget build(BuildContext context) { + return Column( + children: [ + if(!widget.isEditable) + Container( + height: 60, + decoration: BoxDecoration( + color: Colors.grey[300], + shape: BoxShape.rectangle, + borderRadius: BorderRadius.all(Radius.circular(20)), + border: Border.fromBorderSide( + BorderSide( + color: Colors.grey[300], + width: 2, + ), + ), + ), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText(widget.hint, fontSize: 12, color: Colors.black), + AppText( + widget.controller.text, + fontSize: 12, + color: Colors.grey[600], + ), + ], + ), + InkWell( + child: Icon( + DoctorApp.edit_1, + size: 20, + + ), + onTap: () { + setState(() { + widget.isEditable = true; + }); + }, + ) + ], + ), + ), + ), + if(widget.isEditable) + AppTextFieldCustom( + hintText: widget.hint, + //TranslationBase.of(context).addoperationReports, + controller: widget.controller, + validationError: widget.controller + .text.isEmpty && + widget.isSubmitted + ? TranslationBase.of(context) + .emptyMessage + : null, + maxLines: 1, + minLines: 1, + hasBorder: true, + ), + ], + ); + } +} \ No newline at end of file diff --git a/lib/screens/patients/register_patient/RegisterConfirmationPatientPage.dart b/lib/screens/patients/register_patient/RegisterConfirmationPatientPage.dart new file mode 100644 index 00000000..6443e972 --- /dev/null +++ b/lib/screens/patients/register_patient/RegisterConfirmationPatientPage.dart @@ -0,0 +1,709 @@ +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/enum/viewstate.dart'; +import 'package:doctor_app_flutter/core/model/PatientRegistration/PatientRegistrationModel.dart'; +import 'package:doctor_app_flutter/core/model/note/CreateNoteModel.dart'; +import 'package:doctor_app_flutter/core/model/note/note_model.dart'; +import 'package:doctor_app_flutter/core/model/note/update_note_model.dart'; +import 'package:doctor_app_flutter/core/provider/robot_provider.dart'; +import 'package:doctor_app_flutter/core/viewModel/PatientRegistrationViewModel.dart'; +import 'package:doctor_app_flutter/core/viewModel/profile/operation_report_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; +import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; +import 'package:doctor_app_flutter/models/operation_report/create_update_operation_report_request_model.dart'; +import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/models/patient/progress_note_request.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; +import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; +import 'package:doctor_app_flutter/util/helpers.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; +import 'package:doctor_app_flutter/widgets/shared/speech-text-popup.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/text_fields_utils.dart'; +import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; +import 'package:hijri/hijri_calendar.dart'; +import 'package:intl/intl.dart'; +import 'package:permission_handler/permission_handler.dart'; +import 'package:provider/provider.dart'; +import 'package:speech_to_text/speech_recognition_error.dart'; +import 'package:speech_to_text/speech_to_text.dart' as stt; + +import 'CustomEditableText.dart'; + +class RegisterConfirmationPatientPage extends StatefulWidget { + final OperationReportViewModel operationReportViewModel; + final PatiantInformtion patient; + final PatientRegistrationViewModel model; + + const RegisterConfirmationPatientPage( + {Key key, this.operationReportViewModel, this.patient, this.model}) + : super(key: key); + + @override + _RegisterConfirmationPatientPageState createState() => + _RegisterConfirmationPatientPageState(); +} + +class _RegisterConfirmationPatientPageState + extends State { + bool isSubmitted = false; + ProjectViewModel projectViewModel; + TextEditingController firstNameN; + TextEditingController middleNameN; + TextEditingController lastNameN; + TextEditingController firstNameAr; + TextEditingController middleNameAr; + TextEditingController lastNameAr; + TextEditingController emailAddressController; + TextEditingController langController = TextEditingController(text: "English"); + int selectedLang = 1; + + @override + void initState() { + firstNameN = TextEditingController( + text: widget.model.getPatientInfoResponseModel.firstNameEn); + middleNameN = TextEditingController(text: ""); + lastNameN = TextEditingController( + text: widget.model.getPatientInfoResponseModel.lastNameEn); + + firstNameAr = TextEditingController( + text: widget.model.getPatientInfoResponseModel.firstNameAr); + middleNameAr = TextEditingController(text: ""); + lastNameAr = TextEditingController( + text: widget.model.getPatientInfoResponseModel.lastNameAr); + emailAddressController = TextEditingController(text: ""); + super.initState(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + + ///TODO Elham* add translation + return AppScaffold( + isShowAppBar: false, + backgroundColor: Color(0xFFF8F8F8), + body: SingleChildScrollView( + child: Container( + height: MediaQuery.of(context).size.height * 1.0, + child: Padding( + padding: EdgeInsets.all(0.0), + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10.0, + ), + SingleChildScrollView( + child: Center( + child: FractionallySizedBox( + widthFactor: 0.9, + child: Column( + children: [ + CustomEditableText( + controller: firstNameN, + isSubmitted: isSubmitted, + hint: TranslationBase.of(context).firstName), + SizedBox( + height: 4, + ), + CustomEditableText( + controller: middleNameN, + isEditable: middleNameN.text.isEmpty, + isSubmitted: isSubmitted, + hint: TranslationBase.of(context).middleName), + SizedBox( + height: 4, + ), + CustomEditableText( + controller: lastNameN, + isSubmitted: isSubmitted, + hint: TranslationBase.of(context).lastName), + SizedBox( + height: 20, + ), + CustomEditableText( + controller: firstNameAr, + isSubmitted: isSubmitted, + hint: + TranslationBase.of(context).firstNameInAr), + SizedBox( + height: 4, + ), + CustomEditableText( + controller: middleNameAr, + isEditable: middleNameN.text.isEmpty, + isSubmitted: isSubmitted, + hint: + TranslationBase.of(context).middleNameInAr), + SizedBox( + height: 4, + ), + CustomEditableText( + controller: lastNameAr, + isSubmitted: isSubmitted, + hint: TranslationBase.of(context).lastNameInAr), + SizedBox( + height: 20, + ), + FractionallySizedBox( + widthFactor: .9, + child: Center( + child: Column( + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .healthID, + fontSize: 12, + color: Colors.black), + AppText( + "${widget.model.getPatientInfoResponseModel.healthId}", + fontSize: 12, + color: Colors.grey[600], + ), + ], + ), + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .identityNumber, + fontSize: 12, + color: Colors.black), + AppText( + "${widget.model.getPatientInfoResponseModel.idNumber}", + fontSize: 12, + color: Colors.grey[600], + ), + ], + ), + SizedBox( + width: 20, + ) + ], + ), + SizedBox( + height: 20, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .nationality, + fontSize: 12, + color: Colors.black), + AppText( + "${widget.model.getPatientInfoResponseModel.nationality}", + fontSize: 12, + color: Colors.grey[600], + ), + ], + ), + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .occupation, + fontSize: 12, + color: Colors.black), + AppText( + "${widget.model.getPatientInfoResponseModel.occupation}", + fontSize: 12, + color: Colors.grey[600], + ), + ], + ), + SizedBox( + width: 20, + ) + ], + ), + SizedBox( + height: 20, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .mobileNo, + fontSize: 12, + color: Colors.black), + AppText( + "${widget.model.checkPatientForRegistrationModel.patientMobileNumber}", + fontSize: 12, + color: Colors.grey[600], + ), + ], + ), + SizedBox( + width: 20, + ) + ], + ), + SizedBox( + height: 20, + ), + ], + ), + ), + ), + AppTextFieldCustom( + height: Helpers.getTextFieldHeight(), + enabled: false, + onClick: () { + openMaritalStatusList(context); + }, + hintText: + TranslationBase.of(context).maritalStatus, + maxLines: 1, + minLines: 1, + isTextFieldHasSuffix: true, + + // controller: doseController, + // validationError: isFormSubmitted && + // _selectedMedicationDose == null + // ? TranslationBase.of(context) + // .emptyMessage + // : null, + ), + SizedBox( + height: 20, + ), + AppTextFieldCustom( + height: Helpers.getTextFieldHeight(), + enabled: false, + onClick: () { + openLangList(context); + }, + controller: langController, + hintText: TranslationBase.of(context).lanEnglish, + maxLines: 1, + minLines: 1, + isTextFieldHasSuffix: true, + // controller: doseController, + // validationError: isFormSubmitted && + // _selectedMedicationDose == null + // ? TranslationBase.of(context) + // .emptyMessage + // : null, + ), + SizedBox( + height: 20, + ), + AppTextFieldCustom( + hintText: "Email Address", + //TranslationBase.of(context).addoperationReports, + controller: emailAddressController, + maxLines: 1, + minLines: 1, + hasBorder: true, + validationError: + emailAddressController.text.isEmpty && + isSubmitted + ? TranslationBase.of(context).emptyMessage + : null, + ), + SizedBox( + height: 400, + ), + ], + ), + ), + ), + ), + ], + ), + ), + ), + ), + ), + bottomSheet: Container( + height: 60, + margin: EdgeInsets.symmetric(vertical: 16, horizontal: 16), + child: Row( + children: [ + Expanded( + child: Container( + child: AppButton( + title: TranslationBase.of(context).cancel, + hasBorder: true, + vPadding: 12, + hPadding: 8, + borderColor: Color(0xFFeaeaea), + color: Color(0xFFeaeaea), + fontColor: Colors.black, + fontSize: 2.2, + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ), + ), + SizedBox( + width: 8, + ), + Expanded( + child: Container( + child: AppButton( + title: TranslationBase.of(context).next, + hasBorder: true, + vPadding: 12, + hPadding: 8, + borderColor: Color(0xFFB8382B), + color: HexColor("#D02127"), + fontColor: Colors.white, + fontSize: 2.0, + onPressed: () async { + setState(() { + isSubmitted = true; + }); + if (isFormValid()) { + print( + widget.model.getPatientInfoResponseModel.dateOfBirth); + + var dateFormat = DateFormat('MM/dd/yyyy').parse( + widget.model.getPatientInfoResponseModel.dateOfBirth); + String wellFormat = + "${dateFormat.day}\/${dateFormat.month}\/${dateFormat.year}"; + print( + dateFormat.toUtc().toString(), + ); + HijriCalendar hijriDate = HijriCalendar.fromDate( + new DateTime( + dateFormat.year, dateFormat.month, dateFormat.day), + ); + // return ; + + GifLoaderDialogUtils.showMyDialog(context); + PatientRegistrationModel patientRegistrationModel = + PatientRegistrationModel( + patientobject: Patientobject( + tempValue: true, + patientIdentificationNo: widget + .model + .checkPatientForRegistrationModel + .patientIdentificationID + .toString(), + patientIdentificationType: 1, + firstName: firstNameAr.text, + firstNameN: firstNameN.text, + lastName: lastNameAr.text, + lastNameN: lastNameN.text, + middleName: middleNameAr.text, + middleNameN: middleNameN.text, + strDateofBirth: dateFormat.toUtc().toString(), + dateofBirth: AppDateUtils.convertToServerFormat( + widget.model.getPatientInfoResponseModel + .dateOfBirth, + 'MM/dd/yyyy'), + dateofBirthN: '$hijriDate', + gender: (widget.model.getPatientInfoResponseModel.gender == "M") + ? 1 + : 2, + sourceType: "1", + patientOutSA: 0, + nationalityID: widget + .model + .getPatientInfoResponseModel + .nationalityCode, + //todo Elham* change static value to dynamic + preferredLanguage: selectedLang.toString(), + marital: "0", + eHealthIDField: widget.model + .getPatientInfoResponseModel.healthId, + emailAddress: emailAddressController.text, + mobileNumber: widget + .model + .checkPatientForRegistrationModel + .patientMobileNumber), + isHijri: 0, + logInTokenID: "zjgvKtLC/EK+saznJ/OkiA==", + isDentalAllowedBackend: false, + patientOutSA: 0, + sessionID: null, + patientMobileNumber: widget + .model + .checkPatientForRegistrationModel + .patientMobileNumber + .toString(), + healthId: + widget.model.getPatientInfoResponseModel.healthId, + generalid: GENERAL_ID, + patientIdentificationID: widget.model.checkPatientForRegistrationModel.patientIdentificationID.toString(), + dOB: wellFormat, + zipCode: widget.model.checkPatientForRegistrationModel.zipCode); + await widget.model + .registrationPatient(patientRegistrationModel); + if (widget.model.state == ViewState.ErrorLocal) { + Helpers.showErrorToast(widget.model.error); + } else { + DrAppToastMsg.showSuccesToast( + "Patient added Successfully"); + Navigator.of(context).pop(); + } + + GifLoaderDialogUtils.hideDialog(context); + } + }, + ), + ), + ), + ], + ), + ), + ); + } + + openMaritalStatusList(BuildContext context) { + showModalBottomSheet( + backgroundColor: Colors.white, + isDismissible: true, + isScrollControlled: true, + context: context, + builder: (context) { + return FractionallySizedBox( + heightFactor: .3, + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: AppText( + "${TranslationBase.of(context).maritalStatus} :", + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: 18, + ), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: InkWell( + onTap: () { + Navigator.of(context).pop(); + }, + child: Icon(DoctorApp.close_1, + size: SizeConfig.getTextMultiplierBasedOnWidth() * + 4.5, + color: Color(0xFF2B353E))), + ), + ], + ), + SizedBox( + height: 10, + ), + InkWell( + onTap: () {}, + child: Row( + children: [ + Radio( + value: 1, + groupValue: 1, + onChanged: (value) { + setState(() {}); + }, + activeColor: Colors.red, + ), + AppText( + "Single", + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 15, + ), + ], + ), + ), + InkWell( + onTap: () {}, + child: Row( + children: [ + Radio( + value: 1, + groupValue: 1, + onChanged: (value) { + setState(() {}); + }, + activeColor: Colors.red, + ), + AppText( + "Married", + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 15, + ), + ], + ), + ), + InkWell( + onTap: () {}, + child: Row( + children: [ + Radio( + value: 1, + groupValue: 1, + onChanged: (value) { + setState(() {}); + }, + activeColor: Colors.red, + ), + AppText( + "Divorce", + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 15, + ), + ], + ), + ), + ], + ), + ); + }); + } + + openLangList(BuildContext context) { + showModalBottomSheet( + backgroundColor: Colors.white, + isDismissible: true, + isScrollControlled: true, + context: context, + builder: (context) { + return FractionallySizedBox( + heightFactor: .3, + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: AppText( + "language:", + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: 18, + ), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: InkWell( + onTap: () { + Navigator.of(context).pop(); + }, + child: Icon(DoctorApp.close_1, + size: SizeConfig.getTextMultiplierBasedOnWidth() * + 4.5, + color: Color(0xFF2B353E))), + ), + ], + ), + SizedBox( + height: 10, + ), + InkWell( + onTap: () { + setSelectedLang(1); + }, + child: Row( + children: [ + Radio( + value: 1, + groupValue: selectedLang, + onChanged: (value) { + setSelectedLang(value); + }, + activeColor: Colors.red, + ), + AppText( + TranslationBase.of(context).lanEnglish, + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 15, + ), + ], + ), + ), + InkWell( + onTap: () { + setSelectedLang(2); + }, + child: Row( + children: [ + Radio( + value: 2, + groupValue: selectedLang, + onChanged: (value) { + setSelectedLang(value); + }, + activeColor: Colors.red, + ), + AppText( + TranslationBase.of(context).lanArabic, + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 15, + ), + ], + ), + ), + ], + ), + ); + }); + } + + setSelectedLang(lang) { + setState(() { + selectedLang = lang; + langController.text = lang == 1 ? "English" : "العربيه"; + }); + Navigator.of(context).pop(); + } + + bool isFormValid() { + if (middleNameAr.text != null && + middleNameAr.text.isNotEmpty && + middleNameN.text != null && + middleNameN.text.isNotEmpty && + emailAddressController.text != null && + emailAddressController.text.isNotEmpty) { + return true; + } + return false; + } +} diff --git a/lib/screens/patients/register_patient/RegisterPatientPage.dart b/lib/screens/patients/register_patient/RegisterPatientPage.dart new file mode 100644 index 00000000..e7423f89 --- /dev/null +++ b/lib/screens/patients/register_patient/RegisterPatientPage.dart @@ -0,0 +1,221 @@ +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/core/viewModel/PatientRegistrationViewModel.dart'; +import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_header.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/UCAF/page-stepper-widget.dart'; +import 'package:doctor_app_flutter/screens/patients/register_patient/RegisterConfirmationPatientPage.dart'; +import 'package:doctor_app_flutter/screens/patients/register_patient/VerifyMethodPage.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; + +import 'RegisterSearchPatientPage.dart'; + +class RegisterPatientPage extends StatefulWidget { + const RegisterPatientPage({Key key}) : super(key: key); + + @override + _RegisterPatientPageState createState() => _RegisterPatientPageState(); +} + +class _RegisterPatientPageState extends State + with TickerProviderStateMixin { + PageController _controller; + int _currentIndex = 0; + bool _isLoading = false; + + changePageViewIndex(pageIndex, {isChangeState = true}) { + if (pageIndex != _currentIndex && isChangeState) changeLoadingState(true); + _controller.jumpToPage(pageIndex); + setState(() { + _currentIndex = pageIndex; + }); + } + + void changeLoadingState(bool isLoading) { + setState(() { + _isLoading = isLoading; + }); + } + + @override + void initState() { + _controller = new PageController(); + super.initState(); + } + + @override + void dispose() { + _controller.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + final screenSize = MediaQuery.of(context).size; + + ///TODO Elham* Add Translation + return BaseView( + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + isShowAppBar: true, + isLoading: _isLoading, + appBar: PatientSearchHeader( + title: TranslationBase.of(context).registeraPatient, + ), + body: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + //TODO Elham* Fix overflow + PageStepperWidget( + stepsCount: 3, + currentStepIndex: _currentIndex + 1, + screenSize: screenSize, + stepsTitles: [ + TranslationBase.of(context).search, + TranslationBase.of(context).activation, + TranslationBase.of(context).confirmation, + ], + ), + SizedBox( + height: 10, + ), + Expanded( + child: Container( + color: Theme.of(context).scaffoldBackgroundColor, + child: PageView( + physics: NeverScrollableScrollPhysics(), + controller: _controller, + onPageChanged: (index) { + setState(() { + _currentIndex = index; + }); + }, + scrollDirection: Axis.horizontal, + children: [ + RegisterSearchPatientPage( + changePageViewIndex: changePageViewIndex, + model: model), + ActivationPage( + model: model, + changePageViewIndex: changePageViewIndex, + ), + RegisterConfirmationPatientPage( + model: model, + ), + ]), + ), + ), + ], + ), + )), + // pagerButtons(model), + ], + ), + ), + ); + } + + Widget pagerButtons(PatientRegistrationViewModel model) { + switch (_currentIndex) { + case 2: + return Container( + margin: EdgeInsets.symmetric(vertical: 16, horizontal: 16), + child: Row( + children: [ + Expanded( + child: Container( + child: AppButton( + title: TranslationBase.of(context).cancel, + hasBorder: true, + vPadding: 12, + hPadding: 8, + borderColor: Color(0xFFeaeaea), + color: Color(0xFFeaeaea), + fontColor: Colors.black, + fontSize: 2.2, + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ), + ), + SizedBox( + width: 8, + ), + Expanded( + child: Container( + child: AppButton( + title: TranslationBase.of(context).noteConfirm, + hasBorder: true, + vPadding: 12, + hPadding: 8, + borderColor: Color(0xFF359846), + color: Color(0xFF359846), + fontColor: Colors.white, + fontSize: 2.0, + onPressed: () {}, + ), + ), + ), + ], + ), + ); + default: + return Container( + padding: EdgeInsets.symmetric(vertical: 16, horizontal: 16), + child: Row( + children: [ + Expanded( + child: Container( + child: AppButton( + title: TranslationBase.of(context).cancel, + hasBorder: true, + vPadding: 12, + hPadding: 8, + borderColor: Color(0xFFeaeaea), + color: Color(0xFFeaeaea), + fontColor: Colors.black, + fontSize: 2.2, + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ), + ), + SizedBox( + width: 8, + ), + Expanded( + child: Container( + child: AppButton( + title: TranslationBase.of(context).next, + hasBorder: true, + vPadding: 12, + hPadding: 8, + borderColor: Color(0xFFB8382B), + color: AppGlobal.appRedColor, + fontColor: Colors.white, + fontSize: 2.0, + onPressed: () { + changePageViewIndex(_currentIndex + 1); + }, + ), + ), + ), + ], + ), + ); + } + } +} diff --git a/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart b/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart new file mode 100644 index 00000000..69a2c643 --- /dev/null +++ b/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart @@ -0,0 +1,488 @@ +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/enum/viewstate.dart'; +import 'package:doctor_app_flutter/core/model/PatientRegistration/CheckPatientForRegistrationModel.dart'; +import 'package:doctor_app_flutter/core/model/PatientRegistration/GetPatientInfoRequestModel.dart'; +import 'package:doctor_app_flutter/core/model/PatientRegistration/PatientRegistrationModel.dart'; +import 'package:doctor_app_flutter/core/viewModel/PatientRegistrationViewModel.dart'; + +import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; +import 'package:doctor_app_flutter/util/helpers.dart'; + +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart'; +import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; + +import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/country_textfield_custom.dart'; +import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; +import 'package:hijri/hijri_calendar.dart'; +import 'package:hijri_picker/hijri_picker.dart'; +import 'package:doctor_app_flutter/core/enum/CalenderType.dart'; +import 'package:intl/intl.dart'; + +class RegisterSearchPatientPage extends StatefulWidget { + final Function changePageViewIndex; + final PatientRegistrationViewModel model; + + const RegisterSearchPatientPage( + {Key key, this.changePageViewIndex, this.model}) + : super(key: key); + + @override + _RegisterSearchPatientPageState createState() => + _RegisterSearchPatientPageState(); +} + +class _RegisterSearchPatientPageState extends State { + String countryError; + dynamic _selectedCountry; + + List countryList; + + dynamic country; + + bool isSubmitted = false; + + TextEditingController _phoneController = + TextEditingController(text: "508079569"); + TextEditingController _phoneCode = TextEditingController(text: "966"); + + String phoneError; + + TextEditingController _idController = + TextEditingController(text: "1062938285"); + String idError; + + DateTime _birthDateInGregorian; + String birthdateError; + var birthDateInHijri = new HijriCalendar.now(); + CalenderType calenderType = CalenderType.Gregorian; + + @override + void initState() { + _phoneCode.text = ""; + countryList = List(); + + dynamic ksaCountry = {"id": 967, "name": "Saudi Arabia"}; + dynamic uaeCountry = {"id": 971, "name": "United Arab Emirates"}; + dynamic bahrainCountry = {"id": 973, "name": "Bahrain"}; + dynamic kuwaitCountry = {"id": 965, "name": "Kuwait"}; + dynamic afghanistanCountry = {"id": 93, "name": "Afghanistan"}; + dynamic algeriaCountry = {"id": 213, "name": "Algeria"}; + dynamic argentinaCountry = {"id": 54, "name": "Argentina"}; + dynamic bangladeshCountry = {"id": 880, "name": "Bangladesh"}; + dynamic colombiaCountry = {"id": 57, "name": "Colombia"}; + dynamic croatiaCountry = {"id": 385, "name": "Croatia"}; + dynamic denmarkCountry = {"id": 45, "name": "Denmark"}; + dynamic ecuadorCountry = {"id": 593, "name": "Ecuador"}; + dynamic egyptCountry = {"id": 20, "name": "Egypt"}; + dynamic ethiopiaCountry = {"id": 251, "name": "Ethiopia"}; + dynamic greeceCountry = {"id": 30, "name": "Greece"}; + dynamic icelandCountry = {"id": 354, "name": "Iceland"}; + dynamic indonesiaCountry = {"id": 62, "name": "Indonesia"}; + dynamic iraqCountry = {"id": 971, "name": "Iraq"}; + dynamic liberiaCountry = {"id": 231, "name": "Liberia"}; + dynamic senegalCountry = {"id": 221, "name": "Senegal"}; + + countryList.add(ksaCountry); + countryList.add(uaeCountry); + countryList.add(bahrainCountry); + countryList.add(kuwaitCountry); + countryList.add(afghanistanCountry); + countryList.add(algeriaCountry); + countryList.add(argentinaCountry); + countryList.add(bangladeshCountry); + countryList.add(colombiaCountry); + countryList.add(croatiaCountry); + countryList.add(denmarkCountry); + countryList.add(ecuadorCountry); + countryList.add(egyptCountry); + countryList.add(ethiopiaCountry); + countryList.add(greeceCountry); + countryList.add(icelandCountry); + countryList.add(indonesiaCountry); + countryList.add(iraqCountry); + countryList.add(liberiaCountry); + countryList.add(senegalCountry); + country = countryList[0]; + _phoneCode.text = countryList[0]['id'].toString(); + } + + @override + Widget build(BuildContext context) { + final screenSize = MediaQuery.of(context).size; + + /// TODO Elham* add transaltion + + return AppScaffold( + baseViewModel: widget.model, + isShowAppBar: false, + body: Column( + children: [ + Expanded( + child: Container( + width: double.infinity, + margin: EdgeInsets.all(16.0), + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).askForIdentification, + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 2.2, + fontWeight: FontWeight.w800, + ), + SizedBox( + height: 10, + ), + CountryTextField( + elementList: countryList, + element: country, + elementError: countryError, + keyName: 'name', + keyId: 'id', + okFunction: (selectedValue) { + setState(() { + country = selectedValue; + _phoneCode.text = selectedValue['id'].toString(); + }); + }, + hintText: "Country", + ), + SizedBox( + height: 10, + ), + Row( + children: [ + Column( + children: [ + Container( + width: MediaQuery.of(context).size.width * 0.28, + child: AppTextFieldCustom( + height: screenSize.height * 0.075, + hintText: TranslationBase.of(context).codeNo, + inputType: TextInputType.phone, + controller: _phoneCode, + validationError: phoneError, + enabled: false, + ), + ), + if (_phoneController.text.isEmpty && isSubmitted) + SizedBox( + height: 35, + ) + ], + ), + SizedBox( + width: 10, + ), + Expanded( + child: Container( + // width: MediaQuery.of(context).size.width*0.7, + child: AppTextFieldCustom( + height: screenSize.height * 0.075, + hintText: TranslationBase.of(context).phoneNumber, + inputType: TextInputType.phone, + controller: _phoneController, + validationError: + _phoneController.text.isEmpty && isSubmitted + ? TranslationBase.of(context).emptyMessage + : null, + ), + ), + ), + ], + ), + SizedBox( + height: 10, + ), + AppTextFieldCustom( + height: screenSize.height * 0.075, + hintText: TranslationBase.of(context).iDNumber, + inputType: TextInputType.phone, + controller: _idController, + validationError: _idController.text.isEmpty && isSubmitted + ? TranslationBase.of(context).emptyMessage + : null, + ), + SizedBox( + height: 12, + ), + AppText( + TranslationBase.of(context).calender, + fontSize: SizeConfig.textMultiplier * 1.8, + fontWeight: FontWeight.w800, + ), + SizedBox( + height: 10, + ), + Row( + children: [ + Expanded( + child: RadioListTile( + title: + AppText(TranslationBase.of(context).gregorian), + value: CalenderType.Gregorian, + groupValue: calenderType, + onChanged: (CalenderType value) { + setState(() { + calenderType = value; + }); + }, + ), + ), + Expanded( + child: RadioListTile( + title: AppText(TranslationBase.of(context).hijri), + value: CalenderType.Hijri, + groupValue: calenderType, + onChanged: (CalenderType value) { + setState(() { + calenderType = value; + }); + }, + ), + ), + ], + ), + SizedBox( + height: 10, + ), + AppTextFieldCustom( + height: screenSize.height * 0.075, + hintText: TranslationBase.of(context).birthdate, + dropDownText: getBirthdate(), + enabled: false, + isTextFieldHasSuffix: true, + validationError: + _birthDateInGregorian == null && isSubmitted + ? TranslationBase.of(context).emptyMessage + : null, + suffixIcon: IconButton( + icon: Icon( + Icons.calendar_today, + color: Colors.black, + ), + onPressed: null, + ), + onClick: () { + if (_birthDateInGregorian == null) { + _birthDateInGregorian = DateTime.now(); + } + _selectDate(context, _birthDateInGregorian, + (dynamic selectedDate) { + setState(() { + if (calenderType == CalenderType.Hijri) { + birthDateInHijri = selectedDate; + _birthDateInGregorian = HijriCalendar() + .hijriToGregorian( + birthDateInHijri.hYear, + birthDateInHijri.hMonth, + birthDateInHijri.hDay); + print(_birthDateInGregorian); + print(birthDateInHijri); + } else { + _birthDateInGregorian = selectedDate; + birthDateInHijri = HijriCalendar() + .gregorianToHijri(selectedDate.year, + selectedDate.month, selectedDate.day); + + print(_birthDateInGregorian); + print(birthDateInHijri); + } + }); + }); + }, + ), + SizedBox( + height: 70, + ), + ], + ), + ), + ), + ), + ], + ), + bottomSheet: Container( + height: 60, + margin: EdgeInsets.symmetric(vertical: 16, horizontal: 16), + child: Row( + children: [ + Expanded( + child: Container( + child: AppButton( + title: TranslationBase.of(context).cancel, + hasBorder: true, + vPadding: 12, + hPadding: 8, + borderColor: Color(0xFFeaeaea), + color: Color(0xFFeaeaea), + fontColor: Colors.black, + fontSize: 2.2, + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ), + ), + SizedBox( + width: 8, + ), + Expanded( + child: Container( + child: AppButton( + title: TranslationBase.of(context).next, + hasBorder: true, + vPadding: 12, + hPadding: 8, + borderColor: Color(0xFFB8382B), + color: AppGlobal.appRedColor, + fontColor: Colors.white, + fontSize: 2.0, + onPressed: () async { + setState(() { + isSubmitted = true; + }); + if (country == null) { + countryError = TranslationBase.of(context).fieldRequired; + } else { + countryError = null; + } + if (isFormValid()) { + GifLoaderDialogUtils.showMyDialog(context); + CheckPatientForRegistrationModel + checkPatientForRegistrationModel = + CheckPatientForRegistrationModel( + patientIdentificationID: + int.parse(_idController.text), + patientMobileNumber: + int.parse(_phoneController.text), + zipCode: _phoneCode.text, + isHijri: 0, + patientID: 0, + isRegister: false, + isDentalAllowedBackend: false, + patientOutSA: 0, + generalid: GENERAL_ID, + dOB: + "${AppDateUtils.convertStringToDateFormat(_birthDateInGregorian.toString(), "yyyy/MM/dd")}"); + await widget.model.checkPatientForRegistration( + checkPatientForRegistrationModel); + GetPatientInfoRequestModel getPatientInfoRequestModel = + GetPatientInfoRequestModel( + //TODO Elham* this return the static to dynamic + patientIdentificationID: "1062938285", + // _idController.text, + isHijri: 0, + isDentalAllowedBackend: false, + patientOutSA: 0, + generalid: GENERAL_ID, + sessionID: null, + dOB: + "31/07/1988", //"${AppDateUtils.convertStringToDateFormat(_birthDate.toString(), "dd/MM/yyyy")}" + ); + if (widget.model.state == ViewState.ErrorLocal) { + Helpers.showErrorToast(widget.model.error); + } else { + await widget.model + .getPatientInfo(getPatientInfoRequestModel); + if (widget.model.state == ViewState.ErrorLocal) { + Helpers.showErrorToast(widget.model.error); + } else { + widget.changePageViewIndex(1); + } + } + GifLoaderDialogUtils.hideDialog(context); + } + }, + ), + ), + ), + ], + ), + ), + ); + } + + isFormValid() { + if (_phoneController.text != null && + _phoneController.text.isNotEmpty && + _idController.text != null && + _idController.text.isNotEmpty && + _birthDateInGregorian != null) { + return true; + } + return false; + } + + Future _selectDate(BuildContext context, DateTime dateTime, + Function(dynamic) updateDate) async { + if (calenderType == CalenderType.Hijri) { + HijriCalendar hijriDate = HijriCalendar.fromDate(DateTime.now()); + final HijriCalendar pickedH = await showHijriDatePicker( + context: context, + initialDate: birthDateInHijri ?? hijriDate, + lastDate: new HijriCalendar() + ..hYear = hijriDate.hYear + ..hMonth = hijriDate.hMonth + ..hDay = hijriDate.hDay, + firstDate: new HijriCalendar() + ..hYear = 1438 + ..hMonth = 12 + ..hDay = 25, + initialDatePickerMode: DatePickerMode.day, + ); + if (pickedH != null && birthDateInHijri != pickedH) updateDate(pickedH); + } else { + final DateTime picked = await showDatePicker( + context: context, + initialDate: dateTime ?? DateTime.now(), + firstDate: DateTime(DateTime.now().year - 150), + lastDate: DateTime.now(), + initialEntryMode: DatePickerEntryMode.calendar, + ); + if (picked != null && picked != dateTime) { + updateDate(picked); + } + } + } + + void openListDialogField(String attributeName, String attributeValueId, + List list, Function(dynamic selectedValue) okFunction) { + ListSelectDialog dialog = ListSelectDialog( + list: list, + attributeName: attributeName, + attributeValueId: attributeValueId, + usingSearch: true, + okText: TranslationBase.of(context).ok, + okFunction: (selectedValue) { + okFunction(selectedValue); + }, + ); + showDialog( + barrierDismissible: false, + context: context, + builder: (BuildContext context) { + return dialog; + }, + ); + } + + getBirthdate() { + if (calenderType == CalenderType.Hijri) { + return birthDateInHijri != null ? "$birthDateInHijri" : null; + } else { + return _birthDateInGregorian != null + ? "${AppDateUtils.convertStringToDateFormat(_birthDateInGregorian.toString(), "yyyy/MM/dd")}" + : null; + } + } +} diff --git a/lib/screens/patients/register_patient/VerifyActivationCodePage.dart b/lib/screens/patients/register_patient/VerifyActivationCodePage.dart new file mode 100644 index 00000000..d58e5a3b --- /dev/null +++ b/lib/screens/patients/register_patient/VerifyActivationCodePage.dart @@ -0,0 +1,48 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/viewModel/PatientRegistrationViewModel.dart'; +import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:flutter/material.dart'; + +class VerifyActivationCodePage extends StatefulWidget { + const VerifyActivationCodePage({Key key}) : super(key: key); + + @override + _VerifyActivationCodePageState createState() => + _VerifyActivationCodePageState(); +} + +class _VerifyActivationCodePageState extends State { + @override + Widget build(BuildContext context) { + return BaseView( + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + isShowAppBar: false, + body: Column( + children: [ + Container( + width: double.infinity, + margin: EdgeInsets.all(16.0), + child: SingleChildScrollView( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + "Please enter the verification code sent to 02221552", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 2.2, + fontWeight: FontWeight.w800, + ), + ], + ), + ), + ) + ], + ), + ), + ); + } +} diff --git a/lib/screens/patients/register_patient/VerifyMethodPage.dart b/lib/screens/patients/register_patient/VerifyMethodPage.dart new file mode 100644 index 00000000..9636f2ca --- /dev/null +++ b/lib/screens/patients/register_patient/VerifyMethodPage.dart @@ -0,0 +1,526 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/enum/viewstate.dart'; +import 'package:doctor_app_flutter/core/model/PatientRegistration/CheckPatientForRegistrationModel.dart'; +import 'package:doctor_app_flutter/core/viewModel/PatientRegistrationViewModel.dart'; +import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/screens/patients/register_patient/RegisterConfirmationPatientPage.dart'; +import 'package:doctor_app_flutter/util/helpers.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; +import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; + +class ActivationPage extends StatefulWidget { + final PatientRegistrationViewModel model; + final Function changePageViewIndex; + + ActivationPage({this.model, this.changePageViewIndex}); + + @override + _ActivationPageState createState() => _ActivationPageState(); +} + +class _ActivationPageState extends State { + bool isSendOtp = false; + final verifyAccountForm = GlobalKey(); + + TextStyle buildTextStyle() { + return TextStyle( + fontSize: SizeConfig.textMultiplier * 3, + ); + } + + Map verifyAccountFormValue = { + 'digit1': '', + 'digit2': '', + 'digit3': '', + 'digit4': '', + }; + final focusD1 = FocusNode(); + final focusD2 = FocusNode(); + final focusD3 = FocusNode(); + final focusD4 = FocusNode(); + + TextEditingController digit1 = TextEditingController(text: ""); + TextEditingController digit2 = TextEditingController(text: ""); + TextEditingController digit3 = TextEditingController(text: ""); + TextEditingController digit4 = TextEditingController(text: ""); + + @override + Widget build(BuildContext context) { + return AppScaffold( + baseViewModel: widget.model, + isShowAppBar: false, + body: Column( + children: [ + Visibility( + //visible: isSendOtp, + child: !isSendOtp + ? Container( + width: double.infinity, + margin: EdgeInsets.all(16.0), + child: SingleChildScrollView( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + "Please select how you want to be verified", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 2.2, + fontWeight: FontWeight.w800, + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Expanded( + child: InkWell( + onTap: () async { + await sendActivationCode(1); + setState(() { + isSendOtp = true; + }); + // + // await widget.model + // .sendActivationCodeByOTPNotificationType( + // otpType: 1); + }, + child: Container( + height: + MediaQuery.of(context).size.height * + 0.233, + margin: EdgeInsets.all(10), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(10), + ), + border: Border.all( + color: HexColor('#707070'), + width: 0.1), + ), + child: Column( + children: [ + Row( + children: [ + Padding( + padding: EdgeInsets.symmetric( + horizontal: 10), + child: Image.asset( + "assets/images/verify-sms.png", + height: MediaQuery.of(context) + .size + .height * + 0.15, + width: MediaQuery.of(context) + .size + .width * + 0.15, + ), + ), + ], + ), + SizedBox( + height: 20, + ), + Center( + child: AppText( + TranslationBase.of(context) + .verifySMS, + fontSize: 14, + color: Color(0xFF2E303A), + fontWeight: FontWeight.bold, + ), + ) + ], + ), + ), + ), + ), + Expanded( + child: InkWell( + onTap: () async { + await sendActivationCode(2); + setState(() { + isSendOtp = true; + }); + }, + child: Container( + height: + MediaQuery.of(context).size.height * + 0.233, + margin: EdgeInsets.all(10), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(10), + ), + border: Border.all( + color: HexColor('#707070'), + width: 0.1), + ), + child: Column( + children: [ + Row( + children: [ + Padding( + padding: EdgeInsets.symmetric( + horizontal: 10.0), + child: Image.asset( + "assets/images/verify-whtsapp.png", + height: MediaQuery.of(context) + .size + .height * + 0.15, + width: MediaQuery.of(context) + .size + .width * + 0.15, + ), + ), + ], + ), + SizedBox( + height: 20, + ), + Center( + child: AppText( + TranslationBase.of(context) + .verifyWhatsApp, + fontSize: 14, + color: Color(0xFF2E303A), + fontWeight: FontWeight.bold, + ), + ) + ], + ), + ), + ), + ), + ], + ), + ], + ), + ), + ) + : Container( + width: double.infinity, + margin: EdgeInsets.all(16.0), + child: SingleChildScrollView( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).verificationMessage, + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 2.2, + fontWeight: FontWeight.w800, + ), + Row( + children: [ + Center( + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Form( + key: verifyAccountForm, + child: Padding( + padding: EdgeInsets.only(top: 20), + child: Directionality( + textDirection: TextDirection.ltr, + child: Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + Container( + width: SizeConfig + .realScreenWidth * + 0.16, + margin: EdgeInsets.all(5), + child: TextFormField( + textInputAction: + TextInputAction.next, + style: buildTextStyle(), + autofocus: true, + maxLength: 1, + controller: digit1, + textAlign: TextAlign.center, + keyboardType: + TextInputType.number, + decoration: + buildInputDecoration( + context), + onSaved: (val) {}, + //validator: validateCodeDigit, + onFieldSubmitted: (_) { + FocusScope.of(context) + .requestFocus( + focusD2); + }, + onChanged: (val) { + if (val.length == 1) { + FocusScope.of(context) + .requestFocus( + focusD2); + verifyAccountFormValue[ + 'digit1'] = + val.trim(); + //checkValue(); + } + }, + ), + ), + Container( + width: SizeConfig + .realScreenWidth * + 0.16, + margin: EdgeInsets.all(5), + child: TextFormField( + focusNode: focusD2, + textInputAction: + TextInputAction.next, + maxLength: 1, + controller: digit2, + textAlign: TextAlign.center, + style: buildTextStyle(), + keyboardType: + TextInputType.number, + decoration: + buildInputDecoration( + context), + onSaved: (val) {}, + onFieldSubmitted: (_) { + FocusScope.of(context) + .requestFocus( + focusD3); + }, + onChanged: (val) { + if (val.length == 1) { + FocusScope.of(context) + .requestFocus( + focusD3); + verifyAccountFormValue[ + 'digit2'] = + val.trim(); + //checkValue(); + } + }, + //validator: validateCodeDigit, + ), + ), + Container( + margin: EdgeInsets.all(5), + width: SizeConfig + .realScreenWidth * + 0.16, + child: TextFormField( + focusNode: focusD3, + textInputAction: + TextInputAction.next, + maxLength: 1, + controller: digit3, + textAlign: + TextAlign.center, + style: buildTextStyle(), + keyboardType: + TextInputType.number, + decoration: + buildInputDecoration( + context), + onSaved: (val) {}, + onFieldSubmitted: (_) { + FocusScope.of(context) + .requestFocus( + focusD4); + }, + onChanged: (val) { + if (val.length == 1) { + FocusScope.of(context) + .requestFocus( + focusD4); + verifyAccountFormValue[ + 'digit3'] = + val.trim(); + //checkValue(); + } + }, + // validator: + // validateCodeDigit, + )), + Container( + margin: EdgeInsets.all(5), + width: SizeConfig + .realScreenWidth * + 0.16, + child: TextFormField( + focusNode: focusD4, + maxLength: 1, + textAlign: + TextAlign.center, + style: buildTextStyle(), + controller: digit4, + keyboardType: + TextInputType.number, + decoration: + buildInputDecoration( + context), + onFieldSubmitted: (_) { + FocusScope.of(context) + .requestFocus( + focusD4); + }, + onChanged: (val) { + if (val.length == 1) { + verifyAccountFormValue[ + 'digit4'] = + val.trim(); + //checkValue(); + } + }, + // validator: + // validateCodeDigit, + )), + ], + )), + ), + ), + Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + mainAxisAlignment: + MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .validationMessage + + ' ', + fontWeight: FontWeight.w600, + fontSize: 14, + ), + // AppText( + // displayTime, + // color: Colors.red, + // textAlign: TextAlign.start, + // fontWeight: FontWeight.bold, + // fontSize: 14, + // ) + ]), + ) + ], + ))), + ], + ), + ], + ), + ), + ), + ) + ], + ), + bottomSheet: isSendOtp + ? Container( + height: 60, + margin: EdgeInsets.symmetric(vertical: 16, horizontal: 16), + child: Row( + children: [ + Expanded( + child: Container( + child: AppButton( + title: TranslationBase.of(context).cancel, + hasBorder: true, + vPadding: 12, + hPadding: 8, + borderColor: Color(0xFFeaeaea), + color: Color(0xFFeaeaea), + fontColor: Colors.black, + fontSize: 2.2, + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ), + ), + SizedBox( + width: 8, + ), + Expanded( + child: Container( + child: AppButton( + title: TranslationBase.of(context).next, + hasBorder: true, + vPadding: 12, + hPadding: 8, + borderColor: Color(0xFFB8382B), + color: HexColor("#D02127"), + fontColor: Colors.white, + fontSize: 2.0, + onPressed: () async { + GifLoaderDialogUtils.showMyDialog(context); + await widget.model.checkActivationCode( + "${digit1.text}${digit2.text}${digit3.text}${digit4.text}"); + if (widget.model.state == ViewState.ErrorLocal) { + Helpers.showErrorToast(widget.model.error); + //TODO Elham* remove this + widget.changePageViewIndex(2); + GifLoaderDialogUtils.hideDialog(context); + } else { + GifLoaderDialogUtils.hideDialog(context); + widget.changePageViewIndex(2); + } + }, + ), + ), + ), + ], + ), + ) + : null); + } + + sendActivationCode(type) async { + GifLoaderDialogUtils.showMyDialog(context); + await widget.model.sendActivationCodeByOTPNotificationType(otpType: type); + + if (widget.model.state == ViewState.ErrorLocal) { + Helpers.showErrorToast(widget.model.error); + GifLoaderDialogUtils.hideDialog(context); + // TODO Elham* retuen the else + setState(() { + isSendOtp = false; + }); + } else { + setState(() { + isSendOtp = true; + }); + } + } + + InputDecoration buildInputDecoration(BuildContext context) { + return InputDecoration( + counterText: " ", + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(10)), + borderSide: BorderSide(color: Colors.grey[300]), + ), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(10.0)), + borderSide: BorderSide(color: Colors.grey[300]), + ), + errorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(10.0)), + borderSide: BorderSide(color: Colors.grey[300]), + ), + focusedErrorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(10.0)), + borderSide: BorderSide(color: Theme.of(context).errorColor), + ), + ); + } +} diff --git a/lib/screens/prescription/add_prescription_form.dart b/lib/screens/prescription/add_prescription_form.dart index 9cd5121a..8c07afcf 100644 --- a/lib/screens/prescription/add_prescription_form.dart +++ b/lib/screens/prescription/add_prescription_form.dart @@ -37,7 +37,8 @@ import 'package:provider/provider.dart'; import 'package:speech_to_text/speech_recognition_error.dart'; import 'package:speech_to_text/speech_to_text.dart' as stt; -addPrescriptionForm(context, PrescriptionViewModel model, PatiantInformtion patient, prescription) { +addPrescriptionForm(context, PrescriptionViewModel model, + PatiantInformtion patient, prescription) { showModalBottomSheet( isScrollControlled: true, context: context, @@ -62,7 +63,8 @@ postPrescription( String icdCode, PatiantInformtion patient, String patientType}) async { - PostPrescriptionReqModel postProcedureReqModel = new PostPrescriptionReqModel(); + PostPrescriptionReqModel postProcedureReqModel = + new PostPrescriptionReqModel(); List prescriptionList = List(); postProcedureReqModel.appointmentNo = patient.appointmentNo; @@ -126,7 +128,8 @@ class _PrescriptionFormWidgetState extends State { DateTime selectedDate; int strengthChar; GetMedicationResponseModel _selectedMedication; - GlobalKey key = new GlobalKey>(); + GlobalKey key = + new GlobalKey>(); TextEditingController drugIdController = TextEditingController(); TextEditingController doseController = TextEditingController(); @@ -170,7 +173,8 @@ class _PrescriptionFormWidgetState extends State { onVoiceText() async { new SpeechToText(context: context).showAlertDialog(context); var lang = TranslationBase.of(AppGlobal.CONTEX).locale.languageCode; - bool available = await speech.initialize(onStatus: statusListener, onError: errorListener); + bool available = await speech.initialize( + onStatus: statusListener, onError: errorListener); if (available) { speech.listen( onResult: resultListener, @@ -213,7 +217,8 @@ class _PrescriptionFormWidgetState extends State { } Future initSpeechState() async { - bool hasSpeech = await speech.initialize(onError: errorListener, onStatus: statusListener); + bool hasSpeech = await speech.initialize( + onError: errorListener, onStatus: statusListener); print(hasSpeech); if (!mounted) return; } @@ -259,13 +264,15 @@ class _PrescriptionFormWidgetState extends State { initialChildSize: 0.98, maxChildSize: 0.98, minChildSize: 0.9, - builder: (BuildContext context, ScrollController scrollController) { + builder: + (BuildContext context, ScrollController scrollController) { return SingleChildScrollView( child: Container( height: MediaQuery.of(context).size.height * 1.65, color: Color(0xffF8F8F8), child: Padding( - padding: EdgeInsets.symmetric(horizontal: 12.0, vertical: 10.0), + padding: EdgeInsets.symmetric( + horizontal: 12.0, vertical: 10.0), child: Column( children: [ Column( @@ -287,8 +294,11 @@ class _PrescriptionFormWidgetState extends State { widthFactor: 0.9, child: Container( decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(6.0)), - border: Border.all(width: 1.0, color: HexColor("#CCCCCC"))), + borderRadius: BorderRadius.all( + Radius.circular(6.0)), + border: Border.all( + width: 1.0, + color: HexColor("#CCCCCC"))), padding: EdgeInsets.all(10), child: AppTextFormField( onTap: () { @@ -296,7 +306,8 @@ class _PrescriptionFormWidgetState extends State { visbiltySearch = true; }, borderColor: Colors.white, - hintText: TranslationBase.of(context).searchMedicineNameHere, + hintText: TranslationBase.of(context) + .searchMedicineNameHere, controller: myController, onSaved: (value) {}, onFieldSubmitted: (value) { @@ -322,9 +333,12 @@ class _PrescriptionFormWidgetState extends State { children: [ // TODO change it secondary button and add loading AppButton( - title: TranslationBase.of(context).search, + title: TranslationBase.of( + context) + .search, onPressed: () async { - await searchMedicine(context, model); + await searchMedicine( + context, model); }, ), ], @@ -333,23 +347,44 @@ class _PrescriptionFormWidgetState extends State { ), if (myController.text != '') Container( - height: MediaQuery.of(context).size.height * 0.5, + height: MediaQuery.of(context) + .size + .height * + 0.5, child: ListView.builder( - padding: const EdgeInsets.only(top: 20), + padding: const EdgeInsets.only( + top: 20), scrollDirection: Axis.vertical, - itemCount: model.allMedicationList == null - ? 0 - : model.allMedicationList.length, - itemBuilder: (BuildContext context, int index) { + itemCount: + model.allMedicationList == + null + ? 0 + : model + .allMedicationList + .length, + itemBuilder: + (BuildContext context, + int index) { return InkWell( child: MedicineItemWidget( - label: model.allMedicationList[index].description), + label: model + .allMedicationList[ + index] + .description), onTap: () { - model.getItem(itemID: model.allMedicationList[index].itemId); - visbiltyPrescriptionForm = true; + model.getItem( + itemID: model + .allMedicationList[ + index] + .itemId); + visbiltyPrescriptionForm = + true; visbiltySearch = false; - _selectedMedication = model.allMedicationList[index]; - uom = _selectedMedication.uom; + _selectedMedication = + model.allMedicationList[ + index]; + uom = _selectedMedication + .uom; }, ); }, @@ -368,53 +403,68 @@ class _PrescriptionFormWidgetState extends State { child: Column( children: [ AppText( - _selectedMedication?.description ?? "", + _selectedMedication?.description ?? + "", bold: true, ), Container( child: Row( children: [ AppText( - TranslationBase.of(context).orderType, + TranslationBase.of(context) + .orderType, fontWeight: FontWeight.w600, ), Radio( - activeColor: Color(0xFFB9382C), + activeColor: + Color(0xFFB9382C), value: 1, groupValue: selectedType, onChanged: (value) { setSelectedType(value); }, ), - Text(TranslationBase.of(context).regular), + Text(TranslationBase.of(context) + .regular), ], ), ), - SizedBox(height: spaceBetweenTextFileds), + SizedBox( + height: spaceBetweenTextFileds), Container( width: double.infinity, child: Row( children: [ Container( - width: MediaQuery.of(context).size.width * 0.35, + width: MediaQuery.of(context) + .size + .width * + 0.35, child: AppTextFieldCustom( - height: 40, - validationError: strengthError, + //height: 40, + validationError: + strengthError, hintText: 'Strength', isTextFieldHasSuffix: false, enabled: true, - controller: strengthController, + controller: + strengthController, onChanged: (String value) { setState(() { - strengthChar = value.length; + strengthChar = + value.length; }); if (strengthChar >= 5) { - DrAppToastMsg.showErrorToast( - TranslationBase.of(context).only5DigitsAllowedForStrength, + DrAppToastMsg + .showErrorToast( + TranslationBase.of( + context) + .only5DigitsAllowedForStrength, ); } }, - inputType: TextInputType.numberWithOptions( + inputType: TextInputType + .numberWithOptions( decimal: true, ), ), @@ -423,15 +473,23 @@ class _PrescriptionFormWidgetState extends State { width: 5.0, ), PrescriptionTextFiled( - width: MediaQuery.of(context).size.width * 0.517, - element: model.itemMedicineListUnit.length == 1 - ? model.itemMedicineListUnit[0] + width: MediaQuery.of(context) + .size + .width * + 0.510, + element: model + .itemMedicineListUnit + .length == + 1 + ? model + .itemMedicineListUnit[0] : units, elementError: unitError, keyName: 'description', keyId: 'parameterCode', - hintText: 'Select', - elementList: model.itemMedicineListUnit, + hintText: 'Unit', + elementList: model + .itemMedicineListUnit, okFunction: (selectedValue) { setState(() { units = selectedValue; @@ -442,10 +500,14 @@ class _PrescriptionFormWidgetState extends State { ], ), ), - SizedBox(height: spaceBetweenTextFileds), + SizedBox( + height: spaceBetweenTextFileds), PrescriptionTextFiled( - elementList: model.itemMedicineListRoute, - element: model.itemMedicineListRoute.length == 1 + elementList: + model.itemMedicineListRoute, + element: model.itemMedicineListRoute + .length == + 1 ? model.itemMedicineListRoute[0] : route, elementError: routeError, @@ -457,40 +519,58 @@ class _PrescriptionFormWidgetState extends State { route['isDefault'] = true; }); }, - hintText: TranslationBase.of(context).route, + hintText: + TranslationBase.of(context) + .route, ), - SizedBox(height: spaceBetweenTextFileds), + SizedBox( + height: spaceBetweenTextFileds), PrescriptionTextFiled( - hintText: TranslationBase.of(context).frequency, + hintText: + TranslationBase.of(context) + .frequency, elementError: frequencyError, element: frequency, - elementList: model.itemMedicineList, + elementList: + model.itemMedicineList, keyId: 'parameterCode', keyName: 'description', okFunction: (selectedValue) { setState(() { frequency = selectedValue; frequency['isDefault'] = true; - if (_selectedMedication != null && + if (_selectedMedication != + null && duration != null && frequency != null && - strengthController.text != null) { + strengthController.text != + null) { model.getBoxQuantity( - freq: frequency['parameterCode'], - duration: duration['id'], - itemCode: _selectedMedication.itemId, - strength: double.parse(strengthController.text)); + freq: frequency[ + 'parameterCode'], + duration: + duration['id'], + itemCode: + _selectedMedication + .itemId, + strength: double.parse( + strengthController + .text)); return; } }); }), - SizedBox(height: spaceBetweenTextFileds), + SizedBox( + height: spaceBetweenTextFileds), PrescriptionTextFiled( - hintText: TranslationBase.of(context).doseTime, + hintText: + TranslationBase.of(context) + .doseTime, elementError: doseTimeError, element: doseTime, - elementList: model.medicationDoseTimeList, + elementList: + model.medicationDoseTimeList, keyId: 'id', keyName: 'nameEn', okFunction: (selectedValue) { @@ -498,8 +578,10 @@ class _PrescriptionFormWidgetState extends State { doseTime = selectedValue; }); }), - SizedBox(height: spaceBetweenTextFileds), - if (model.patientAssessmentList.isNotEmpty) + SizedBox( + height: spaceBetweenTextFileds), + if (model + .patientAssessmentList.isNotEmpty) Container( height: screenSize.height * 0.070, width: double.infinity, @@ -507,25 +589,49 @@ class _PrescriptionFormWidgetState extends State { child: Row( children: [ Container( - width: MediaQuery.of(context).size.width * 0.29, + width: + MediaQuery.of(context) + .size + .width * + 0.29, child: TextField( - decoration: textFieldSelectorDecoration( - model.patientAssessmentList[0].icdCode10ID.toString(), - indication != null ? indication['name'] : null, - false), + decoration: + textFieldSelectorDecoration( + model + .patientAssessmentList[ + 0] + .icdCode10ID + .toString(), + indication != null + ? indication[ + 'name'] + : null, + false), enabled: true, readOnly: true, ), ), Container( - width: MediaQuery.of(context).size.width * 0.59, + width: + MediaQuery.of(context) + .size + .width * + 0.57, color: Colors.white, child: TextField( maxLines: 5, - decoration: textFieldSelectorDecoration( - model.patientAssessmentList[0].asciiDesc.toString(), - indication != null ? indication['name'] : null, - false), + decoration: + textFieldSelectorDecoration( + model + .patientAssessmentList[ + 0] + .asciiDesc + .toString(), + indication != null + ? indication[ + 'name'] + : null, + false), enabled: true, readOnly: true, ), @@ -533,47 +639,63 @@ class _PrescriptionFormWidgetState extends State { ], ), ), - SizedBox(height: spaceBetweenTextFileds), + SizedBox( + height: spaceBetweenTextFileds), Container( height: screenSize.height * 0.070, color: Colors.white, child: InkWell( - onTap: () => selectDate(context, widget.model), + onTap: () => selectDate( + context, widget.model), child: TextField( - decoration: textFieldSelectorDecoration( - TranslationBase.of(context).date, - selectedDate != null - ? "${AppDateUtils.convertStringToDateFormat(selectedDate.toString(), "yyyy-MM-dd")}" - : null, - true, - suffixIcon: Icon( - Icons.calendar_today, - color: Colors.black, - )), + decoration: + textFieldSelectorDecoration( + TranslationBase.of( + context) + .date, + selectedDate != null + ? "${AppDateUtils.convertStringToDateFormat(selectedDate.toString(), "yyyy-MM-dd")}" + : null, + true, + suffixIcon: Icon( + Icons.calendar_today, + color: Colors.black, + )), enabled: false, ), ), ), - SizedBox(height: spaceBetweenTextFileds), + SizedBox( + height: spaceBetweenTextFileds), PrescriptionTextFiled( element: duration, elementError: durationError, - hintText: TranslationBase.of(context).duration, - elementList: model.medicationDurationList, + hintText: + TranslationBase.of(context) + .duration, + elementList: + model.medicationDurationList, keyName: 'nameEn', keyId: 'id', okFunction: (selectedValue) { setState(() { duration = selectedValue; - if (_selectedMedication != null && + if (_selectedMedication != + null && duration != null && frequency != null && - strengthController.text != null) { + strengthController.text != + null) { model.getBoxQuantity( - freq: frequency['parameterCode'], + freq: frequency[ + 'parameterCode'], duration: duration['id'], - itemCode: _selectedMedication.itemId, - strength: double.parse(strengthController.text), + itemCode: + _selectedMedication + .itemId, + strength: double.parse( + strengthController + .text), ); box = model.boxQuintity; @@ -582,38 +704,53 @@ class _PrescriptionFormWidgetState extends State { }); }, ), - SizedBox(height: spaceBetweenTextFileds), + SizedBox( + height: spaceBetweenTextFileds), Container( color: Colors.white, child: AppTextFieldCustom( hintText: "UOM", isTextFieldHasSuffix: false, - dropDownText: uom != null ? uom : null, + dropDownText: + uom != null ? uom : null, enabled: false, ), ), - SizedBox(height: spaceBetweenTextFileds), + SizedBox( + height: spaceBetweenTextFileds), Container( color: Colors.white, child: AppTextFieldCustom( - hintText: TranslationBase.of(context).boxQuantity, + hintText: + TranslationBase.of(context) + .boxQuantity, isTextFieldHasSuffix: false, - dropDownText: box != null ? model.boxQuintity.toString() : null, + dropDownText: box != null + ? model.boxQuintity.toString() + : null, enabled: false, ), ), - SizedBox(height: spaceBetweenTextFileds), + SizedBox( + height: spaceBetweenTextFileds), Container( decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(6.0)), - border: Border.all(width: 1.0, color: HexColor("#CCCCCC"))), + borderRadius: BorderRadius.all( + Radius.circular(6.0)), + border: Border.all( + width: 1.0, + color: + HexColor("#CCCCCC"))), child: Stack( children: [ TextFields( maxLines: 6, minLines: 4, - hintText: TranslationBase.of(context).instruction, - controller: instructionController, + hintText: TranslationBase.of( + context) + .instruction, + controller: + instructionController, //keyboardType: TextInputType.number, ), Positioned( @@ -626,51 +763,77 @@ class _PrescriptionFormWidgetState extends State { size: 35, ), onPressed: () { - initSpeechState().then((value) => {onVoiceText()}); + initSpeechState().then( + (value) => + {onVoiceText()}); }, ), ), ], ), ), - SizedBox(height: spaceBetweenTextFileds), + SizedBox( + height: spaceBetweenTextFileds), Container( - margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5), + margin: EdgeInsets.all( + SizeConfig.widthMultiplier * 5), child: Wrap( alignment: WrapAlignment.center, children: [ AppButton( color: Color(0xff359846), - title: TranslationBase.of(context).addMedication, + title: TranslationBase.of( + context) + .addMedication, fontWeight: FontWeight.w600, onPressed: () async { - await locator().logEvent( - eventCategory: "Add Prescription Form", - eventAction: "Add Prescription", + await locator< + AnalyticsService>() + .logEvent( + eventCategory: + "Add Prescription Form", + eventAction: + "Add Prescription", ); if (duration != null && doseTime != null && frequency != null && selectedDate != null && - strengthController.text != "") { - if (_selectedMedication.isNarcotic == true) { - DrAppToastMsg.showErrorToast(TranslationBase.of(context) - .narcoticMedicineCanOnlyBePrescribedFromVida); + strengthController + .text != + "") { + if (_selectedMedication + .isNarcotic == + true) { + DrAppToastMsg.showErrorToast( + TranslationBase.of( + context) + .narcoticMedicineCanOnlyBePrescribedFromVida); Navigator.pop(context); return; } - if (double.parse(strengthController.text) > 1000.0) { - DrAppToastMsg.showErrorToast( - "1000 is the MAX for the strength"); + if (double.parse( + strengthController + .text) > + 1000.0) { + DrAppToastMsg + .showErrorToast( + "1000 is the MAX for the strength"); return; } - if (double.parse(strengthController.text) < 0.0) { - DrAppToastMsg.showErrorToast("strength can't be zero"); + if (double.parse( + strengthController + .text) < + 0.0) { + DrAppToastMsg + .showErrorToast( + "strength can't be zero"); return; } - if (formKey.currentState.validate()) { + if (formKey.currentState + .validate()) { Navigator.pop(context); openDrugToDrug(model); { @@ -759,32 +922,52 @@ class _PrescriptionFormWidgetState extends State { } else { setState(() { if (duration == null) { - durationError = TranslationBase.of(context).fieldRequired; + durationError = + TranslationBase.of( + context) + .fieldRequired; } else { durationError = null; } if (doseTime == null) { - doseTimeError = TranslationBase.of(context).fieldRequired; + doseTimeError = + TranslationBase.of( + context) + .fieldRequired; } else { doseTimeError = null; } if (route == null) { - routeError = TranslationBase.of(context).fieldRequired; + routeError = + TranslationBase.of( + context) + .fieldRequired; } else { routeError = null; } if (frequency == null) { - frequencyError = TranslationBase.of(context).fieldRequired; + frequencyError = + TranslationBase.of( + context) + .fieldRequired; } else { frequencyError = null; } if (units == null) { - unitError = TranslationBase.of(context).fieldRequired; + unitError = + TranslationBase.of( + context) + .fieldRequired; } else { unitError = null; } - if (strengthController.text == "") { - strengthError = TranslationBase.of(context).fieldRequired; + if (strengthController + .text == + "") { + strengthError = + TranslationBase.of( + context) + .fieldRequired; } else { strengthError = null; } @@ -834,7 +1017,8 @@ class _PrescriptionFormWidgetState extends State { } } - InputDecoration textFieldSelectorDecoration(String hintText, String selectedText, bool isDropDown, + InputDecoration textFieldSelectorDecoration( + String hintText, String selectedText, bool isDropDown, {Icon suffixIcon}) { return InputDecoration( focusedBorder: OutlineInputBorder( @@ -885,7 +1069,9 @@ class _PrescriptionFormWidgetState extends State { child: Column( // mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - DrugToDrug(widget.patient, getPriscriptionforDrug(widget.prescriptionList, model), + DrugToDrug( + widget.patient, + getPriscriptionforDrug(widget.prescriptionList, model), model.patientAssessmentList), Container( margin: EdgeInsets.all(SizeConfig.widthMultiplier * 3), @@ -896,23 +1082,28 @@ class _PrescriptionFormWidgetState extends State { postPrescription( icdCode: model.patientAssessmentList.isNotEmpty - ? model.patientAssessmentList[0].icdCode10ID.isEmpty + ? model.patientAssessmentList[0].icdCode10ID + .isEmpty ? "test" - : model.patientAssessmentList[0].icdCode10ID.toString() + : model.patientAssessmentList[0].icdCode10ID + .toString() : "test", dose: strengthController.text, doseUnit: model.itemMedicineListUnit.length == 1 - ? model.itemMedicineListUnit[0]['parameterCode'].toString() + ? model.itemMedicineListUnit[0]['parameterCode'] + .toString() : units['parameterCode'].toString(), patient: widget.patient, doseTimeIn: doseTime['id'].toString(), model: widget.model, duration: duration['id'].toString(), frequency: model.itemMedicineList.length == 1 - ? model.itemMedicineList[0]['parameterCode'].toString() + ? model.itemMedicineList[0]['parameterCode'] + .toString() : frequency['parameterCode'].toString(), route: model.itemMedicineListRoute.length == 1 - ? model.itemMedicineListRoute[0]['parameterCode'].toString() + ? model.itemMedicineListRoute[0]['parameterCode'] + .toString() : route['parameterCode'].toString(), drugId: _selectedMedication.itemId.toString(), strength: strengthController.text, @@ -931,7 +1122,8 @@ class _PrescriptionFormWidgetState extends State { }); } - getPriscriptionforDrug(List prescriptionList, MedicineViewModel model) { + getPriscriptionforDrug( + List prescriptionList, MedicineViewModel model) { var prescriptionDetails = []; if (prescriptionList.length > 0) { prescriptionList[0].entityList.forEach((element) { diff --git a/lib/screens/prescription/prescriptions_page.dart b/lib/screens/prescription/prescriptions_page.dart index 905ee09a..d61ac08d 100644 --- a/lib/screens/prescription/prescriptions_page.dart +++ b/lib/screens/prescription/prescriptions_page.dart @@ -7,6 +7,7 @@ import 'package:doctor_app_flutter/screens/procedures/ProcedureType.dart'; import 'package:doctor_app_flutter/screens/procedures/base_add_procedure_tab_page.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/patient_service_title.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; @@ -15,6 +16,7 @@ import 'package:doctor_app_flutter/widgets/shared/doctor_card.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:doctor_app_flutter/widgets/shared/user-guid/in_patient_doctor_card.dart'; import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; +import 'package:doctor_app_flutter/widgets/transitions/slide_up_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -49,62 +51,54 @@ class PrescriptionsPage extends StatelessWidget { SizedBox( height: 12, ), - if (model.prescriptionsList.isNotEmpty && patient.patientStatusType != 43) + if (model.prescriptionsList.isNotEmpty && + patient.patientStatusType != 43) Padding( padding: const EdgeInsets.all(8.0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - AppText( - TranslationBase.of(context).orders, - style: "caption2", - color: Colors.black, - fontSize: 13, - ), - AppText( - TranslationBase.of(context).prescriptions, - bold: true, - fontSize: 22, + ServiceTitle( + title: TranslationBase.of(context).orders, + subTitle: + TranslationBase.of(context).prescriptions, ), ], ), ), - if (patient.patientStatusType != null && patient.patientStatusType == 43) + if (patient.patientStatusType != null && + patient.patientStatusType == 43) Padding( padding: const EdgeInsets.all(8.0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - AppText( - TranslationBase.of(context).orders, - style: "caption2", - color: Colors.black, - fontSize: 13, - ), - AppText( - TranslationBase.of(context).prescriptions, - bold: true, - fontSize: 22, + ServiceTitle( + title: TranslationBase.of(context).orders, + subTitle: + TranslationBase.of(context).prescriptions, ), ], ), ), - if ((patient.patientStatusType != null && patient.patientStatusType == 43) || + if ((patient.patientStatusType != null && + patient.patientStatusType == 43) || (isFromLiveCare && patient.appointmentNo != null)) AddNewOrder( onTap: () { Navigator.push( context, - MaterialPageRoute( - builder: (context) => BaseAddProcedureTabPage( - patient: patient, - prescriptionModel: model, - procedureType: ProcedureType.PRESCRIPTION, - ), - settings: RouteSettings(name: 'AddProcedureTabPage')), + SlideUpPageRoute( + widget: BaseAddProcedureTabPage( + patient: patient, + prescriptionModel: model, + procedureType: ProcedureType.PRESCRIPTION, + ), + settingRoute: 'AddProcedureTabPage'), ); }, - label: TranslationBase.of(context).applyForNewPrescriptionsOrder, + label: TranslationBase.of(context) + .applyForNewPrescriptionsOrder, ), ...List.generate( model.prescriptionsList.length, @@ -113,7 +107,8 @@ class PrescriptionsPage extends StatelessWidget { context, FadePage( page: PrescriptionItemsPage( - prescriptions: model.prescriptionsList[index], + prescriptions: + model.prescriptionsList[index], patient: patient, patientType: patientType, arrivalType: arrivalType, @@ -121,16 +116,22 @@ class PrescriptionsPage extends StatelessWidget { ), ), child: DoctorCard( - doctorName: model.prescriptionsList[index].doctorName, - profileUrl: model.prescriptionsList[index].doctorImageURL, + doctorName: + model.prescriptionsList[index].doctorName, + profileUrl: model + .prescriptionsList[index].doctorImageURL, branch: model.prescriptionsList[index].name, - clinic: model.prescriptionsList[index].clinicDescription, + clinic: model.prescriptionsList[index] + .clinicDescription, isPrescriptions: true, - appointmentDate: AppDateUtils.getDateTimeFromServerFormat( - model.prescriptionsList[index].appointmentDate, + appointmentDate: + AppDateUtils.getDateTimeFromServerFormat( + model.prescriptionsList[index] + .appointmentDate, ), ))), - if (model.prescriptionsList.isEmpty && patient.patientStatusType != 43) + if (model.prescriptionsList.isEmpty && + patient.patientStatusType != 43) Center( child: Column( crossAxisAlignment: CrossAxisAlignment.center, @@ -141,7 +142,8 @@ class PrescriptionsPage extends StatelessWidget { Image.asset('assets/images/no-data.png'), Padding( padding: const EdgeInsets.all(8.0), - child: AppText(TranslationBase.of(context).noPrescriptionsFound), + child: AppText(TranslationBase.of(context) + .noPrescriptionsFound), ) ], ), @@ -156,12 +158,9 @@ class PrescriptionsPage extends StatelessWidget { child: ListView( physics: BouncingScrollPhysics(), children: [ - // SizedBox( - // height: 12, - // ), - ListView.builder( scrollDirection: Axis.vertical, + physics: NeverScrollableScrollPhysics(), shrinkWrap: true, itemCount: model.medicationForInPatient.length, itemBuilder: (context, index) { @@ -170,31 +169,49 @@ class PrescriptionsPage extends StatelessWidget { onTap: () => Navigator.push( context, FadePage( - page: PrescriptionItemsInPatientPage( + page: + PrescriptionItemsInPatientPage( prescriptionIndex: index, - prescriptions: model.medicationForInPatient[index], + prescriptions: + model.medicationForInPatient[ + index], patient: patient, patientType: patientType, arrivalType: arrivalType, - startOn: AppDateUtils.getDateTimeFromServerFormat( - model.medicationForInPatient[index].startDatetime, + startOn: AppDateUtils + .getDateTimeFromServerFormat( + model + .medicationForInPatient[ + index] + .startDatetime, ), - stopOn: AppDateUtils.getDateTimeFromServerFormat( - model.medicationForInPatient[index].stopDatetime, + stopOn: AppDateUtils + .getDateTimeFromServerFormat( + model + .medicationForInPatient[ + index] + .stopDatetime, ), ), ), ), child: InPatientDoctorCard( - doctorName: model.medicationForInPatient[index].pHRItemDescription, + doctorName: model + .medicationForInPatient[index] + .pHRItemDescription, profileUrl: 'sss', branch: 'hamza', clinic: 'basheer', isPrescriptions: true, - appointmentDate: AppDateUtils.getDateTimeFromServerFormat( - model.medicationForInPatient[index].prescriptionDatetime, + appointmentDate: AppDateUtils + .getDateTimeFromServerFormat( + model.medicationForInPatient[index] + .prescriptionDatetime, ), - createdBy: model.medicationForInPatient[index].doctorName.toString(), + createdBy: model + .medicationForInPatient[index] + .doctorName + .toString(), )); }), if (model.medicationForInPatient.length == 0) @@ -208,7 +225,8 @@ class PrescriptionsPage extends StatelessWidget { Image.asset('assets/images/no-data.png'), Padding( padding: const EdgeInsets.all(8.0), - child: AppText(TranslationBase.of(context).noPrescriptionsFound), + child: AppText(TranslationBase.of(context) + .noPrescriptionsFound), ) ], ), diff --git a/lib/screens/procedures/procedure_screen.dart b/lib/screens/procedures/procedure_screen.dart index de356935..79fb961c 100644 --- a/lib/screens/procedures/procedure_screen.dart +++ b/lib/screens/procedures/procedure_screen.dart @@ -11,6 +11,7 @@ import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/transitions/slide_up_page.dart'; import 'package:flutter/material.dart'; import 'ProcedureCard.dart'; @@ -99,13 +100,13 @@ class ProcedureScreen extends StatelessWidget { onTap: () { Navigator.push( context, - MaterialPageRoute( - builder: (context) => BaseAddProcedureTabPage( - patient: patient, - model: model, - procedureType: ProcedureType.PROCEDURE, - ), - settings: RouteSettings(name: 'AddProcedureTabPage')), + SlideUpPageRoute( + widget: BaseAddProcedureTabPage( + patient: patient, + model: model, + procedureType: ProcedureType.PROCEDURE, + ), + settingRoute: 'AddProcedureTabPage'), ); }, child: Container( diff --git a/lib/screens/procedures/update-procedure.dart b/lib/screens/procedures/update-procedure.dart index 24c4ea41..a11ac875 100644 --- a/lib/screens/procedures/update-procedure.dart +++ b/lib/screens/procedures/update-procedure.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/model/procedure/ControlsModel.dart'; @@ -324,7 +325,7 @@ class _UpdateProcedureWidgetState extends State { ), AppButton( title: TranslationBase.of(context).cancel, - color: Color(0xFFB9382C), + color: AppGlobal.appRedColor, onPressed: () { Navigator.pop(context); }, diff --git a/lib/screens/reschedule-leaves/add-rescheduleleave.dart b/lib/screens/reschedule-leaves/add-rescheduleleave.dart index f6e1b8d7..db8a0140 100644 --- a/lib/screens/reschedule-leaves/add-rescheduleleave.dart +++ b/lib/screens/reschedule-leaves/add-rescheduleleave.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/service/AnalyticsService.dart'; import 'package:doctor_app_flutter/core/viewModel/leave_rechdule_response.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; @@ -62,7 +63,7 @@ class AddRescheduleLeavScreen extends StatelessWidget { : item.status == 2 ? HexColor('#CC9B14') : item.status == 9 - ? Colors.green + ? AppGlobal.appGreenColor : Colors.red, width: 5.0, ))), @@ -89,7 +90,7 @@ class AddRescheduleLeavScreen extends StatelessWidget { : item.status == 2 ? HexColor('#CC9B14') : item.status == 9 - ? Colors.green + ? AppGlobal.appGreenColor : Colors.red, fontSize: 14, ), @@ -174,7 +175,7 @@ class AddRescheduleLeavScreen extends StatelessWidget { (item.status == 2) ? IconButton( icon: Image.asset('assets/images/edit.png'), - // color: Colors.green, //Colors.black, + // color: AppGlobal.appGreenColor, //Colors.black, onPressed: () => {openLeave(context, true, extendedData: item)}, ) : SizedBox(), diff --git a/lib/util/date-utils.dart b/lib/util/date-utils.dart index 89564833..a10a18e3 100644 --- a/lib/util/date-utils.dart +++ b/lib/util/date-utils.dart @@ -24,6 +24,10 @@ class AppDateUtils { return convertDateToFormat(dateTime, dateFormat); } + static String convertToServerFormat(String date, String dateFormat){ + return '/Date(${DateFormat(dateFormat).parse(date).millisecondsSinceEpoch})/'; + } + static convertDateFromServerFormat(String str, dateFormat) { var date = getDateTimeFromServerFormat(str); diff --git a/lib/util/dr_app_toast_msg.dart b/lib/util/dr_app_toast_msg.dart index 1f2ebe8f..76950ae5 100644 --- a/lib/util/dr_app_toast_msg.dart +++ b/lib/util/dr_app_toast_msg.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/config/config.dart'; import 'package:flutter/material.dart'; import 'package:flutter_flexible_toast/flutter_flexible_toast.dart'; @@ -13,7 +14,7 @@ class DrAppToastMsg { FlutterFlexibleToast.showToast( message: msg, toastLength: Toast.LENGTH_SHORT, - backgroundColor: Colors.green, + backgroundColor: AppGlobal.appGreenColor, icon: ICON.SUCCESS, fontSize: 16, imageSize: 35, diff --git a/lib/util/helpers.dart b/lib/util/helpers.dart index f8f0fbd3..42816f9f 100644 --- a/lib/util/helpers.dart +++ b/lib/util/helpers.dart @@ -2,6 +2,7 @@ import 'package:connectivity/connectivity.dart'; import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/core/model/hospitals/get_hospitals_response_model.dart'; +import 'package:doctor_app_flutter/core/service/NavigationService.dart'; import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/models/doctor/list_doctor_working_hours_table_model.dart'; @@ -14,9 +15,11 @@ import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:html/parser.dart'; +import 'package:intl/intl.dart'; import '../UpdatePage.dart'; import '../config/size_config.dart'; +import '../locator.dart'; import '../util/dr_app_toast_msg.dart'; import 'dr_app_shared_pref.dart'; @@ -47,7 +50,7 @@ class Helpers { onPressed: okFunction, title: TranslationBase.of(context).noteConfirm, fontColor: Colors.white, - color: Colors.green[600], + color: AppGlobal.appGreenColor, ), AppButton( onPressed: () { @@ -187,17 +190,43 @@ class Helpers { await sharedPref.clear(); } + static getCardBoxDecoration() { + return BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + shape: BoxShape.rectangle, + boxShadow: [ + BoxShadow( + color: Color(0xFF0000000D), + spreadRadius: 10, + blurRadius: 27, + offset: Offset(0, -3), // changes position of shadow + ), + ], + ); + } + navigateToUpdatePage(String message, String androidLink, iosLink) { - Navigator.pushAndRemoveUntil( - AppGlobal.CONTEX, - FadePage( - page: UpdatePage( - message: message, - androidLink: androidLink, - iosLink: iosLink, - ), + locator().pushAndRemoveUntil( + FadePage( + page: UpdatePage( + message: message, + androidLink: androidLink, + iosLink: iosLink, ), - (r) => false); + ), + ); + + // Navigator.pushAndRemoveUntil( + // AppGlobal.CONTEX, + // FadePage( + // page: UpdatePage( + // message: message, + // androidLink: androidLink, + // iosLink: iosLink, + // ), + // ), + // (r) => false); } static String parseHtmlString(String htmlString) { @@ -277,7 +306,149 @@ class Helpers { String twoDigitSeconds = twoDigits(duration.inSeconds.remainder(60)); return "$twoDigitMinutes:$twoDigitSeconds"; } - static double getTextFieldHeight(){ - return SizeConfig.heightMultiplier * (SizeConfig.isHeightVeryShort ?10:SizeConfig.isHeightShort?8:6); + + static double getTextFieldHeight() { + return SizeConfig.heightMultiplier * + (SizeConfig.isHeightVeryShort + ? 10 + : SizeConfig.isHeightShort + ? 8 + : 6); + } + + static getLabelFromKPI(String kpi) { + if (kpi.indexOf("(") > -1 && kpi.indexOf(")") > -1) + return kpi.substring(kpi.indexOf("(") + 1, kpi.indexOf(")")); + else + return ''; + } + + static getNameFromKPI(String kpi) { + if (kpi.indexOf("(") > -1) + return kpi.substring(0, kpi.indexOf("(")); + else + return kpi; + } + + static getBoxTabsBoxDecoration( + {bool isFirst = false, + bool isMiddle = false, + bool isLast = false, + bool isActive = false, + double radius = 6.0, ProjectViewModel projectViewModel}) { + return BoxDecoration( + color: isActive ? AppGlobal.appRedColor : Color(0xFFEAEAEA), + shape: BoxShape.rectangle, + borderRadius: BorderRadius.only( + topRight: projectViewModel.isArabic?Radius.circular(isActive + ? isLast || isMiddle + ? radius + : 0 + : 0):Radius.circular(isActive + ? isFirst || isMiddle + ? radius + : 0 + : 0), + + + topLeft: projectViewModel.isArabic? Radius.circular(isActive + ? isFirst || isMiddle + ? radius + : 0 + : 0):Radius.circular(isActive + ? isLast || isMiddle + ? radius + : 0 + : 0), + bottomRight: projectViewModel.isArabic? Radius.circular(isActive + ? isLast || isMiddle + ? radius + : 0 + : 0): Radius.circular(isActive + ? isFirst || isMiddle + ? radius + : 0 + : 0), + bottomLeft:projectViewModel.isArabic? Radius.circular(isActive + ? isFirst || isMiddle + ? radius + : 0 + : 0): Radius.circular(isActive + ? isLast || isMiddle + ? radius + : 0 + : 0)), + ); + } + + static getBgTabColor() { + return Color(0xFFEAEAEA); + } + + static getTabText({ + String title, + bool isActive = false, + }) { + return AppText( + title, + fontSize: SizeConfig.textMultiplier * 1.8, + color: isActive ? Colors.white : AppGlobal.appTextColor, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ); + } + + static getTabHeight(BuildContext context) { + final screenSize = MediaQuery.of(context).size; + return screenSize.height * 0.07; + } + + static getTabCounter({bool isActive: false, int counter}) { + return Container( + margin: EdgeInsets.all(4), + width: 15, + height: 15, + decoration: BoxDecoration( + color: isActive ? Colors.white : AppGlobal.appRedColor, + shape: BoxShape.circle, + ), + child: Center( + child: FittedBox( + child: AppText( + "$counter", + fontSize: SizeConfig.textMultiplier * 1.5, + color: !isActive ? Colors.white : AppGlobal.appRedColor, + fontWeight: FontWeight.w700, + ), + ), + ), + ); + } + + static String convertToTitleCase(String text) { + if (text == null) { + return null; + } + + if (text.length <= 1) { + return text.toUpperCase(); + } + + // Split string into multiple words + final List words = text.split(' '); + + // Capitalize first letter of each words + final capitalizedWords = words.map((word) { + if (word.trim().isNotEmpty) { + final String firstLetter = word.trim().substring(0, 1).toUpperCase(); + final String remainingLetters = word.trim().substring(1).toLowerCase(); + + return '$firstLetter$remainingLetters'; + } + return ''; + }); + + // Join/Merge all words back to one String + return capitalizedWords.join(' '); } } diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index 0297aa45..0c25bca7e 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -13,11 +13,13 @@ class TranslationBase { return Localizations.of(context, TranslationBase); } - String get dashboardScreenToolbarTitle => localizedValues['dashboardScreenToolbarTitle'][locale.languageCode]; + String get dashboardScreenToolbarTitle => + localizedValues['dashboardScreenToolbarTitle'][locale.languageCode]; String get settings => localizedValues['settings'][locale.languageCode]; - String get areYouSureYouWantTo => localizedValues['areYouSureYouWantTo'][locale.languageCode]; + String get areYouSureYouWantTo => + localizedValues['areYouSureYouWantTo'][locale.languageCode]; String get language => localizedValues['language'][locale.languageCode]; @@ -35,35 +37,46 @@ class TranslationBase { String get mobileNo => localizedValues['mobileNo'][locale.languageCode]; - String get replySuccessfully => localizedValues['replySuccessfully'][locale.languageCode]; + String get replySuccessfully => + localizedValues['replySuccessfully'][locale.languageCode]; - String get messagesScreenToolbarTitle => localizedValues['messagesScreenToolbarTitle'][locale.languageCode]; + String get messagesScreenToolbarTitle => + localizedValues['messagesScreenToolbarTitle'][locale.languageCode]; String get mySchedule => localizedValues['mySchedule'][locale.languageCode]; - String get errorNoSchedule => localizedValues['errorNoSchedule'][locale.languageCode]; + String get errorNoSchedule => + localizedValues['errorNoSchedule'][locale.languageCode]; String get verify => localizedValues['verify'][locale.languageCode]; - String get referralDoctor => localizedValues['referralDoctor'][locale.languageCode]; + String get referralDoctor => + localizedValues['referralDoctor'][locale.languageCode]; - String get referringClinic => localizedValues['referringClinic'][locale.languageCode]; + String get referringClinic => + localizedValues['referringClinic'][locale.languageCode]; String get frequency => localizedValues['frequency'][locale.languageCode]; String get priority => localizedValues['priority'][locale.languageCode]; - String get maxResponseTime => localizedValues['maxResponseTime'][locale.languageCode]; + String get maxResponseTime => + localizedValues['maxResponseTime'][locale.languageCode]; - String get clinicDetailsandRemarks => localizedValues['clinicDetailsandRemarks'][locale.languageCode]; + String get clinicDetailsandRemarks => + localizedValues['clinicDetailsandRemarks'][locale.languageCode]; - String get answerSuggestions => localizedValues['answerSuggestions'][locale.languageCode]; + String get answerSuggestions => + localizedValues['answerSuggestions'][locale.languageCode]; String get outPatients => localizedValues['outPatients'][locale.languageCode]; - String get searchPatient => localizedValues['searchPatient'][locale.languageCode]; - String get searchPatientDashBoard => localizedValues['searchPatientDashBoard'][locale.languageCode]; - String get searchPatientName => localizedValues['searchPatient-name'][locale.languageCode]; + String get searchPatient => + localizedValues['searchPatient'][locale.languageCode]; + String get searchPatientDashBoard => + localizedValues['searchPatientDashBoard'][locale.languageCode]; + String get searchPatientName => + localizedValues['searchPatient-name'][locale.languageCode]; String get searchAbout => localizedValues['searchAbout'][locale.languageCode]; @@ -71,9 +84,11 @@ class TranslationBase { String get patients => localizedValues['patients'][locale.languageCode]; String get labResult => localizedValues['labResult'][locale.languageCode]; - String get todayStatistics => localizedValues['todayStatistics'][locale.languageCode]; + String get todayStatistics => + localizedValues['todayStatistics'][locale.languageCode]; - String get familyMedicine => localizedValues['familyMedicine'][locale.languageCode]; + String get familyMedicine => + localizedValues['familyMedicine'][locale.languageCode]; String get arrived => localizedValues['arrived'][locale.languageCode]; @@ -91,33 +106,49 @@ class TranslationBase { String get inPatient => localizedValues['inPatient'][locale.languageCode]; String get myInPatient => localizedValues['myInPatient'][locale.languageCode]; - String get myInPatientTitle => localizedValues['myInPatientTitle'][locale.languageCode]; - String get inPatientLabel => localizedValues['inPatientLabel'][locale.languageCode]; + String get myInPatientTitle => + localizedValues['myInPatientTitle'][locale.languageCode]; + String get inPatientLabel => + localizedValues['inPatientLabel'][locale.languageCode]; - String get inPatientAll => localizedValues['inPatientAll'][locale.languageCode]; + String get inPatientAll => + localizedValues['inPatientAll'][locale.languageCode]; String get operations => localizedValues['operations'][locale.languageCode]; - String get patientServices => localizedValues['patientServices'][locale.languageCode]; + String get patientServices => + localizedValues['patientServices'][locale.languageCode]; - String get searchMedicine => localizedValues['searchMedicine'][locale.languageCode]; - String get searchMedicineDashboard => localizedValues['searchMedicineDashboard'][locale.languageCode]; + String get searchMedicine => + localizedValues['searchMedicine'][locale.languageCode]; + String get searchMedicineDashboard => + localizedValues['searchMedicineDashboard'][locale.languageCode]; - String get myReferralPatient => localizedValues['myReferralPatient'][locale.languageCode]; + String get myReferralPatient => + localizedValues['myReferralPatient'][locale.languageCode]; - String get referPatient => localizedValues['referPatient'][locale.languageCode]; + String get referPatient => + localizedValues['referPatient'][locale.languageCode]; String get myReferral => localizedValues['myReferral'][locale.languageCode]; - String get myReferredPatient => localizedValues['myReferredPatient'][locale.languageCode]; - String get referredPatient => localizedValues['referredPatient'][locale.languageCode]; + String get myReferredPatient => + localizedValues['myReferredPatient'][locale.languageCode]; + String get referredPatient => + localizedValues['referredPatient'][locale.languageCode]; String get referredOn => localizedValues['referredOn'][locale.languageCode]; String get firstName => localizedValues['firstName'][locale.languageCode]; + String get firstNameInAr => + localizedValues['firstNameInAr'][locale.languageCode]; String get middleName => localizedValues['middleName'][locale.languageCode]; + String get middleNameInAr => + localizedValues['middleNameInAr'][locale.languageCode]; String get lastName => localizedValues['lastName'][locale.languageCode]; + String get lastNameInAr => + localizedValues['lastNameInAr'][locale.languageCode]; String get phoneNumber => localizedValues['phoneNumber'][locale.languageCode]; @@ -127,19 +158,23 @@ class TranslationBase { String get search => localizedValues['search'][locale.languageCode]; - String get onlyArrivedPatient => localizedValues['onlyArrivedPatient'][locale.languageCode]; + String get onlyArrivedPatient => + localizedValues['onlyArrivedPatient'][locale.languageCode]; - String get searchMedicineNameHere => localizedValues['searchMedicineNameHere'][locale.languageCode]; + String get searchMedicineNameHere => + localizedValues['searchMedicineNameHere'][locale.languageCode]; String get youCanFind => localizedValues['youCanFind'][locale.languageCode]; - String get itemsInSearch => localizedValues['itemsInSearch'][locale.languageCode]; + String get itemsInSearch => + localizedValues['itemsInSearch'][locale.languageCode]; String get qr => localizedValues['qr'][locale.languageCode]; String get reader => localizedValues['reader'][locale.languageCode]; - String get startScanning => localizedValues['startScanning'][locale.languageCode]; + String get startScanning => + localizedValues['startScanning'][locale.languageCode]; String get scanQrCode => localizedValues['scanQrCode'][locale.languageCode]; @@ -151,17 +186,21 @@ class TranslationBase { String get clinic => localizedValues['clinic'][locale.languageCode]; - String get clinicSelect => localizedValues['clinicSelect'][locale.languageCode]; + String get clinicSelect => + localizedValues['clinicSelect'][locale.languageCode]; - String get doctorSelect => localizedValues['doctorSelect'][locale.languageCode]; + String get doctorSelect => + localizedValues['doctorSelect'][locale.languageCode]; String get hospital => localizedValues['hospital'][locale.languageCode]; String get speciality => localizedValues['speciality'][locale.languageCode]; - String get errorMessage => localizedValues['errorMessage'][locale.languageCode]; + String get errorMessage => + localizedValues['errorMessage'][locale.languageCode]; - String get patientProfile => localizedValues['patientProfile'][locale.languageCode]; + String get patientProfile => + localizedValues['patientProfile'][locale.languageCode]; String get vitalSign => localizedValues['vitalSign'][locale.languageCode]; @@ -177,15 +216,18 @@ class TranslationBase { String get medicines => localizedValues['medicines'][locale.languageCode]; - String get prescription => localizedValues['prescription'][locale.languageCode]; + String get prescription => + localizedValues['prescription'][locale.languageCode]; - String get insuranceApprovals => localizedValues['insuranceApprovals'][locale.languageCode]; + String get insuranceApprovals => + localizedValues['insuranceApprovals'][locale.languageCode]; String get insurance => localizedValues['insurance'][locale.languageCode]; String get approvals => localizedValues['approvals'][locale.languageCode]; - String get bodyMeasurements => localizedValues['bodyMeasurements'][locale.languageCode]; + String get bodyMeasurements => + localizedValues['bodyMeasurements'][locale.languageCode]; String get temperature => localizedValues['temperature'][locale.languageCode]; @@ -193,25 +235,35 @@ class TranslationBase { String get respiration => localizedValues['respiration'][locale.languageCode]; - String get bloodPressure => localizedValues['bloodPressure'][locale.languageCode]; + String get bloodPressure => + localizedValues['bloodPressure'][locale.languageCode]; String get oxygenation => localizedValues['oxygenation'][locale.languageCode]; String get painScale => localizedValues['painScale'][locale.languageCode]; - String get errorNoVitalSign => localizedValues['errorNoVitalSign'][locale.languageCode]; + String get errorNoVitalSign => + localizedValues['errorNoVitalSign'][locale.languageCode]; String get labOrders => localizedValues['labOrders'][locale.languageCode]; - String get errorNoLabOrders => localizedValues['errorNoLabOrders'][locale.languageCode]; + String get errorNoLabOrders => + localizedValues['errorNoLabOrders'][locale.languageCode]; - String get answerThePatient => localizedValues['answerThePatient'][locale.languageCode]; + String get answerThePatient => + localizedValues['answerThePatient'][locale.languageCode]; - String get pleaseEnterAnswer => localizedValues['pleaseEnterAnswer'][locale.languageCode]; + String get pleaseEnterAnswer => + localizedValues['pleaseEnterAnswer'][locale.languageCode]; String get replay => localizedValues['replay'][locale.languageCode]; - String get progressNote => localizedValues['progressNote'][locale.languageCode]; + String get progressNote => + localizedValues['progressNote'][locale.languageCode]; + String get operationReports => + localizedValues['operationReports'][locale.languageCode]; + String get reports => localizedValues['reports'][locale.languageCode]; + String get operation => localizedValues['operation'][locale.languageCode]; String get progress => localizedValues['progress'][locale.languageCode]; @@ -219,12 +271,14 @@ class TranslationBase { String get searchNote => localizedValues['searchNote'][locale.languageCode]; - String get errorNoProgressNote => localizedValues['errorNoProgressNote'][locale.languageCode]; + String get errorNoProgressNote => + localizedValues['errorNoProgressNote'][locale.languageCode]; String get invoiceNo => localizedValues['invoiceNo:'][locale.languageCode]; String get orderNo => localizedValues['orderNo'][locale.languageCode]; - String get generalResult => localizedValues['generalResult'][locale.languageCode]; + String get generalResult => + localizedValues['generalResult'][locale.languageCode]; String get description => localizedValues['description'][locale.languageCode]; @@ -234,23 +288,30 @@ class TranslationBase { String get enterId => localizedValues['enterId'][locale.languageCode]; - String get pleaseEnterYourID => localizedValues['pleaseEnterYourID'][locale.languageCode]; + String get pleaseEnterYourID => + localizedValues['pleaseEnterYourID'][locale.languageCode]; - String get enterPassword => localizedValues['enterPassword'][locale.languageCode]; + String get enterPassword => + localizedValues['enterPassword'][locale.languageCode]; - String get pleaseEnterPassword => localizedValues['pleaseEnterPassword'][locale.languageCode]; + String get pleaseEnterPassword => + localizedValues['pleaseEnterPassword'][locale.languageCode]; - String get selectYourProject => localizedValues['selectYourProject'][locale.languageCode]; + String get selectYourProject => + localizedValues['selectYourProject'][locale.languageCode]; - String get pleaseEnterYourProject => localizedValues['pleaseEnterYourProject'][locale.languageCode]; + String get pleaseEnterYourProject => + localizedValues['pleaseEnterYourProject'][locale.languageCode]; String get login => localizedValues['login'][locale.languageCode]; - String get drSulaimanAlHabib => localizedValues['drSulaimanAlHabib'][locale.languageCode]; + String get drSulaimanAlHabib => + localizedValues['drSulaimanAlHabib'][locale.languageCode]; String get welcomeTo => localizedValues['welcomeTo'][locale.languageCode]; - String get welcomeBackTo => localizedValues['welcomeBackTo'][locale.languageCode]; + String get welcomeBackTo => + localizedValues['welcomeBackTo'][locale.languageCode]; String get home => localizedValues['home'][locale.languageCode]; @@ -266,33 +327,46 @@ class TranslationBase { String get whatsAppBy => localizedValues['whatsAppBy'][locale.languageCode]; - String get pleaseChoose => localizedValues['pleaseChoose'][locale.languageCode]; + String get pleaseChoose => + localizedValues['pleaseChoose'][locale.languageCode]; String get choose => localizedValues['choose'][locale.languageCode]; - String get verification => localizedValues['verification'][locale.languageCode]; + String get verification => + localizedValues['verification'][locale.languageCode]; String get firstStep => localizedValues['firstStep'][locale.languageCode]; - String get yourAccount => localizedValues['yourAccount!'][locale.languageCode]; + String get yourAccount => + localizedValues['yourAccount!'][locale.languageCode]; String get verify1 => localizedValues['verify1'][locale.languageCode]; - String get youWillReceiveA => localizedValues['youWillReceiveA'][locale.languageCode]; + String get youWillReceiveA => + localizedValues['youWillReceiveA'][locale.languageCode]; String get loginCode => localizedValues['loginCode'][locale.languageCode]; String get smsBy => localizedValues['smsBy'][locale.languageCode]; - String get pleaseEnterTheCode => localizedValues['pleaseEnterTheCode'][locale.languageCode]; + String get pleaseEnterTheCode => + localizedValues['pleaseEnterTheCode'][locale.languageCode]; - String get youDontHaveAnyPatient => localizedValues['youDontHaveAnyPatient'][locale.languageCode]; + String get youDontHaveAnyPatient => + localizedValues['youDontHaveAnyPatient'][locale.languageCode]; - String get youDoNotHaveAnyItem => localizedValues['youDoNotHaveAnyItem'][locale.languageCode]; + String get youDoNotHaveAnyItem => + localizedValues['youDoNotHaveAnyItem'][locale.languageCode]; String get age => localizedValues['age'][locale.languageCode]; String get nationality => localizedValues['nationality'][locale.languageCode]; + String get occupation => localizedValues['occupation'][locale.languageCode]; + String get healthID => localizedValues['healthID'][locale.languageCode]; + String get identityNumber => + localizedValues['identityNumber'][locale.languageCode]; + String get maritalStatus => + localizedValues['maritalStatus'][locale.languageCode]; String get today => localizedValues['today'][locale.languageCode]; @@ -304,15 +378,18 @@ class TranslationBase { String get yesterday => localizedValues['yesterday'][locale.languageCode]; - String get errorNoInsuranceApprovals => localizedValues['errorNoInsuranceApprovals'][locale.languageCode]; + String get errorNoInsuranceApprovals => + localizedValues['errorNoInsuranceApprovals'][locale.languageCode]; - String get searchInsuranceApprovals => localizedValues['searchInsuranceApprovals'][locale.languageCode]; + String get searchInsuranceApprovals => + localizedValues['searchInsuranceApprovals'][locale.languageCode]; String get status => localizedValues['status'][locale.languageCode]; String get expiryDate => localizedValues['expiryDate'][locale.languageCode]; - String get producerName => localizedValues['producerName'][locale.languageCode]; + String get producerName => + localizedValues['producerName'][locale.languageCode]; String get receiptOn => localizedValues['receiptOn'][locale.languageCode]; @@ -330,11 +407,14 @@ class TranslationBase { String get send => localizedValues['send'][locale.languageCode]; - String get referralFrequency => localizedValues['referralFrequency'][locale.languageCode]; + String get referralFrequency => + localizedValues['referralFrequency'][locale.languageCode]; - String get selectReferralFrequency => localizedValues['selectReferralFrequency'][locale.languageCode]; + String get selectReferralFrequency => + localizedValues['selectReferralFrequency'][locale.languageCode]; - String get clinicalDetailsAndRemarks => localizedValues['clinicalDetailsAndRemarks'][locale.languageCode]; + String get clinicalDetailsAndRemarks => + localizedValues['clinicalDetailsAndRemarks'][locale.languageCode]; String get remarks => localizedValues['remarks'][locale.languageCode]; @@ -344,30 +424,39 @@ class TranslationBase { String get outPatient => localizedValues['outPatients'][locale.languageCode]; - String get myOutPatient => localizedValues['myOutPatient'][locale.languageCode]; - String get myOutPatient_2lines => localizedValues['myOutPatient_2lines'][locale.languageCode]; + String get myOutPatient => + localizedValues['myOutPatient'][locale.languageCode]; + String get myOutPatient_2lines => + localizedValues['myOutPatient_2lines'][locale.languageCode]; String get logout => localizedValues['logout'][locale.languageCode]; - String get pharmaciesList => localizedValues['pharmaciesList'][locale.languageCode]; + String get pharmaciesList => + localizedValues['pharmaciesList'][locale.languageCode]; String get price => localizedValues['price'][locale.languageCode]; - String get youCanFindItIn => localizedValues['youCanFindItIn'][locale.languageCode]; + String get youCanFindItIn => + localizedValues['youCanFindItIn'][locale.languageCode]; - String get radiologyReport => localizedValues['radiologyReport'][locale.languageCode]; + String get radiologyReport => + localizedValues['radiologyReport'][locale.languageCode]; String get orders => localizedValues['orders'][locale.languageCode]; String get list => localizedValues['list'][locale.languageCode]; - String get searchOrders => localizedValues['searchOrders'][locale.languageCode]; + String get searchOrders => + localizedValues['searchOrders'][locale.languageCode]; - String get prescriptionDetails => localizedValues['prescriptionDetails'][locale.languageCode]; + String get prescriptionDetails => + localizedValues['prescriptionDetails'][locale.languageCode]; - String get prescriptionInfo => localizedValues['prescriptionInfo'][locale.languageCode]; + String get prescriptionInfo => + localizedValues['prescriptionInfo'][locale.languageCode]; - String get errorNoOrders => localizedValues['errorNoOrders'][locale.languageCode]; + String get errorNoOrders => + localizedValues['errorNoOrders'][locale.languageCode]; String get livecare => localizedValues['livecare'][locale.languageCode]; @@ -381,17 +470,20 @@ class TranslationBase { String get done => localizedValues['done'][locale.languageCode]; - String get searchMedicineImageCaption => localizedValues['searchMedicineImageCaption'][locale.languageCode]; + String get searchMedicineImageCaption => + localizedValues['searchMedicineImageCaption'][locale.languageCode]; String get type => localizedValues['type'][locale.languageCode]; String get resumecall => localizedValues['resumecall'][locale.languageCode]; - String get endcallwithcharge => localizedValues['endcallwithcharge'][locale.languageCode]; + String get endcallwithcharge => + localizedValues['endcallwithcharge'][locale.languageCode]; String get endcall => localizedValues['endcall'][locale.languageCode]; - String get transfertoadmin => localizedValues['transfertoadmin'][locale.languageCode]; + String get transfertoadmin => + localizedValues['transfertoadmin'][locale.languageCode]; String get fromDate => localizedValues['fromDate'][locale.languageCode]; @@ -401,15 +493,19 @@ class TranslationBase { String get toTime => localizedValues['toTime'][locale.languageCode]; - String get searchPatientImageCaptionTitle => localizedValues['searchPatientImageCaptionTitle'][locale.languageCode]; + String get searchPatientImageCaptionTitle => + localizedValues['searchPatientImageCaptionTitle'][locale.languageCode]; - String get searchPatientImageCaptionBody => localizedValues['searchPatientImageCaptionBody'][locale.languageCode]; + String get searchPatientImageCaptionBody => + localizedValues['searchPatientImageCaptionBody'][locale.languageCode]; String get welcome => localizedValues['welcome'][locale.languageCode]; - String get typeMedicineName => localizedValues['typeMedicineName'][locale.languageCode]; + String get typeMedicineName => + localizedValues['typeMedicineName'][locale.languageCode]; - String get moreThan3Letter => localizedValues['moreThan3Letter'][locale.languageCode]; + String get moreThan3Letter => + localizedValues['moreThan3Letter'][locale.languageCode]; String get gender2 => localizedValues['gender2'][locale.languageCode]; @@ -417,7 +513,8 @@ class TranslationBase { String get sickleave => localizedValues['sick-leaves'][locale.languageCode]; - String get patientSick => localizedValues['patient-sick'][locale.languageCode]; + String get patientSick => + localizedValues['patient-sick'][locale.languageCode]; String get leave => localizedValues['leave'][locale.languageCode]; @@ -427,11 +524,14 @@ class TranslationBase { String get clinicName => localizedValues['clinicname'][locale.languageCode]; - String get sickLeaveDate => localizedValues['sick-leave-date'][locale.languageCode]; + String get sickLeaveDate => + localizedValues['sick-leave-date'][locale.languageCode]; - String get sickLeaveDays => localizedValues['sick-leave-days'][locale.languageCode]; + String get sickLeaveDays => + localizedValues['sick-leave-days'][locale.languageCode]; - String get admissionDetail => localizedValues['admissionDetail'][locale.languageCode]; + String get admissionDetail => + localizedValues['admissionDetail'][locale.languageCode]; String get dateTime => localizedValues['dateTime'][locale.languageCode]; @@ -447,56 +547,72 @@ class TranslationBase { String get bed => localizedValues['bed'][locale.languageCode]; - String get previousSickLeaveIssue => localizedValues['prevoius-sickleave-issed'][locale.languageCode]; + String get previousSickLeaveIssue => + localizedValues['prevoius-sickleave-issed'][locale.languageCode]; - String get noSickLeaveApplied => localizedValues['no-sickleve-applied'][locale.languageCode]; + String get noSickLeaveApplied => + localizedValues['no-sickleve-applied'][locale.languageCode]; String get applyNow => localizedValues['applynow'][locale.languageCode]; - String get addSickLeave => localizedValues['add-sickleave'][locale.languageCode]; + String get addSickLeave => + localizedValues['add-sickleave'][locale.languageCode]; String get add => localizedValues['add'][locale.languageCode]; - String get addSickLeaverequest => localizedValues['addSickLeaveRequest'][locale.languageCode]; - String get extendSickLeaverequest => localizedValues['extendSickLeaveRequest'][locale.languageCode]; + String get addSickLeaverequest => + localizedValues['addSickLeaveRequest'][locale.languageCode]; + String get extendSickLeaverequest => + localizedValues['extendSickLeaveRequest'][locale.languageCode]; String get approved => localizedValues['approved'][locale.languageCode]; String get extended => localizedValues['extended'][locale.languageCode]; String get pending => localizedValues['pending'][locale.languageCode]; - String get leaveStartDate => localizedValues['leave-start-date'][locale.languageCode]; + String get leaveStartDate => + localizedValues['leave-start-date'][locale.languageCode]; - String get daysSickleave => localizedValues['days-sick-leave'][locale.languageCode]; + String get daysSickleave => + localizedValues['days-sick-leave'][locale.languageCode]; String get extend => localizedValues['extend'][locale.languageCode]; - String get extendSickLeave => localizedValues['extend-sickleave'][locale.languageCode]; + String get extendSickLeave => + localizedValues['extend-sickleave'][locale.languageCode]; - String get targetPatient => localizedValues['patient-target'][locale.languageCode]; + String get targetPatient => + localizedValues['patient-target'][locale.languageCode]; - String get noPrescription => localizedValues['no-priscription-listed'][locale.languageCode]; + String get noPrescription => + localizedValues['no-priscription-listed'][locale.languageCode]; String get next => localizedValues['next'][locale.languageCode]; String get finish => localizedValues['finish'][locale.languageCode]; String get previous => localizedValues['previous'][locale.languageCode]; - String get emptyMessage => localizedValues['empty-message'][locale.languageCode]; + String get emptyMessage => + localizedValues['empty-message'][locale.languageCode]; - String get healthRecordInformation => localizedValues['healthRecordInformation'][locale.languageCode]; + String get healthRecordInformation => + localizedValues['healthRecordInformation'][locale.languageCode]; - String get chiefComplaintLength => localizedValues['chiefComplaintLength'][locale.languageCode]; + String get chiefComplaintLength => + localizedValues['chiefComplaintLength'][locale.languageCode]; String get referTo => localizedValues['referTo'][locale.languageCode]; - String get referredFrom => localizedValues['referredFrom'][locale.languageCode]; + String get referredFrom => + localizedValues['referredFrom'][locale.languageCode]; String get refClinic => localizedValues['refClinic'][locale.languageCode]; String get branch => localizedValues['branch'][locale.languageCode]; - String get chooseAppointment => localizedValues['chooseAppointment'][locale.languageCode]; + String get chooseAppointment => + localizedValues['chooseAppointment'][locale.languageCode]; - String get appointmentNo => localizedValues['appointmentNo'][locale.languageCode]; + String get appointmentNo => + localizedValues['appointmentNo'][locale.languageCode]; String get refer => localizedValues['refer'][locale.languageCode]; @@ -508,19 +624,24 @@ class TranslationBase { String get dr => localizedValues['dr'][locale.languageCode]; - String get previewHealth => localizedValues['previewHealth'][locale.languageCode]; + String get previewHealth => + localizedValues['previewHealth'][locale.languageCode]; - String get summaryReport => localizedValues['summaryReport'][locale.languageCode]; + String get summaryReport => + localizedValues['summaryReport'][locale.languageCode]; String get accept => localizedValues['accept'][locale.languageCode]; String get reject => localizedValues['reject'][locale.languageCode]; - String get noAppointmentsErrorMsg => localizedValues['noAppointmentsErrorMsg'][locale.languageCode]; + String get noAppointmentsErrorMsg => + localizedValues['noAppointmentsErrorMsg'][locale.languageCode]; - String get referralPatient => localizedValues['referralPatient'][locale.languageCode]; + String get referralPatient => + localizedValues['referralPatient'][locale.languageCode]; - String get noPrescriptionListed => localizedValues['noPrescriptionListed'][locale.languageCode]; + String get noPrescriptionListed => + localizedValues['noPrescriptionListed'][locale.languageCode]; String get addNow => localizedValues['addNow'][locale.languageCode]; @@ -536,16 +657,20 @@ class TranslationBase { String get instruction => localizedValues['instruction'][locale.languageCode]; - String get rescheduleLeaves => localizedValues['reschedule-leave'][locale.languageCode]; + String get rescheduleLeaves => + localizedValues['reschedule-leave'][locale.languageCode]; - String get applyOrRescheduleLeave => localizedValues['applyOrRescheduleLeave'][locale.languageCode]; + String get applyOrRescheduleLeave => + localizedValues['applyOrRescheduleLeave'][locale.languageCode]; String get myQRCode => localizedValues['myQRCode'][locale.languageCode]; - String get addMedication => localizedValues['addMedication'][locale.languageCode]; + String get addMedication => + localizedValues['addMedication'][locale.languageCode]; String get route => localizedValues['route'][locale.languageCode]; - String get noReScheduleLeave => localizedValues['no-reschedule-leave'][locale.languageCode]; + String get noReScheduleLeave => + localizedValues['no-reschedule-leave'][locale.languageCode]; String get weight => localizedValues['weight'][locale.languageCode]; @@ -555,7 +680,8 @@ class TranslationBase { String get cm => localizedValues['cm'][locale.languageCode]; - String get idealBodyWeight => localizedValues['idealBodyWeight'][locale.languageCode]; + String get idealBodyWeight => + localizedValues['idealBodyWeight'][locale.languageCode]; String get waistSize => localizedValues['waistSize'][locale.languageCode]; @@ -563,16 +689,22 @@ class TranslationBase { String get headCircum => localizedValues['headCircum'][locale.languageCode]; - String get leanBodyWeight => localizedValues['leanBodyWeight'][locale.languageCode]; + String get leanBodyWeight => + localizedValues['leanBodyWeight'][locale.languageCode]; - String get bodyMassIndex => localizedValues['bodyMassIndex'][locale.languageCode]; + String get bodyMassIndex => + localizedValues['bodyMassIndex'][locale.languageCode]; - String get yourBodyMassIndex => localizedValues['yourBodyMassIndex'][locale.languageCode]; - String get bmiUnderWeight => localizedValues['bmiUnderWeight'][locale.languageCode]; + String get yourBodyMassIndex => + localizedValues['yourBodyMassIndex'][locale.languageCode]; + String get bmiUnderWeight => + localizedValues['bmiUnderWeight'][locale.languageCode]; String get bmiHealthy => localizedValues['bmiHealthy'][locale.languageCode]; - String get bmiOverWeight => localizedValues['bmiOverWeight'][locale.languageCode]; + String get bmiOverWeight => + localizedValues['bmiOverWeight'][locale.languageCode]; String get bmiObese => localizedValues['bmiObese'][locale.languageCode]; - String get bmiObeseExtreme => localizedValues['bmiObeseExtreme'][locale.languageCode]; + String get bmiObeseExtreme => + localizedValues['bmiObeseExtreme'][locale.languageCode]; String get method => localizedValues['method'][locale.languageCode]; @@ -582,35 +714,45 @@ class TranslationBase { String get respBeats => localizedValues['respBeats'][locale.languageCode]; - String get patternOfRespiration => localizedValues['patternOfRespiration'][locale.languageCode]; + String get patternOfRespiration => + localizedValues['patternOfRespiration'][locale.languageCode]; - String get bloodPressureDiastoleAndSystole => localizedValues['bloodPressureDiastoleAndSystole'][locale.languageCode]; + String get bloodPressureDiastoleAndSystole => + localizedValues['bloodPressureDiastoleAndSystole'][locale.languageCode]; - String get cuffLocation => localizedValues['cuffLocation'][locale.languageCode]; + String get cuffLocation => + localizedValues['cuffLocation'][locale.languageCode]; String get cuffSize => localizedValues['cuffSize'][locale.languageCode]; - String get patientPosition => localizedValues['patientPosition'][locale.languageCode]; + String get patientPosition => + localizedValues['patientPosition'][locale.languageCode]; String get fio2 => localizedValues['fio2'][locale.languageCode]; String get sao2 => localizedValues['sao2'][locale.languageCode]; - String get painManagement => localizedValues['painManagement'][locale.languageCode]; + String get painManagement => + localizedValues['painManagement'][locale.languageCode]; String get holiday => localizedValues['holiday'][locale.languageCode]; String get to => localizedValues['to'][locale.languageCode]; - String get coveringDoctor => localizedValues['coveringDoctor'][locale.languageCode]; + String get coveringDoctor => + localizedValues['coveringDoctor'][locale.languageCode]; - String get requestLeave => localizedValues['requestLeave'][locale.languageCode]; + String get requestLeave => + localizedValues['requestLeave'][locale.languageCode]; - String get pleaseEnterDate => localizedValues['pleaseEnterDate'][locale.languageCode]; + String get pleaseEnterDate => + localizedValues['pleaseEnterDate'][locale.languageCode]; - String get pleaseEnterNoOfDays => localizedValues['pleaseEnterNoOfDays'][locale.languageCode]; + String get pleaseEnterNoOfDays => + localizedValues['pleaseEnterNoOfDays'][locale.languageCode]; - String get pleaseEnterRemarks => localizedValues['pleaseEnterRemarks'][locale.languageCode]; + String get pleaseEnterRemarks => + localizedValues['pleaseEnterRemarks'][locale.languageCode]; String get update => localizedValues['update'][locale.languageCode]; @@ -618,68 +760,92 @@ class TranslationBase { String get request => localizedValues['request'][locale.languageCode]; - String get admissionRequest => localizedValues['admissionRequest'][locale.languageCode]; + String get admissionRequest => + localizedValues['admissionRequest'][locale.languageCode]; - String get patientDetails => localizedValues['patientDetails'][locale.languageCode]; + String get patientDetails => + localizedValues['patientDetails'][locale.languageCode]; - String get specialityAndDoctorDetail => localizedValues['specialityAndDoctorDetail'][locale.languageCode]; + String get specialityAndDoctorDetail => + localizedValues['specialityAndDoctorDetail'][locale.languageCode]; - String get referringDate => localizedValues['referringDate'][locale.languageCode]; + String get referringDate => + localizedValues['referringDate'][locale.languageCode]; - String get referringDoctor => localizedValues['referringDoctor'][locale.languageCode]; + String get referringDoctor => + localizedValues['referringDoctor'][locale.languageCode]; - String get otherInformation => localizedValues['otherInformation'][locale.languageCode]; + String get otherInformation => + localizedValues['otherInformation'][locale.languageCode]; - String get expectedDays => localizedValues['expectedDays'][locale.languageCode]; + String get expectedDays => + localizedValues['expectedDays'][locale.languageCode]; - String get expectedAdmissionDate => localizedValues['expectedAdmissionDate'][locale.languageCode]; + String get expectedAdmissionDate => + localizedValues['expectedAdmissionDate'][locale.languageCode]; - String get emergencyAdmission => localizedValues['emergencyAdmission'][locale.languageCode]; - String get isSickLeaveRequired => localizedValues['isSickLeaveRequired'][locale.languageCode]; + String get emergencyAdmission => + localizedValues['emergencyAdmission'][locale.languageCode]; + String get isSickLeaveRequired => + localizedValues['isSickLeaveRequired'][locale.languageCode]; - String get patientPregnant => localizedValues['patientPregnant'][locale.languageCode]; + String get patientPregnant => + localizedValues['patientPregnant'][locale.languageCode]; - String get treatmentLine => localizedValues['treatmentLine'][locale.languageCode]; + String get treatmentLine => + localizedValues['treatmentLine'][locale.languageCode]; String get ward => localizedValues['ward'][locale.languageCode]; - String get preAnesthesiaReferred => localizedValues['preAnesthesiaReferred'][locale.languageCode]; + String get preAnesthesiaReferred => + localizedValues['preAnesthesiaReferred'][locale.languageCode]; - String get admissionType => localizedValues['admissionType'][locale.languageCode]; + String get admissionType => + localizedValues['admissionType'][locale.languageCode]; String get diagnosis => localizedValues['diagnosis'][locale.languageCode]; String get allergies => localizedValues['allergies'][locale.languageCode]; - String get preOperativeOrders => localizedValues['preOperativeOrders'][locale.languageCode]; + String get preOperativeOrders => + localizedValues['preOperativeOrders'][locale.languageCode]; - String get elementForImprovement => localizedValues['elementForImprovement'][locale.languageCode]; + String get elementForImprovement => + localizedValues['elementForImprovement'][locale.languageCode]; - String get dischargeDate => localizedValues['dischargeDate'][locale.languageCode]; + String get dischargeDate => + localizedValues['dischargeDate'][locale.languageCode]; String get dietType => localizedValues['dietType'][locale.languageCode]; - String get dietTypeRemarks => localizedValues['dietTypeRemarks'][locale.languageCode]; + String get dietTypeRemarks => + localizedValues['dietTypeRemarks'][locale.languageCode]; String get save => localizedValues['save'][locale.languageCode]; - String get postPlansEstimatedCost => localizedValues['postPlansEstimatedCost'][locale.languageCode]; + String get postPlansEstimatedCost => + localizedValues['postPlansEstimatedCost'][locale.languageCode]; String get postPlans => localizedValues['postPlans'][locale.languageCode]; String get ucaf => localizedValues['ucaf'][locale.languageCode]; - String get emergencyCase => localizedValues['emergencyCase'][locale.languageCode]; + String get emergencyCase => + localizedValues['emergencyCase'][locale.languageCode]; - String get durationOfIllness => localizedValues['durationOfIllness'][locale.languageCode]; + String get durationOfIllness => + localizedValues['durationOfIllness'][locale.languageCode]; - String get chiefComplaintsAndSymptoms => localizedValues['chiefComplaintsAndSymptoms'][locale.languageCode]; + String get chiefComplaintsAndSymptoms => + localizedValues['chiefComplaintsAndSymptoms'][locale.languageCode]; String get patientFeelsPainInHisBackAndCough => localizedValues['patientFeelsPainInHisBackAndCough'][locale.languageCode]; - String get additionalTextComplaints => localizedValues['additionalTextComplaints'][locale.languageCode]; + String get additionalTextComplaints => + localizedValues['additionalTextComplaints'][locale.languageCode]; - String get otherConditions => localizedValues['otherConditions'][locale.languageCode]; + String get otherConditions => + localizedValues['otherConditions'][locale.languageCode]; String get other => localizedValues['other'][locale.languageCode]; @@ -689,9 +855,11 @@ class TranslationBase { String get where => localizedValues['where'][locale.languageCode]; - String get specifyPossibleLineManagement => localizedValues['specifyPossibleLineManagement'][locale.languageCode]; + String get specifyPossibleLineManagement => + localizedValues['specifyPossibleLineManagement'][locale.languageCode]; - String get significantSigns => localizedValues['significantSigns'][locale.languageCode]; + String get significantSigns => + localizedValues['significantSigns'][locale.languageCode]; String get backAbdomen => localizedValues['backAbdomen'][locale.languageCode]; @@ -705,41 +873,55 @@ class TranslationBase { String get procedures => localizedValues['procedures'][locale.languageCode]; - String get chiefComplaints => localizedValues['chiefComplaints'][locale.languageCode]; + String get chiefComplaints => + localizedValues['chiefComplaints'][locale.languageCode]; String get histories => localizedValues['histories'][locale.languageCode]; - String get allergiesSoap => localizedValues['allergiesSoap'][locale.languageCode]; + String get allergiesSoap => + localizedValues['allergiesSoap'][locale.languageCode]; - String get addChiefComplaints => localizedValues['addChiefComplaints'][locale.languageCode]; + String get addChiefComplaints => + localizedValues['addChiefComplaints'][locale.languageCode]; - String get historyOfPresentIllness => localizedValues['historyOfPresentIllness'][locale.languageCode]; + String get historyOfPresentIllness => + localizedValues['historyOfPresentIllness'][locale.languageCode]; String get requiredMsg => localizedValues['requiredMsg'][locale.languageCode]; String get addHistory => localizedValues['addHistory'][locale.languageCode]; - String get searchHistory => localizedValues['searchHistory'][locale.languageCode]; + String get searchHistory => + localizedValues['searchHistory'][locale.languageCode]; - String get addSelectedHistories => localizedValues['addSelectedHistories'][locale.languageCode]; + String get addSelectedHistories => + localizedValues['addSelectedHistories'][locale.languageCode]; - String get addAllergies => localizedValues['addAllergies'][locale.languageCode]; + String get addAllergies => + localizedValues['addAllergies'][locale.languageCode]; String get itemExist => localizedValues['itemExist'][locale.languageCode]; - String get selectAllergy => localizedValues['selectAllergy'][locale.languageCode]; + String get selectAllergy => + localizedValues['selectAllergy'][locale.languageCode]; - String get selectSeverity => localizedValues['selectSeverity'][locale.languageCode]; + String get selectSeverity => + localizedValues['selectSeverity'][locale.languageCode]; - String get leaveCreated => localizedValues['leaveCreated'][locale.languageCode]; + String get leaveCreated => + localizedValues['leaveCreated'][locale.languageCode]; - String get vitalSignEmptyMsg => localizedValues['vitalSignEmptyMsg'][locale.languageCode]; + String get vitalSignEmptyMsg => + localizedValues['vitalSignEmptyMsg'][locale.languageCode]; - String get referralEmptyMsg => localizedValues['referralEmptyMsg'][locale.languageCode]; + String get referralEmptyMsg => + localizedValues['referralEmptyMsg'][locale.languageCode]; - String get referralSuccessMsg => localizedValues['referralSuccessMsg'][locale.languageCode]; + String get referralSuccessMsg => + localizedValues['referralSuccessMsg'][locale.languageCode]; - String get diagnoseType => localizedValues['diagnoseType'][locale.languageCode]; + String get diagnoseType => + localizedValues['diagnoseType'][locale.languageCode]; String get condition => localizedValues['condition'][locale.languageCode]; @@ -753,52 +935,72 @@ class TranslationBase { String get covered => localizedValues['covered'][locale.languageCode]; - String get approvalRequired => localizedValues['approvalRequired'][locale.languageCode]; + String get approvalRequired => + localizedValues['approvalRequired'][locale.languageCode]; - String get uncoveredByDoctor => localizedValues['uncoveredByDoctor'][locale.languageCode]; + String get uncoveredByDoctor => + localizedValues['uncoveredByDoctor'][locale.languageCode]; - String get chiefComplaintEmptyMsg => localizedValues['chiefComplaintEmptyMsg'][locale.languageCode]; + String get chiefComplaintEmptyMsg => + localizedValues['chiefComplaintEmptyMsg'][locale.languageCode]; - String get moreVerification => localizedValues['more-verify'][locale.languageCode]; + String get moreVerification => + localizedValues['more-verify'][locale.languageCode]; - String get welcomeBack => localizedValues['welcome-back'][locale.languageCode]; + String get welcomeBack => + localizedValues['welcome-back'][locale.languageCode]; - String get accountInfo => localizedValues['account-info'][locale.languageCode]; + String get accountInfo => + localizedValues['account-info'][locale.languageCode]; - String get useAnotherAccount => localizedValues['another-acc'][locale.languageCode]; + String get useAnotherAccount => + localizedValues['another-acc'][locale.languageCode]; - String get verifyLoginWith => localizedValues['verify-login-with'][locale.languageCode]; + String get verifyLoginWith => + localizedValues['verify-login-with'][locale.languageCode]; String get register => localizedValues['register-user'][locale.languageCode]; - String get verifyFingerprint => localizedValues['verify-with-fingerprint'][locale.languageCode]; + String get verifyFingerprint => + localizedValues['verify-with-fingerprint'][locale.languageCode]; - String get verifyFaceID => localizedValues['verify-with-faceid'][locale.languageCode]; + String get verifyFaceID => + localizedValues['verify-with-faceid'][locale.languageCode]; - String get verifySMS => localizedValues['verify-with-sms'][locale.languageCode]; + String get verifySMS => + localizedValues['verify-with-sms'][locale.languageCode]; String get verifyWith => localizedValues['verify-with'][locale.languageCode]; - String get verifyWhatsApp => localizedValues['verify-with-whatsapp'][locale.languageCode]; + String get verifyWhatsApp => + localizedValues['verify-with-whatsapp'][locale.languageCode]; String get lastLoginAt => localizedValues['last-login'][locale.languageCode]; - String get lastLoginWith => localizedValues['last-login-with'][locale.languageCode]; + String get lastLoginWith => + localizedValues['last-login-with'][locale.languageCode]; - String get verifyFingerprint2 => localizedValues['verify-fingerprint'][locale.languageCode]; + String get verifyFingerprint2 => + localizedValues['verify-fingerprint'][locale.languageCode]; - String get verificationMessage => localizedValues['verification_message'][locale.languageCode]; + String get verificationMessage => + localizedValues['verification_message'][locale.languageCode]; - String get validationMessage => localizedValues['validation_message'][locale.languageCode]; + String get validationMessage => + localizedValues['validation_message'][locale.languageCode]; - String get addAssessment => localizedValues['addAssessment'][locale.languageCode]; + String get addAssessment => + localizedValues['addAssessment'][locale.languageCode]; String get assessment => localizedValues['assessment'][locale.languageCode]; - String get physicalSystemExamination => localizedValues['physicalSystemExamination'][locale.languageCode]; + String get physicalSystemExamination => + localizedValues['physicalSystemExamination'][locale.languageCode]; - String get searchExamination => localizedValues['searchExamination'][locale.languageCode]; + String get searchExamination => + localizedValues['searchExamination'][locale.languageCode]; - String get addExamination => localizedValues['addExamination'][locale.languageCode]; + String get addExamination => + localizedValues['addExamination'][locale.languageCode]; String get doc => localizedValues['doc'][locale.languageCode]; @@ -809,11 +1011,14 @@ class TranslationBase { String get abnormal => localizedValues['abnormal'][locale.languageCode]; - String get patientNoDetailErrMsg => localizedValues['patientNoDetailErrMsg'][locale.languageCode]; + String get patientNoDetailErrMsg => + localizedValues['patientNoDetailErrMsg'][locale.languageCode]; - String get systolicLng => localizedValues['systolic-lng'][locale.languageCode]; + String get systolicLng => + localizedValues['systolic-lng'][locale.languageCode]; - String get diastolicLng => localizedValues['diastolic-lng'][locale.languageCode]; + String get diastolicLng => + localizedValues['diastolic-lng'][locale.languageCode]; String get mass => localizedValues['mass'][locale.languageCode]; @@ -821,62 +1026,80 @@ class TranslationBase { String get bpm => localizedValues['bpm'][locale.languageCode]; - String get respirationSigns => localizedValues['respiration-signs'][locale.languageCode]; + String get respirationSigns => + localizedValues['respiration-signs'][locale.languageCode]; String get sysDias => localizedValues['sys-dias'][locale.languageCode]; String get body => localizedValues['body'][locale.languageCode]; - String get respirationRate => localizedValues['respirationRate'][locale.languageCode]; + String get respirationRate => + localizedValues['respirationRate'][locale.languageCode]; String get heart => localizedValues['heart'][locale.languageCode]; - String get medicalReport => localizedValues['medicalReport'][locale.languageCode]; + String get medicalReport => + localizedValues['medicalReport'][locale.languageCode]; String get visitDate => localizedValues['visitDate'][locale.languageCode]; String get test => localizedValues['test'][locale.languageCode]; - String get addMoreProcedure => localizedValues['addMoreProcedure'][locale.languageCode]; + String get addMoreProcedure => + localizedValues['addMoreProcedure'][locale.languageCode]; String get regular => localizedValues['regular'][locale.languageCode]; - String get searchProcedures => localizedValues['searchProcedures'][locale.languageCode]; + String get searchProcedures => + localizedValues['searchProcedures'][locale.languageCode]; - String get procedureCategorise => localizedValues['procedureCategorise'][locale.languageCode]; + String get procedureCategorise => + localizedValues['procedureCategorise'][locale.languageCode]; - String get selectProcedures => localizedValues['selectProcedures'][locale.languageCode]; + String get selectProcedures => + localizedValues['selectProcedures'][locale.languageCode]; - String get addSelectedProcedures => localizedValues['addSelectedProcedures'][locale.languageCode]; - String get addProcedures => localizedValues['addProcedures'][locale.languageCode]; + String get addSelectedProcedures => + localizedValues['addSelectedProcedures'][locale.languageCode]; + String get addProcedures => + localizedValues['addProcedures'][locale.languageCode]; - String get updateProcedure => localizedValues['updateProcedure'][locale.languageCode]; + String get updateProcedure => + localizedValues['updateProcedure'][locale.languageCode]; - String get orderProcedure => localizedValues['orderProcedure'][locale.languageCode]; + String get orderProcedure => + localizedValues['orderProcedure'][locale.languageCode]; String get nameOrICD => localizedValues['nameOrICD'][locale.languageCode]; String get dType => localizedValues['dType'][locale.languageCode]; - String get addAssessmentDetails => localizedValues['addAssessmentDetails'][locale.languageCode]; + String get addAssessmentDetails => + localizedValues['addAssessmentDetails'][locale.languageCode]; - String get progressNoteSOAP => localizedValues['progressNoteSOAP'][locale.languageCode]; + String get progressNoteSOAP => + localizedValues['progressNoteSOAP'][locale.languageCode]; - String get addProgressNote => localizedValues['addProgressNote'][locale.languageCode]; + String get addProgressNote => + localizedValues['addProgressNote'][locale.languageCode]; String get createdBy => localizedValues['createdBy'][locale.languageCode]; String get editedBy => localizedValues['editedBy'][locale.languageCode]; - String get currentMedications => localizedValues['currentMedications'][locale.languageCode]; + String get currentMedications => + localizedValues['currentMedications'][locale.languageCode]; String get noItem => localizedValues['noItem'][locale.languageCode]; - String get postUcafSuccessMsg => localizedValues['postUcafSuccessMsg'][locale.languageCode]; + String get postUcafSuccessMsg => + localizedValues['postUcafSuccessMsg'][locale.languageCode]; - String get vitalSignDetailEmpty => localizedValues['vitalSignDetailEmpty'][locale.languageCode]; + String get vitalSignDetailEmpty => + localizedValues['vitalSignDetailEmpty'][locale.languageCode]; - String get onlyOfftimeHoliday => localizedValues['onlyOfftimeHoliday'][locale.languageCode]; + String get onlyOfftimeHoliday => + localizedValues['onlyOfftimeHoliday'][locale.languageCode]; String get active => localizedValues['active'][locale.languageCode]; @@ -884,18 +1107,24 @@ class TranslationBase { String get loading => localizedValues['loading'][locale.languageCode]; - String get assessmentErrorMsg => localizedValues['assessmentErrorMsg'][locale.languageCode]; + String get assessmentErrorMsg => + localizedValues['assessmentErrorMsg'][locale.languageCode]; - String get examinationErrorMsg => localizedValues['examinationErrorMsg'][locale.languageCode]; + String get examinationErrorMsg => + localizedValues['examinationErrorMsg'][locale.languageCode]; - String get progressNoteErrorMsg => localizedValues['progressNoteErrorMsg'][locale.languageCode]; + String get progressNoteErrorMsg => + localizedValues['progressNoteErrorMsg'][locale.languageCode]; - String get chiefComplaintErrorMsg => localizedValues['chiefComplaintErrorMsg'][locale.languageCode]; + String get chiefComplaintErrorMsg => + localizedValues['chiefComplaintErrorMsg'][locale.languageCode]; String get ICDName => localizedValues['ICDName'][locale.languageCode]; - String get referralStatus => localizedValues['referralStatus'][locale.languageCode]; + String get referralStatus => + localizedValues['referralStatus'][locale.languageCode]; - String get referralRemark => localizedValues['referralRemark'][locale.languageCode]; + String get referralRemark => + localizedValues['referralRemark'][locale.languageCode]; String get offTime => localizedValues['offTime'][locale.languageCode]; String get icd => localizedValues['icd'][locale.languageCode]; @@ -904,43 +1133,73 @@ class TranslationBase { String get min => localizedValues['min'][locale.languageCode]; String get months => localizedValues['months'][locale.languageCode]; String get years => localizedValues['years'][locale.languageCode]; - String get referralStatusHold => localizedValues['referralStatusHold'][locale.languageCode]; - String get referralStatusActive => localizedValues['referralStatusActive'][locale.languageCode]; - String get referralStatusCancelled => localizedValues['referralStatusCancelled'][locale.languageCode]; - String get referralStatusCompleted => localizedValues['referralStatusCompleted'][locale.languageCode]; - String get referralStatusNotSeen => localizedValues['referralStatusNotSeen'][locale.languageCode]; - String get clinicSearch => localizedValues['clinicSearch'][locale.languageCode]; - String get doctorSearch => localizedValues['doctorSearch'][locale.languageCode]; - String get referralResponse => localizedValues['referralResponse'][locale.languageCode]; - String get estimatedCost => localizedValues['estimatedCost'][locale.languageCode]; - String get diagnosisDetail => localizedValues['diagnosisDetail'][locale.languageCode]; - String get referralSuccessMsgAccept => localizedValues['referralSuccessMsgAccept'][locale.languageCode]; - String get referralSuccessMsgReject => localizedValues['referralSuccessMsgReject'][locale.languageCode]; - - String get patientName => localizedValues['patient-name'][locale.languageCode]; - - String get appointmentNumber => localizedValues['appointmentNumber'][locale.languageCode]; - String get sickLeaveComments => localizedValues['sickLeaveComments'][locale.languageCode]; - String get pastMedicalHistory => localizedValues['pastMedicalHistory'][locale.languageCode]; - String get pastSurgicalHistory => localizedValues['pastSurgicalHistory'][locale.languageCode]; - String get complications => localizedValues['complications'][locale.languageCode]; + String get referralStatusHold => + localizedValues['referralStatusHold'][locale.languageCode]; + String get referralStatusActive => + localizedValues['referralStatusActive'][locale.languageCode]; + String get referralStatusCancelled => + localizedValues['referralStatusCancelled'][locale.languageCode]; + String get referralStatusCompleted => + localizedValues['referralStatusCompleted'][locale.languageCode]; + String get referralStatusNotSeen => + localizedValues['referralStatusNotSeen'][locale.languageCode]; + String get clinicSearch => + localizedValues['clinicSearch'][locale.languageCode]; + String get doctorSearch => + localizedValues['doctorSearch'][locale.languageCode]; + String get referralResponse => + localizedValues['referralResponse'][locale.languageCode]; + String get estimatedCost => + localizedValues['estimatedCost'][locale.languageCode]; + String get diagnosisDetail => + localizedValues['diagnosisDetail'][locale.languageCode]; + String get referralSuccessMsgAccept => + localizedValues['referralSuccessMsgAccept'][locale.languageCode]; + String get referralSuccessMsgReject => + localizedValues['referralSuccessMsgReject'][locale.languageCode]; + + String get patientName => + localizedValues['patient-name'][locale.languageCode]; + + String get appointmentNumber => + localizedValues['appointmentNumber'][locale.languageCode]; + String get sickLeaveComments => + localizedValues['sickLeaveComments'][locale.languageCode]; + String get pastMedicalHistory => + localizedValues['pastMedicalHistory'][locale.languageCode]; + String get pastSurgicalHistory => + localizedValues['pastSurgicalHistory'][locale.languageCode]; + String get complications => + localizedValues['complications'][locale.languageCode]; String get floor => localizedValues['floor'][locale.languageCode]; - String get roomCategory => localizedValues['roomCategory'][locale.languageCode]; - String get otherDepartmentsInterventions => localizedValues['otherDepartmentsInterventions'][locale.languageCode]; - String get otherProcedure => localizedValues['otherProcedure'][locale.languageCode]; - String get admissionRequestSuccessMsg => localizedValues['admissionRequestSuccessMsg'][locale.languageCode]; + String get roomCategory => + localizedValues['roomCategory'][locale.languageCode]; + String get otherDepartmentsInterventions => + localizedValues['otherDepartmentsInterventions'][locale.languageCode]; + String get otherProcedure => + localizedValues['otherProcedure'][locale.languageCode]; + String get admissionRequestSuccessMsg => + localizedValues['admissionRequestSuccessMsg'][locale.languageCode]; String get infoStatus => localizedValues['infoStatus'][locale.languageCode]; - String get doctorResponse => localizedValues['doctorResponse'][locale.languageCode]; - String get sickleaveonhold => localizedValues['sickleaveonhold'][locale.languageCode]; + String get doctorResponse => + localizedValues['doctorResponse'][locale.languageCode]; + String get sickleaveonhold => + localizedValues['sickleaveonhold'][locale.languageCode]; String get noClinic => localizedValues['no-clinic'][locale.languageCode]; - String get otherStatistic => localizedValues['otherStatistic'][locale.languageCode]; - - String get patientsreferral => localizedValues['ptientsreferral'][locale.languageCode]; - String get myPatientsReferral => localizedValues['myPatientsReferral'][locale.languageCode]; - String get arrivalpatient => localizedValues['arrivalpatient'][locale.languageCode]; - String get searchmedicinepatient => localizedValues['searchmedicinepatient'][locale.languageCode]; - String get appointmentDate => localizedValues['appointmentDate'][locale.languageCode]; + String get otherStatistic => + localizedValues['otherStatistic'][locale.languageCode]; + + String get patientsreferral => + localizedValues['ptientsreferral'][locale.languageCode]; + String get myPatientsReferral => + localizedValues['myPatientsReferral'][locale.languageCode]; + String get arrivalpatient => + localizedValues['arrivalpatient'][locale.languageCode]; + String get searchmedicinepatient => + localizedValues['searchmedicinepatient'][locale.languageCode]; + String get appointmentDate => + localizedValues['appointmentDate'][locale.languageCode]; String get arrivedP => localizedValues['arrived_p'][locale.languageCode]; String get details => localizedValues['details'][locale.languageCode]; @@ -949,9 +1208,12 @@ class TranslationBase { String get billNo => localizedValues['BillNo'][locale.languageCode]; String get labResults => localizedValues['labResults'][locale.languageCode]; String get sendSuc => localizedValues['sendSuc'][locale.languageCode]; - String get specialResult => localizedValues['SpecialResult'][locale.languageCode]; - String get noDataAvailable => localizedValues['noDataAvailable'][locale.languageCode]; - String get showMoreBtn => localizedValues['show-more-btn'][locale.languageCode]; + String get specialResult => + localizedValues['SpecialResult'][locale.languageCode]; + String get noDataAvailable => + localizedValues['noDataAvailable'][locale.languageCode]; + String get showMoreBtn => + localizedValues['show-more-btn'][locale.languageCode]; String get showDetail => localizedValues['showDetail'][locale.languageCode]; String get viewProfile => localizedValues['viewProfile'][locale.languageCode]; @@ -960,30 +1222,40 @@ class TranslationBase { String get leaves => localizedValues['leaves'][locale.languageCode]; String get openRad => localizedValues['open-rad'][locale.languageCode]; - String get totalApproval => localizedValues['totalApproval'][locale.languageCode]; - String get procedureStatus => localizedValues['procedureStatus'][locale.languageCode]; + String get totalApproval => + localizedValues['totalApproval'][locale.languageCode]; + String get procedureStatus => + localizedValues['procedureStatus'][locale.languageCode]; String get unusedCount => localizedValues['unusedCount'][locale.languageCode]; String get companyName => localizedValues['companyName'][locale.languageCode]; - String get procedureName => localizedValues['procedureName'][locale.languageCode]; + String get procedureName => + localizedValues['procedureName'][locale.languageCode]; String get usageStatus => localizedValues['usageStatus'][locale.languageCode]; - String get prescriptions => localizedValues['prescriptions'][locale.languageCode]; + String get prescriptions => + localizedValues['prescriptions'][locale.languageCode]; String get notes => localizedValues['notes'][locale.languageCode]; String get dailyDoses => localizedValues['dailyDoses'][locale.languageCode]; - String get searchWithOther => localizedValues['searchWithOther'][locale.languageCode]; - String get hideOtherCriteria => localizedValues['hideOtherCriteria'][locale.languageCode]; - String get applyForReschedule => localizedValues['applyForReschedule'][locale.languageCode]; + String get searchWithOther => + localizedValues['searchWithOther'][locale.languageCode]; + String get hideOtherCriteria => + localizedValues['hideOtherCriteria'][locale.languageCode]; + String get applyForReschedule => + localizedValues['applyForReschedule'][locale.languageCode]; String get startDate => localizedValues['startDate'][locale.languageCode]; String get endDate => localizedValues['endDate'][locale.languageCode]; - String get addReschedule => localizedValues['add-reschedule'][locale.languageCode]; - String get updateReschedule => localizedValues['update-reschedule'][locale.languageCode]; + String get addReschedule => + localizedValues['add-reschedule'][locale.languageCode]; + String get updateReschedule => + localizedValues['update-reschedule'][locale.languageCode]; String get sickLeave => localizedValues['sick_leave'][locale.languageCode]; String get accepted => localizedValues['accepted'][locale.languageCode]; String get cancelled => localizedValues['cancelled'][locale.languageCode]; String get unReplied => localizedValues['unReplied'][locale.languageCode]; String get replied => localizedValues['replied'][locale.languageCode]; - String get typeHereToReply => localizedValues['typeHereToReply'][locale.languageCode]; + String get typeHereToReply => + localizedValues['typeHereToReply'][locale.languageCode]; String get searchHere => localizedValues['searchHere'][locale.languageCode]; String get remove => localizedValues['remove'][locale.languageCode]; String get inProgress => localizedValues['inProgress'][locale.languageCode]; @@ -991,64 +1263,93 @@ class TranslationBase { String get locked => localizedValues['Locked'][locale.languageCode]; String get step => localizedValues['step'][locale.languageCode]; - String get fieldRequired => localizedValues['fieldRequired'][locale.languageCode]; + String get fieldRequired => + localizedValues['fieldRequired'][locale.languageCode]; String get noSickLeave => localizedValues['no-sickleve'][locale.languageCode]; - String get changeOfSchedule => localizedValues['changeOfSchedule'][locale.languageCode]; + String get changeOfSchedule => + localizedValues['changeOfSchedule'][locale.languageCode]; String get newSchedule => localizedValues['newSchedule'][locale.languageCode]; - String get enterCredentials => localizedValues['enter_credentials'][locale.languageCode]; - String get patpatientIDMobilenationalientID => localizedValues['patientIDMobilenational'][locale.languageCode]; + String get enterCredentials => + localizedValues['enter_credentials'][locale.languageCode]; + String get patpatientIDMobilenationalientID => + localizedValues['patientIDMobilenational'][locale.languageCode]; String get updateNow => localizedValues['updateNow'][locale.languageCode]; - String get updateTheApp => localizedValues['updateTheApp'][locale.languageCode]; - String get admissionDate => localizedValues['admission-date'][locale.languageCode]; + String get updateTheApp => + localizedValues['updateTheApp'][locale.languageCode]; + String get admissionDate => + localizedValues['admission-date'][locale.languageCode]; String get noOfDays => localizedValues['noOfDays'][locale.languageCode]; String get numOfDays => localizedValues['numOfDays'][locale.languageCode]; - String get replayBefore => localizedValues['replayBefore'][locale.languageCode]; + String get replayBefore => + localizedValues['replayBefore'][locale.languageCode]; String get trySaying => localizedValues["try-saying"][locale.languageCode]; - String get acknowledged => localizedValues['acknowledged'][locale.languageCode]; + String get acknowledged => + localizedValues['acknowledged'][locale.languageCode]; String get didntCatch => localizedValues["didntCatch"][locale.languageCode]; - String get pleaseEnterProcedure => localizedValues["pleaseEnterProcedure"][locale.languageCode]; + String get pleaseEnterProcedure => + localizedValues["pleaseEnterProcedure"][locale.languageCode]; String get fillTheMandatoryProcedureDetails => localizedValues["fillTheMandatoryProcedureDetails"][locale.languageCode]; - String get atLeastThreeCharacters => localizedValues["atLeastThreeCharacters"][locale.languageCode]; - String get searchProcedureHere => localizedValues["searchProcedureHere"][locale.languageCode]; - String get noInsuranceApprovalFound => localizedValues["noInsuranceApprovalFound"][locale.languageCode]; + String get atLeastThreeCharacters => + localizedValues["atLeastThreeCharacters"][locale.languageCode]; + String get searchProcedureHere => + localizedValues["searchProcedureHere"][locale.languageCode]; + String get noInsuranceApprovalFound => + localizedValues["noInsuranceApprovalFound"][locale.languageCode]; String get procedure => localizedValues["procedure"][locale.languageCode]; String get stopDate => localizedValues["stopDate"][locale.languageCode]; String get processed => localizedValues["processed"][locale.languageCode]; String get direction => localizedValues["direction"][locale.languageCode]; String get refill => localizedValues["refill"][locale.languageCode]; - String get medicationHasBeenAdded => localizedValues["medicationHasBeenAdded"][locale.languageCode]; - String get newPrescriptionOrder => localizedValues["newPrescriptionOrder"][locale.languageCode]; - String get pleaseFillAllFields => localizedValues["pleaseFillAllFields"][locale.languageCode]; + String get medicationHasBeenAdded => + localizedValues["medicationHasBeenAdded"][locale.languageCode]; + String get newPrescriptionOrder => + localizedValues["newPrescriptionOrder"][locale.languageCode]; + String get pleaseFillAllFields => + localizedValues["pleaseFillAllFields"][locale.languageCode]; String get narcoticMedicineCanOnlyBePrescribedFromVida => - localizedValues["narcoticMedicineCanOnlyBePrescribedFromVida"][locale.languageCode]; - String get only5DigitsAllowedForStrength => localizedValues["only5DigitsAllowedForStrength"][locale.languageCode]; + localizedValues["narcoticMedicineCanOnlyBePrescribedFromVida"] + [locale.languageCode]; + String get only5DigitsAllowedForStrength => + localizedValues["only5DigitsAllowedForStrength"][locale.languageCode]; String get unit => localizedValues["unit"][locale.languageCode]; String get boxQuantity => localizedValues["boxQuantity"][locale.languageCode]; String get orderTestOr => localizedValues["orderTestOr"][locale.languageCode]; - String get applyForRadiologyOrder => localizedValues["applyForRadiologyOrder"][locale.languageCode]; - String get applyForNewLabOrder => localizedValues["applyForNewLabOrder"][locale.languageCode]; + String get applyForRadiologyOrder => + localizedValues["applyForRadiologyOrder"][locale.languageCode]; + String get applyForNewLabOrder => + localizedValues["applyForNewLabOrder"][locale.languageCode]; String get addLabOrder => localizedValues["addLabOrder"][locale.languageCode]; - String get addRadiologyOrder => localizedValues["addRadiologyOrder"][locale.languageCode]; - String get newRadiologyOrder => localizedValues["newRadiologyOrder"][locale.languageCode]; + String get addRadiologyOrder => + localizedValues["addRadiologyOrder"][locale.languageCode]; + String get newRadiologyOrder => + localizedValues["newRadiologyOrder"][locale.languageCode]; String get orderDate => localizedValues["orderDate"][locale.languageCode]; String get examType => localizedValues["examType"][locale.languageCode]; String get health => localizedValues["health"][locale.languageCode]; String get summary => localizedValues["summary"][locale.languageCode]; - String get applyForNewPrescriptionsOrder => localizedValues["applyForNewPrescriptionsOrder"][locale.languageCode]; - String get noPrescriptionsFound => localizedValues["noPrescriptionsFound"][locale.languageCode]; - String get noMedicalFileFound => localizedValues["noMedicalFileFound"][locale.languageCode]; + String get applyForNewPrescriptionsOrder => + localizedValues["applyForNewPrescriptionsOrder"][locale.languageCode]; + String get noPrescriptionsFound => + localizedValues["noPrescriptionsFound"][locale.languageCode]; + String get noMedicalFileFound => + localizedValues["noMedicalFileFound"][locale.languageCode]; String get insurance22 => localizedValues["insurance22"][locale.languageCode]; String get approvals22 => localizedValues["approvals22"][locale.languageCode]; String get severe => localizedValues["severe"][locale.languageCode]; - String get graphDetails => localizedValues["graphDetails"][locale.languageCode]; + String get graphDetails => + localizedValues["graphDetails"][locale.languageCode]; String get discharged => localizedValues["discharged"][locale.languageCode]; - String get addNewOrderSheet => localizedValues["addNewOrderSheet"][locale.languageCode]; - String get addNewProgressNote => localizedValues["addNewProgressNote"][locale.languageCode]; + String get addNewOrderSheet => + localizedValues["addNewOrderSheet"][locale.languageCode]; + String get addNewProgressNote => + localizedValues["addNewProgressNote"][locale.languageCode]; String get notePending => localizedValues["notePending"][locale.languageCode]; - String get noteCanceled => localizedValues["noteCanceled"][locale.languageCode]; - String get noteVerified => localizedValues["noteVerified"][locale.languageCode]; + String get noteCanceled => + localizedValues["noteCanceled"][locale.languageCode]; + String get noteVerified => + localizedValues["noteVerified"][locale.languageCode]; String get noteVerify => localizedValues["noteVerify"][locale.languageCode]; String get noteConfirm => localizedValues["noteConfirm"][locale.languageCode]; String get noteAdd => localizedValues["noteAdd"][locale.languageCode]; @@ -1062,50 +1363,128 @@ class TranslationBase { String get report => localizedValues["report"][locale.languageCode]; String get discharge => localizedValues["discharge"][locale.languageCode]; String get none => localizedValues["none"][locale.languageCode]; - String get notRepliedYet => localizedValues["notRepliedYet"][locale.languageCode]; + String get notRepliedYet => + localizedValues["notRepliedYet"][locale.languageCode]; String get clearText => localizedValues["clearText"][locale.languageCode]; - String get medicalReportAdd => localizedValues['medicalReportAdd'][locale.languageCode]; - String get medicalReportVerify => localizedValues['medicalReportVerify'][locale.languageCode]; + String get medicalReportAdd => + localizedValues['medicalReportAdd'][locale.languageCode]; + String get medicalReportVerify => + localizedValues['medicalReportVerify'][locale.languageCode]; String get comments => localizedValues['comments'][locale.languageCode]; - String get initiateCall => localizedValues['initiateCall'][locale.languageCode]; + String get initiateCall => + localizedValues['initiateCall'][locale.languageCode]; String get endCall => localizedValues['endCall'][locale.languageCode]; String get transferTo => localizedValues['transferTo'][locale.languageCode]; String get admin => localizedValues['admin'][locale.languageCode]; - String get instructions => localizedValues['instructions'][locale.languageCode]; + String get instructions => + localizedValues['instructions'][locale.languageCode]; String get sendLC => localizedValues['sendLC'][locale.languageCode]; String get endLC => localizedValues['endLC'][locale.languageCode]; - String get consultation => localizedValues['consultation'][locale.languageCode]; + String get consultation => + localizedValues['consultation'][locale.languageCode]; String get resume => localizedValues['resume'][locale.languageCode]; String get theCall => localizedValues['theCall'][locale.languageCode]; - String get createNewMedicalReport => localizedValues['createNewMedicalReport'][locale.languageCode]; - String get historyPhysicalFinding => localizedValues['historyPhysicalFinding'][locale.languageCode]; - String get laboratoryPhysicalData => localizedValues['laboratoryPhysicalData'][locale.languageCode]; - String get impressionRecommendation => localizedValues['impressionRecommendation'][locale.languageCode]; + String get createNewMedicalReport => + localizedValues['createNewMedicalReport'][locale.languageCode]; + String get historyPhysicalFinding => + localizedValues['historyPhysicalFinding'][locale.languageCode]; + String get laboratoryPhysicalData => + localizedValues['laboratoryPhysicalData'][locale.languageCode]; + String get impressionRecommendation => + localizedValues['impressionRecommendation'][locale.languageCode]; String get onHold => localizedValues['onHold'][locale.languageCode]; String get verified => localizedValues['verified'][locale.languageCode]; - String get favoriteTemplates => localizedValues['favoriteTemplates'][locale.languageCode]; - String get allProcedures => localizedValues['allProcedures'][locale.languageCode]; - String get allRadiology => localizedValues['allRadiology'][locale.languageCode]; + String get favoriteTemplates => + localizedValues['favoriteTemplates'][locale.languageCode]; + String get allProcedures => + localizedValues['allProcedures'][locale.languageCode]; + String get allRadiology => + localizedValues['allRadiology'][locale.languageCode]; String get allLab => localizedValues['allLab'][locale.languageCode]; - String get allPrescription => localizedValues['allPrescription'][locale.languageCode]; - String get addPrescription => localizedValues['addPrescription'][locale.languageCode]; + String get allPrescription => + localizedValues['allPrescription'][locale.languageCode]; + String get addPrescription => + localizedValues['addPrescription'][locale.languageCode]; String get edit => localizedValues['edit'][locale.languageCode]; - String get summeryReply => localizedValues['summeryReply'][locale.languageCode]; - String get severityValidationError => localizedValues['severityValidationError'][locale.languageCode]; - String get textCopiedSuccessfully => localizedValues['textCopiedSuccessfully'][locale.languageCode]; + String get summeryReply => + localizedValues['summeryReply'][locale.languageCode]; + String get severityValidationError => + localizedValues['severityValidationError'][locale.languageCode]; + String get textCopiedSuccessfully => + localizedValues['textCopiedSuccessfully'][locale.languageCode]; String get roomNo => localizedValues['roomNo'][locale.languageCode]; String get seeMore => localizedValues['seeMore'][locale.languageCode]; - String get replayCallStatus => localizedValues['replayCallStatus'][locale.languageCode]; - String get patientArrived => localizedValues['patientArrived'][locale.languageCode]; - String get calledAndNoResponse => localizedValues['calledAndNoResponse'][locale.languageCode]; - String get underProcess => localizedValues['underProcess'][locale.languageCode]; - String get textResponse => localizedValues['textResponse'][locale.languageCode]; + String get replayCallStatus => + localizedValues['replayCallStatus'][locale.languageCode]; + String get patientArrived => + localizedValues['patientArrived'][locale.languageCode]; + String get calledAndNoResponse => + localizedValues['calledAndNoResponse'][locale.languageCode]; + String get underProcess => + localizedValues['underProcess'][locale.languageCode]; + String get textResponse => + localizedValues['textResponse'][locale.languageCode]; String get special => localizedValues['special'][locale.languageCode]; String get requestType => localizedValues['requestType'][locale.languageCode]; String get allClinic => localizedValues['allClinic'][locale.languageCode]; String get notReplied => localizedValues['notReplied'][locale.languageCode]; - + String get registerNewPatient => + localizedValues['registerNewPatient'][locale.languageCode]; + String get registeraPatient => + localizedValues['registeraPatient'][locale.languageCode]; + String get operationTimeStart => + localizedValues['operationTimeStart'][locale.languageCode]; + String get operationDate => + localizedValues['operationDate'][locale.languageCode]; + String get reservation => localizedValues['reservation'][locale.languageCode]; + String get anesthetist => localizedValues['anesthetist'][locale.languageCode]; + String get bloodTransfusedDetail => + localizedValues['bloodTransfusedDetail'][locale.languageCode]; + String get circulatingNurse => + localizedValues['circulatingNurse'][locale.languageCode]; + String get scrubNurse => localizedValues['scrubNurse'][locale.languageCode]; + String get otherSpecimen => + localizedValues['otherSpecimen'][locale.languageCode]; + String get microbiologySpecimen => + localizedValues['microbiologySpecimen'][locale.languageCode]; + String get histopathSpecimen => + localizedValues['histopathSpecimen'][locale.languageCode]; + String get bloodLossDetail => + localizedValues['bloodLossDetail'][locale.languageCode]; + String get complicationDetails1 => + localizedValues['complicationDetails1'][locale.languageCode]; + String get postOperationInstruction => + localizedValues['postOperationInstruction'][locale.languageCode]; + String get surgeryProcedure => + localizedValues['surgeryProcedure'][locale.languageCode]; + String get finding => localizedValues['finding'][locale.languageCode]; + String get preOperationDiagnosis => + localizedValues['preOperationDiagnosis'][locale.languageCode]; + String get postOperationDiagnosis => + localizedValues['postOperationDiagnosis'][locale.languageCode]; + String get surgeon => localizedValues['surgeon'][locale.languageCode]; + String get assistant => localizedValues['assistant'][locale.languageCode]; + String get askForIdentification => + localizedValues['askForIdentification'][locale.languageCode]; + String get iDNumber => localizedValues['iDNumber'][locale.languageCode]; + String get calender => localizedValues['calender'][locale.languageCode]; + String get gregorian => localizedValues['gregorian'][locale.languageCode]; + String get hijri => localizedValues['hijri'][locale.languageCode]; + String get birthdate => localizedValues['birthdate'][locale.languageCode]; + String get activation => localizedValues['activation'][locale.languageCode]; + String get confirmation => + localizedValues['confirmation'][locale.languageCode]; + String get diabetic => localizedValues['diabetic'][locale.languageCode]; + String get chart => localizedValues['chart'][locale.languageCode]; + + String get investigation => + localizedValues['investigation'][locale.languageCode]; + String get conditionOnDischarge => + localizedValues['conditionOnDischarge'][locale.languageCode]; + String get planedProcedure => + localizedValues['planedProcedure'][locale.languageCode]; + String get moreDetails => localizedValues['moreDetails'][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/widgets/auth/method_type_card.dart b/lib/widgets/auth/method_type_card.dart index 6d091756..9839d0ad 100644 --- a/lib/widgets/auth/method_type_card.dart +++ b/lib/widgets/auth/method_type_card.dart @@ -1,21 +1,92 @@ +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; import 'package:hexcolor/hexcolor.dart'; +// class MethodTypeCard extends StatelessWidget { +// const MethodTypeCard({ +// Key key, +// this.assetPath, +// this.onTap, +// this.label, this.height = 20, this.isSvg = true, +// }) : super(key: key); +// final String assetPath; +// final Function onTap; +// final String label; +// final double height; +// final bool isSvg; +// +// @override +// Widget build(BuildContext context) { +// return InkWell( +// onTap: onTap, +// child: Container( +// margin: EdgeInsets.all(10), +// decoration: BoxDecoration( +// color: Colors.white, +// borderRadius: BorderRadius.all( +// Radius.circular(10), +// ), +// border: Border.all( +// color: HexColor('#707070'), +// width: 0.1), +// ), +// height: 170, +// child: Padding( +// padding: EdgeInsets.fromLTRB(20, 15, 20, 15), +// child: Column( +// mainAxisAlignment: MainAxisAlignment.center, +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Row( +// children: [ +// isSvg?SvgPicture.asset(assetPath, height: 60, +// width: 60,):Image.asset( +// assetPath, +// height: 60, +// width: 60, +// ), +// ], +// ), +// SizedBox( +// height:height , +// ), +// AppText( +// label, +// fontSize: 14, +// color: Color(0xFF2E303A), +// fontWeight: FontWeight.bold, +// ) +// ], +// ), +// )), +// ); +// } +// } +// +// +// + class MethodTypeCard extends StatelessWidget { const MethodTypeCard({ Key key, - this.assetPath, - this.onTap, - this.label, this.height = 20, + this.assetPath, + this.onTap, + this.label, + this.height = 20, this.isSvg = true, }) : super(key: key); final String assetPath; - final Function onTap; + final GestureTapCallback onTap; final String label; final double height; + final bool isSvg; + @override Widget build(BuildContext context) { + double cardHeight = SizeConfig.heightMultiplier * (SizeConfig.isHeightVeryShort? 22 : SizeConfig.isHeightLarge?25:20); return InkWell( onTap: onTap, child: Container( @@ -25,38 +96,38 @@ class MethodTypeCard extends StatelessWidget { borderRadius: BorderRadius.all( Radius.circular(10), ), - border: Border.all( - color: HexColor('#707070'), - width: 0.1), + border: Border.all(color: HexColor('#707070'), width: 0.1), ), - height: 170, + height: cardHeight, child: Padding( - padding: EdgeInsets.fromLTRB(20, 15, 20, 15), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - Image.asset( - assetPath, - height: 60, - width: 60, - ), - ], - ), - SizedBox( - height:height , - ), - AppText( - label, - fontSize: 14, - color: Color(0xFF2E303A), - fontWeight: FontWeight.bold, - ) - ], + padding: const EdgeInsets.all(12.0), + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + isSvg?SvgPicture.asset(assetPath, width: SizeConfig.widthMultiplier* (14), + height: cardHeight * 0.20): Image.asset( + assetPath, + width: SizeConfig.widthMultiplier* (12), + height: cardHeight * 0.35, + // height: , + ), + SizedBox( + height: height, + ), + AppText( + label, + fontSize: SizeConfig.getTextMultiplierBasedOnWidth()* (SizeConfig.isHeightVeryShort?3:3.7), + color: AppGlobal.appTextColor, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ) + ], + ), ), )), ); } } + diff --git a/lib/widgets/auth/sms-popup.dart b/lib/widgets/auth/sms-popup.dart index 0c374e58..4e99d316 100644 --- a/lib/widgets/auth/sms-popup.dart +++ b/lib/widgets/auth/sms-popup.dart @@ -1,6 +1,5 @@ import 'dart:async'; -import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/auth_method_types.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; @@ -9,6 +8,7 @@ import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; + class SMSOTP { final AuthMethodTypes type; final mobileNo; @@ -48,231 +48,307 @@ class SMSOTP { String displayTime = ''; bool isClosed = false; displayDialog(BuildContext context) async { + double dialogWidth = MediaQuery.of(context).size.width * 0.90; + double dialogInputWidth = (dialogWidth / 4) - + (SizeConfig.isWidthLarge + ? SizeConfig.getWidthMultiplier(width: dialogWidth) * 4.5 + : 20); + double dialogHeight = SizeConfig.isHeightVeryShort + ? MediaQuery.of(context).size.height * 0.50 + : MediaQuery.of(context).size.height * 0.40; return showDialog( - context: context, - barrierColor: Colors.black.withOpacity(0.7), - builder: (context) { - projectProvider = Provider.of(context); - return AlertDialog( - contentPadding: EdgeInsets.fromLTRB(24.0, 0.0, 0.0, 24.0), - content: StatefulBuilder(builder: (context, setState) { - if (displayTime == '') { - startTimer(setState); - } - return Container( - color: Colors.white, - height: MediaQuery.of(context).size.height * 0.50, - width: MediaQuery.of(context).size.width * 0.84, - child: Center( - child: SingleChildScrollView( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.all(13), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - type == AuthMethodTypes.SMS - ? Padding( - child: Icon( - DoctorApp.verify_sms_1, - size: 50, - ), - padding: EdgeInsets.only(bottom: 20), - ) - : Padding( - child: Icon( - DoctorApp.verify_whtsapp, - size: 50, - ), - padding: EdgeInsets.only(bottom: 20), - ), + context: context, + builder: (ctx) => Center( + child: Container( + color: Colors.white, + height: dialogHeight, + width: dialogWidth, + child: Material( + color: Colors.white, + child: SingleChildScrollView( + child: Center( + child: Container( + color: Colors.white, + child: StatefulBuilder(builder: (context, setState) { + if (displayTime == '') { + startTimer(setState); + } + + return Center( + child: FractionallySizedBox( + widthFactor: 0.9, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: SizeConfig.getHeightMultiplier( + height: dialogHeight) * + 2, + ), Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - Padding( - padding: EdgeInsets.only( - left: 10, right: 10, bottom: 20), - child: IconButton( - icon: Icon(Icons.close), - iconSize: 40, - onPressed: () { - this.isClosed = true; - Navigator.pop(context); - this.onFailure(); - }, - )) - ], - ) - ])), - Padding( - padding: EdgeInsets.only(top: 5, right: 5), - child: AppText( - TranslationBase.of(context).verificationMessage + - ' XXXXXX' + - mobileNo - .toString() - .substring(mobileNo.toString().length - 3), - textAlign: TextAlign.start, - fontWeight: FontWeight.bold, - fontSize: 14, - maxLines: 2, - )), - Form( - key: verifyAccountForm, - child: Padding( - padding: EdgeInsets.only(top: 20), - child: Directionality( - textDirection: TextDirection.ltr, - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Container( - width: SizeConfig.realScreenWidth * 0.16, - margin: EdgeInsets.all(5), - child: TextFormField( - textInputAction: TextInputAction.next, - style: buildTextStyle(), - autofocus: true, - maxLength: 1, - controller: digit1, - textAlign: TextAlign.center, - keyboardType: TextInputType.number, - decoration: buildInputDecoration(context), - onSaved: (val) {}, - validator: validateCodeDigit, - onFieldSubmitted: (_) { - FocusScope.of(context) - .requestFocus(focusD2); - }, - onChanged: (val) { - if (val.length == 1) { - FocusScope.of(context) - .requestFocus(focusD2); - verifyAccountFormValue['digit1'] = - val.trim(); - checkValue(); - } - }, - ), - ), - Container( - width: SizeConfig.realScreenWidth * 0.16, - margin: EdgeInsets.all(5), - child: TextFormField( - focusNode: focusD2, - textInputAction: TextInputAction.next, - maxLength: 1, - controller: digit2, - textAlign: TextAlign.center, - style: buildTextStyle(), - keyboardType: TextInputType.number, - decoration: buildInputDecoration(context), - onSaved: (val) {}, - onFieldSubmitted: (_) { - FocusScope.of(context) - .requestFocus(focusD3); - }, - onChanged: (val) { - if (val.length == 1) { - FocusScope.of(context) - .requestFocus(focusD3); - verifyAccountFormValue['digit2'] = - val.trim(); - checkValue(); - } - }, - validator: validateCodeDigit), + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Icon( + type == AuthMethodTypes.SMS + ? DoctorApp.verify_sms_1 + : DoctorApp.verify_whtsapp, + size: SizeConfig.getHeightMultiplier( + height: dialogHeight) * + 9, + color: Color(0xFF2B353E), + ), + Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + IconButton( + icon: Icon(Icons.close), + color: Color(0xFF2B353E), + iconSize: + SizeConfig.getHeightMultiplier( + height: dialogHeight) * + 15, + onPressed: () { + this.isClosed = true; + Navigator.pop(context); + this.onFailure(); + }, + ) + ], + ) + ]), + SizedBox( + height: SizeConfig.getHeightMultiplier( + height: dialogHeight) * + (SizeConfig.isHeightVeryShort ? 10 : 5), + ), + Padding( + padding: EdgeInsets.only(top: 5, right: 5), + child: AppText( + TranslationBase.of(context) + .verificationMessage + + ' XXXXXX' + + mobileNo.toString().substring( + mobileNo.toString().length - 3), + textAlign: TextAlign.start, + fontWeight: FontWeight.w700, + letterSpacing: -0.48, + color: Color(0xFF2B353E), + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth( + width: dialogWidth) * + 3.5, //14, + maxLines: 2, + )), + Form( + key: verifyAccountForm, + child: Padding( + padding: EdgeInsets.only( + top: SizeConfig.getHeightMultiplier( + height: dialogHeight) * + 2), + child: Directionality( + textDirection: TextDirection.ltr, + child: Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + Container( + width: dialogInputWidth, + height: + SizeConfig.getHeightMultiplier( + height: dialogHeight) * + 30, + margin: EdgeInsets.symmetric( + vertical: 2, horizontal: 5), + child: TextFormField( + textInputAction: + TextInputAction.next, + style: buildTextStyle(), + autofocus: true, + maxLength: 1, + controller: digit1, + textAlign: TextAlign.center, + keyboardType: + TextInputType.number, + decoration: + buildInputDecoration(context), + onSaved: (val) {}, + validator: validateCodeDigit, + onFieldSubmitted: (_) { + FocusScope.of(context) + .requestFocus(focusD2); + }, + onChanged: (val) { + if (val.length == 1) { + FocusScope.of(context) + .requestFocus(focusD2); + verifyAccountFormValue[ + 'digit1'] = val.trim(); + checkValue(); + } + }, + ), + ), + Container( + width: dialogInputWidth, + height: + SizeConfig.getHeightMultiplier( + height: dialogHeight) * + 30, + margin: EdgeInsets.symmetric( + vertical: 2, horizontal: 5), + child: TextFormField( + focusNode: focusD2, + textInputAction: + TextInputAction.next, + maxLength: 1, + controller: digit2, + textAlign: TextAlign.center, + style: buildTextStyle(), + keyboardType: + TextInputType.number, + decoration: + buildInputDecoration( + context), + onSaved: (val) {}, + onFieldSubmitted: (_) { + FocusScope.of(context) + .requestFocus(focusD3); + }, + onChanged: (val) { + if (val.length == 1) { + FocusScope.of(context) + .requestFocus(focusD3); + verifyAccountFormValue[ + 'digit2'] = val.trim(); + checkValue(); + } + }, + validator: validateCodeDigit), + ), + Container( + margin: EdgeInsets.symmetric( + vertical: 2, horizontal: 5), + width: dialogInputWidth, + height: SizeConfig + .getHeightMultiplier( + height: + dialogHeight) * + 30, + child: TextFormField( + focusNode: focusD3, + textInputAction: + TextInputAction.next, + maxLength: 1, + controller: digit3, + textAlign: TextAlign.center, + style: buildTextStyle(), + keyboardType: + TextInputType.number, + decoration: + buildInputDecoration( + context), + onSaved: (val) {}, + onFieldSubmitted: (_) { + FocusScope.of(context) + .requestFocus(focusD4); + }, + onChanged: (val) { + if (val.length == 1) { + FocusScope.of(context) + .requestFocus( + focusD4); + verifyAccountFormValue[ + 'digit3'] = + val.trim(); + checkValue(); + } + }, + validator: + validateCodeDigit)), + Container( + margin: EdgeInsets.symmetric( + vertical: 2, horizontal: 5), + width: dialogInputWidth, + height: SizeConfig + .getHeightMultiplier( + height: + dialogHeight) * + 30, + child: TextFormField( + focusNode: focusD4, + maxLength: 1, + textAlign: TextAlign.center, + style: buildTextStyle(), + controller: digit4, + keyboardType: + TextInputType.number, + decoration: + buildInputDecoration( + context), + onFieldSubmitted: (_) { + FocusScope.of(context) + .requestFocus(focusD4); + }, + onChanged: (val) { + if (val.length == 1) { + verifyAccountFormValue[ + 'digit4'] = + val.trim(); + checkValue(); + } + }, + validator: + validateCodeDigit)), + ], + )), ), - Container( - margin: EdgeInsets.all(5), - width: SizeConfig.realScreenWidth * 0.16, - child: TextFormField( - focusNode: focusD3, - textInputAction: TextInputAction.next, - maxLength: 1, - controller: digit3, - textAlign: TextAlign.center, - style: buildTextStyle(), - keyboardType: TextInputType.number, - decoration: - buildInputDecoration(context), - onSaved: (val) {}, - onFieldSubmitted: (_) { - FocusScope.of(context) - .requestFocus(focusD4); - }, - onChanged: (val) { - if (val.length == 1) { - FocusScope.of(context) - .requestFocus(focusD4); - verifyAccountFormValue['digit3'] = - val.trim(); - checkValue(); - } - }, - validator: validateCodeDigit)), - Container( - margin: EdgeInsets.all(5), - width: SizeConfig.realScreenWidth * 0.16, - child: TextFormField( - focusNode: focusD4, - maxLength: 1, - textAlign: TextAlign.center, - style: buildTextStyle(), - controller: digit4, - keyboardType: TextInputType.number, - decoration: - buildInputDecoration(context), - onFieldSubmitted: (_) { - FocusScope.of(context) - .requestFocus(focusD4); - }, - onChanged: (val) { - if (val.length == 1) { - verifyAccountFormValue['digit4'] = - val.trim(); - checkValue(); - } - }, - validator: validateCodeDigit)), - ], - )), - ), - ), - Padding( - padding: const EdgeInsets.all(12.0), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).validationMessage + - ' ', - fontWeight: FontWeight.w600, - fontSize: 14, - ), - AppText( - displayTime, - color: Colors.red, - textAlign: TextAlign.start, - fontWeight: FontWeight.bold, - fontSize: 14, - ) - ]), - ) - ], - ))), - ); - }), - ); - }); + ), + Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .validationMessage + + ' ', + textAlign: TextAlign.start, + fontWeight: FontWeight.w700, + letterSpacing: -0.48, + color: Color(0xFF2B353E), + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth( + width: dialogWidth) * + 3.5, + ), + AppText( + displayTime, + color: Colors.red, + textAlign: TextAlign.start, + fontWeight: FontWeight.bold, + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth( + width: dialogWidth) * + 3.5, + ) + ]) + ], + ), + ), + ); + })), + ), + ), + ), + ), + ), + ); } TextStyle buildTextStyle() { return TextStyle( - fontSize: SizeConfig.textMultiplier * 3, + fontSize: SizeConfig.textMultiplier * 2.5, ); } @@ -316,7 +392,6 @@ class SMSOTP { digit3.text.toString() + digit4.text.toString()); this.isClosed = true; - } } @@ -341,7 +416,7 @@ class SMSOTP { displayTime = this.getSecondsAsDigitalClock(this.remainingTime); }); - Future.delayed(Duration(seconds: 1), () { + Future.delayed(Duration(seconds: 1), () { if (this.remainingTime > 0) { if (isClosed == false) { startTimer(setState); diff --git a/lib/widgets/auth/verification_methods_list.dart b/lib/widgets/auth/verification_methods_list.dart index 27dbe8bf..97fbb42b 100644 --- a/lib/widgets/auth/verification_methods_list.dart +++ b/lib/widgets/auth/verification_methods_list.dart @@ -37,7 +37,7 @@ class _VerificationMethodsListState extends State { switch (widget.authMethodType) { case AuthMethodTypes.WhatsApp: return MethodTypeCard( - assetPath: 'assets/images/verify-whtsapp.png', + assetPath: 'assets/images/svgs/verification/verify-whtsapp.svg', onTap: () => {widget.authenticateUser(AuthMethodTypes.WhatsApp, true)}, label: TranslationBase @@ -47,7 +47,7 @@ class _VerificationMethodsListState extends State { break; case AuthMethodTypes.SMS: return MethodTypeCard( - assetPath: "assets/images/verify-sms.png", + assetPath: "assets/images/svgs/verification/verify-sms.svg", onTap: () => {widget.authenticateUser(AuthMethodTypes.SMS, true)}, label:TranslationBase .of(context) @@ -56,7 +56,7 @@ class _VerificationMethodsListState extends State { break; case AuthMethodTypes.Fingerprint: return MethodTypeCard( - assetPath: 'assets/images/verification_fingerprint_icon.png', + assetPath: 'assets/images/svgs/verification/verify-finger.svg', onTap: () async { if (await widget.authenticationViewModel .checkIfBiometricAvailable(BiometricType.fingerprint)) { @@ -71,7 +71,7 @@ class _VerificationMethodsListState extends State { break; case AuthMethodTypes.FaceID: return MethodTypeCard( - assetPath: 'assets/images/verification_faceid_icon.png', + assetPath: 'assets/images/svgs/verification/verify-face.svg', onTap: () async { if (await widget.authenticationViewModel .checkIfBiometricAvailable(BiometricType.face)) { @@ -88,6 +88,7 @@ class _VerificationMethodsListState extends State { return MethodTypeCard( assetPath: 'assets/images/login/more_icon.png', onTap: widget.onShowMore, + isSvg: false, label: TranslationBase.of(context).moreVerification, height: 0, ); diff --git a/lib/widgets/dashboard/activity_button.dart b/lib/widgets/dashboard/activity_button.dart index ff9db962..4a6e90cd 100644 --- a/lib/widgets/dashboard/activity_button.dart +++ b/lib/widgets/dashboard/activity_button.dart @@ -1,42 +1,52 @@ +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; -class GetActivityButton extends StatelessWidget { +class GetActivityCard extends StatelessWidget { final value; - GetActivityButton(this.value); + GetActivityCard(this.value); @override Widget build(BuildContext context) { + double width = SizeConfig.heightMultiplier* (SizeConfig.isHeightVeryShort?16:SizeConfig.isHeightShort?14:SizeConfig.isHeightLarge?15:13); return Container( - width: MediaQuery.of(context).size.height * 0.125, - padding: EdgeInsets.all(5), - margin: EdgeInsets.all(5), + width: width, + padding: EdgeInsets.symmetric(horizontal: SizeConfig.heightMultiplier * .4, vertical: SizeConfig.heightMultiplier * .2), + margin: EdgeInsets.all(SizeConfig.widthMultiplier *1), decoration: BoxDecoration( color: Colors.white, + border: Border.all(width: 1.5, color: Color(0xFFEFEFEF)), borderRadius: BorderRadius.circular(15), ), child: Padding( - padding: const EdgeInsets.fromLTRB(8, 0, 8, 0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - AppText( - value.value.toString(), - fontSize: 27, - fontWeight: FontWeight.bold, - color: Color(0xFF2B353E), - ), - AppText( - value.kPIParameter, - textOverflow: TextOverflow.clip, - fontSize: 10, - color: Color(0xFF2B353E), - textAlign: TextAlign.start, - fontWeight: FontWeight.w700, - ), - ], + padding: const EdgeInsets.fromLTRB(8,8, 8, 4), + child: Center( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + AppText( + value.value.toString(), + fontSize: SizeConfig.getTextMultiplierBasedOnWidth(width: width)* 25, + fontWeight: FontWeight.bold, + color: AppGlobal.appTextColor, + letterSpacing: -0.93, + ), + AppText( + value.kPIParameter, + textOverflow: TextOverflow.clip, + fontHeight: 1.4, + + fontSize: SizeConfig.getTextMultiplierBasedOnWidth(width: width)* (SizeConfig.isHeightVeryShort?8: SizeConfig.isHeightShort?8: 9.3), + color: AppGlobal.appTextColor, + textAlign: TextAlign.start, + fontWeight: FontWeight.w600, + letterSpacing: -0.33, + ), + ], + ), ), ), ); diff --git a/lib/widgets/dashboard/out_patient_stack.dart b/lib/widgets/dashboard/out_patient_stack.dart index fe05d69d..6b3d87d5 100644 --- a/lib/widgets/dashboard/out_patient_stack.dart +++ b/lib/widgets/dashboard/out_patient_stack.dart @@ -1,4 +1,7 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart'; +import 'package:doctor_app_flutter/screens/home/label.dart'; +import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; @@ -9,42 +12,87 @@ class GetOutPatientStack extends StatelessWidget { @override Widget build(BuildContext context) { + + double barHeight = + SizeConfig.heightMultiplier * (SizeConfig.isHeightVeryShort ? 20 : SizeConfig.isHeightLarge?20:17); + value.summaryoptions.sort((Summaryoptions a, Summaryoptions b) => b.value - a.value); + value.summaryoptions .sort((Summaryoptions a, Summaryoptions b) => b.value - a.value); var list = new List(); value.summaryoptions.forEach((result) => - {list.add(getStack(result, value.summaryoptions.first.value,context))}); - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - Container( - height: 30, - child: AppText( - value.kPIName, - medium: true, - fontSize: 14, - ), + {list.add(getStack(result, value.summaryoptions.first.value,context,barHeight))}); + return Container( + margin: EdgeInsets.only(bottom: 20, top: 10, left: 5, right: 5), + decoration: BoxDecoration( + + color: Colors.white, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(20), + topRight: Radius.circular(20), + bottomLeft: Radius.circular(20), + bottomRight: Radius.circular(20) ), - Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: list) - ], + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.5), + spreadRadius: 0, + blurRadius: 9, + offset: Offset(0, 0), // changes position of shadow + ), + ], + ), + child: Padding( + padding: const EdgeInsets.all(5.0), + child:Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Container( + padding: EdgeInsets.symmetric(horizontal: 5, vertical: 5), + child: Label( + firstLine: Helpers.getLabelFromKPI(value.kPIName), + secondLine: Helpers.getNameFromKPI(value.kPIName), + color: Color(0xFF2B353E), + firstLineFontSize: + SizeConfig.getHeightMultiplier(height: barHeight) * + (SizeConfig.isHeightVeryShort + ? 10 + : SizeConfig.isHeightShort + ? 10 + : 8.5), + secondLineFontSize: + SizeConfig.getHeightMultiplier(height: barHeight) * + (SizeConfig.isHeightVeryShort + ? 15 + : SizeConfig.isHeightShort + ? 15 + : 14.5), + ), + ), + Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: list) + ], + ) + + ), ); } - getStack(Summaryoptions value, max,context) { + + + getStack(Summaryoptions value, max, context, barHeight) { return Expanded( child: Container( margin: EdgeInsets.symmetric(horizontal: 2), decoration: BoxDecoration( gradient: LinearGradient( begin: Alignment.topLeft, - end: Alignment( - 0.0, 1.0), // 10% of the width, so there are ten blinds. - colors: [Color(0x8FF5F6FA), Colors.red[50]], // red to yellow + end: Alignment(0.0, 1.0), // 10% of the width, so there are ten blinds. + colors: [Color(0x8FF5F6FA), Colors.red[100]], // red to yellow tileMode: TileMode.mirror, // repeats the gradient over the canvas ), - borderRadius: BorderRadius.circular(8), + borderRadius: BorderRadius.circular(4), // color: Colors.red[50], ), child: Stack(children: [ @@ -55,15 +103,15 @@ class GetOutPatientStack extends StatelessWidget { child: Container( child: SizedBox(), padding: EdgeInsets.all(10), - height: max != 0 ? ((MediaQuery.of(context).size.height * 0.24 )* value.value) / max : 0, + height: max != 0 ? ((barHeight) * value.value) / max : 0, decoration: BoxDecoration( - borderRadius: BorderRadius.circular(8), - color: Color(0x63D02127), + borderRadius: BorderRadius.circular(4), + color: Color(0xFFD02127).withOpacity(0.39), ), ), ), Container( - height: (MediaQuery.of(context).size.height * 0.24 ), + height: barHeight, margin: EdgeInsets.only(left: 5, top: 5), padding: EdgeInsets.all(10), child: RotatedBox( @@ -71,29 +119,34 @@ class GetOutPatientStack extends StatelessWidget { child: Center( child: Align( child: FittedBox( - child: Row( - children: [ - AppText( - value.kPIParameter, - fontSize: 10, - textAlign: TextAlign.center, - color: Color(0xFF2B353E), - fontWeight: FontWeight.w700, + child: Row( + children: [ + AppText( + value.kPIParameter, + fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 2.5, + textAlign: TextAlign.center, + color: Color(0xFF2B353E), + fontWeight: FontWeight.w500, + letterSpacing: -0.3, + ), + AppText( + ' (' + value.value.toString() + ') ', + fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 2.5, + textAlign: TextAlign.center, + color: Color(0xFF2B353E), + letterSpacing: -0.3, + fontWeight: FontWeight.bold, + ), + ], ), - AppText( - ' (' + value.value.toString() + ') ', - fontSize: 12, - textAlign: TextAlign.center, - color: Color(0xFF2B353E), - fontWeight: FontWeight.bold, - ), - ], - ), - )), + )), ), )) ]), ), ); } + } + + diff --git a/lib/widgets/dashboard/row_count.dart b/lib/widgets/dashboard/row_count.dart index a22932f4..820dcd37 100644 --- a/lib/widgets/dashboard/row_count.dart +++ b/lib/widgets/dashboard/row_count.dart @@ -1,3 +1,5 @@ +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; @@ -5,11 +7,15 @@ class RowCounts extends StatelessWidget { final name; final int count; final Color c; - RowCounts(this.name, this.count, this.c); + final double height; + + + RowCounts(this.name, this.count, this.c, {this.height}); @override Widget build(BuildContext context) { return Container( - padding: EdgeInsets.only(top: 5, bottom: 5), + padding: EdgeInsets.only(top:SizeConfig.getHeightMultiplier(height:height )* 0.2 , bottom: SizeConfig.getHeightMultiplier(height:height )* 0.2), + child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -19,20 +25,23 @@ class RowCounts extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start, children: [ - Expanded( - child: AppText( - name, - color: Colors.black, - textAlign: TextAlign.start, // from TextAlign.center - fontSize: 11, - textOverflow: TextOverflow.ellipsis, - ), + AppText( + name, + color: AppGlobal.appTextColor, + fontWeight: FontWeight.w400, + textAlign: TextAlign.start, // from TextAlign.center + fontSize: 14, + letterSpacing: -0.84, + + textOverflow: TextOverflow.ellipsis, ), + SizedBox(width: 4,), AppText( - ' (' + count.toString() + ')', - color: Colors.black, + count.toString(), + color: AppGlobal.appTextColor, textAlign: TextAlign.center, - fontSize: 12, + fontSize: 14, + letterSpacing: -0.84, fontWeight: FontWeight.bold, ) ], diff --git a/lib/widgets/doctor/my_schedule_widget.dart b/lib/widgets/doctor/my_schedule_widget.dart index 54df8cd9..5c21f9ad 100644 --- a/lib/widgets/doctor/my_schedule_widget.dart +++ b/lib/widgets/doctor/my_schedule_widget.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/models/doctor/list_doctor_working_hours_table_model.dart'; @@ -52,7 +53,7 @@ class MyScheduleWidget extends StatelessWidget { width: MediaQuery.of(context).size.width * 0.55, child: CardWithBgWidget( bgColor: AppDateUtils.isToday(workingHoursTable.date) - ? Colors.green[500] + ? AppGlobal.appGreenColor : Colors.transparent, // hasBorder: false, widget: Container( @@ -64,7 +65,7 @@ class MyScheduleWidget extends StatelessWidget { "Today", fontSize: 1.8 * SizeConfig.textMultiplier, fontFamily: 'Poppins', - color: Colors.green[500], + color: AppGlobal.appGreenColor, // fontSize: 18 ), SizedBox( diff --git a/lib/widgets/patients/patient-referral-item-widget.dart b/lib/widgets/patients/patient-referral-item-widget.dart index ff1cb256..0e077895 100644 --- a/lib/widgets/patients/patient-referral-item-widget.dart +++ b/lib/widgets/patients/patient-referral-item-widget.dart @@ -1,9 +1,11 @@ +import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/user-guid/CusomRow.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; @@ -53,7 +55,7 @@ class PatientReferralItemWidget extends StatelessWidget { ProjectViewModel projectViewModel = Provider.of(context); return Container( - margin: EdgeInsets.only(left: 16.0, right: 16.0, top: 8.0), + margin: EdgeInsets.only(left: 16.0, right: 16.0, top: 0.0), child: Column( children: [ Container( @@ -61,9 +63,9 @@ class PatientReferralItemWidget extends StatelessWidget { bgColor: referralStatusCode == 1 ? Color(0xffc4aa54) : referralStatusCode == 2 - ? Colors.green[700] + ? AppGlobal.appGreenColor : referralStatusCode == 46 - ? Colors.green[900] + ? AppGlobal.appGreenColor : referralStatusCode == 4 ? Colors.red[700] : Colors.red[900], @@ -80,14 +82,15 @@ class PatientReferralItemWidget extends StatelessWidget { AppText( referralStatus != null ? referralStatus : "", fontFamily: 'Poppins', - fontSize: 1.9 * SizeConfig.textMultiplier, - fontWeight: FontWeight.w700, + fontSize: 10.0, + letterSpacing: -0.4, + fontWeight: FontWeight.w600, color: referralStatusCode == 1 ? Color(0xffc4aa54) : referralStatusCode == 2 - ? Colors.green[700] + ? AppGlobal.appGreenColor : referralStatusCode == 46 - ? Colors.green[900] + ? AppGlobal.appGreenColor : referralStatusCode == 4 ? Colors.red[700] : Colors.red[900], @@ -96,7 +99,8 @@ class PatientReferralItemWidget extends StatelessWidget { referredDate, fontFamily: 'Poppins', fontWeight: FontWeight.w600, - fontSize: 2.0 * SizeConfig.textMultiplier, + letterSpacing: -0.48, + fontSize: 12.0, color: Color(0XFF28353E), ) ], @@ -107,24 +111,23 @@ class PatientReferralItemWidget extends StatelessWidget { Expanded( child: AppText( patientName, - fontSize: SizeConfig.textMultiplier * 2.2, - fontWeight: FontWeight.bold, - color: Colors.black, + fontSize: 16.0, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), fontFamily: 'Poppins', + letterSpacing: -0.64, ), ), SizedBox( - width: 4, + width: 0, ), patientGender == 1 ? Icon( DoctorApp.male_2, color: Colors.blue, ) - : Icon( - DoctorApp.female_1, - color: Colors.pink, - ), + : Icon(DoctorApp.female_1, + color: Color(0xffF0448D)), SizedBox( width: 4, ), @@ -132,8 +135,9 @@ class PatientReferralItemWidget extends StatelessWidget { referredTime, fontFamily: 'Poppins', fontWeight: FontWeight.w600, - fontSize: 1.8 * SizeConfig.textMultiplier, + fontSize: 12.0, color: Color(0XFF575757), + letterSpacing: 0.48, ) ], ), @@ -147,19 +151,10 @@ class PatientReferralItemWidget extends StatelessWidget { Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - AppText( - TranslationBase.of(context).fileNumber, - fontFamily: 'Poppins', - fontWeight: FontWeight.w600, - fontSize: 1.7 * SizeConfig.textMultiplier, - color: Color(0XFF575757), - ), - AppText( - patientID, - fontFamily: 'Poppins', - fontWeight: FontWeight.w700, - fontSize: 1.6 * SizeConfig.textMultiplier, - color: Color(0XFF2E303A), + CustomRow( + label: + TranslationBase.of(context).fileNumber, + value: patientID, ), ], ), @@ -167,30 +162,18 @@ class PatientReferralItemWidget extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ - AppText( - isSameBranch + CustomRow( + label: isSameBranch ? TranslationBase.of(context) .referredFrom : TranslationBase.of(context).refClinic, - fontFamily: 'Poppins', - fontWeight: FontWeight.w600, - fontSize: 1.7 * SizeConfig.textMultiplier, - color: Color(0XFF575757), - ), - Expanded( - child: AppText( - !isReferralClinic - ? isSameBranch - ? TranslationBase.of(context) - .sameBranch - : TranslationBase.of(context) - .otherBranch - : " " + referralClinic, - fontFamily: 'Poppins', - fontWeight: FontWeight.w700, - fontSize: 1.6 * SizeConfig.textMultiplier, - color: Color(0XFF2E303A), - ), + value: !isReferralClinic + ? isSameBranch + ? TranslationBase.of(context) + .sameBranch + : TranslationBase.of(context) + .otherBranch + : " " + referralClinic, ), ], ), @@ -201,9 +184,10 @@ class PatientReferralItemWidget extends StatelessWidget { children: [ AppText( nationality != null ? nationality : "", - fontWeight: FontWeight.bold, + fontWeight: FontWeight.w600, color: Color(0xFF2E303A), - fontSize: 1.4 * SizeConfig.textMultiplier, + fontSize: 10.0, + letterSpacing: -0.4, ), nationalityFlag != null ? ClipRRect( @@ -227,22 +211,9 @@ class PatientReferralItemWidget extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ - AppText( - TranslationBase.of(context).remarks + " : ", - fontFamily: 'Poppins', - fontWeight: FontWeight.w600, - fontSize: 1.7 * SizeConfig.textMultiplier, - color: Color(0XFF575757), - ), - Expanded( - child: AppText( - remark ?? "", - fontFamily: 'Poppins', - fontWeight: FontWeight.w700, - fontSize: 1.6 * SizeConfig.textMultiplier, - color: Color(0XFF2E303A), - maxLines: 1, - ), + CustomRow( + label: TranslationBase.of(context).remarks + " : ", + value: remark ?? "", ), ], ), @@ -298,19 +269,21 @@ class PatientReferralItemWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText( - referralDoctorName, + referralDoctorName ?? "", fontFamily: 'Poppins', - fontWeight: FontWeight.w800, - fontSize: 1.7 * SizeConfig.textMultiplier, - color: Colors.black, + fontWeight: FontWeight.w600, + fontSize: 14.0, + color: Color(0xff2E303A), + letterSpacing: -0.56, ), if (clinicDescription != null) AppText( clinicDescription, fontFamily: 'Poppins', - fontWeight: FontWeight.w700, - fontSize: 1.4 * SizeConfig.textMultiplier, - color: Color(0XFF2E303A), + fontWeight: FontWeight.w600, + fontSize: 10.0, + color: Color(0xff575757), + letterSpacing: -0.4, ), ], ), diff --git a/lib/widgets/patients/patient_card/PatientCard.dart b/lib/widgets/patients/patient_card/PatientCard.dart index ea3a0940..49d2eb7a 100644 --- a/lib/widgets/patients/patient_card/PatientCard.dart +++ b/lib/widgets/patients/patient_card/PatientCard.dart @@ -1,4 +1,6 @@ +import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; @@ -10,6 +12,8 @@ import 'package:doctor_app_flutter/widgets/shared/user-guid/CusomRow.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:cached_network_image/cached_network_image.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; import '../../../util/extenstions.dart'; import 'ShowTimer.dart'; @@ -38,43 +42,47 @@ class PatientCard extends StatelessWidget { @override Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); String nationalityName = patientInfo.nationalityName != null ? patientInfo.nationalityName.trim() : patientInfo.nationality != null - ? patientInfo.nationality.trim() - : patientInfo.nationalityId != - null - ? patientInfo.nationalityId - : ""; + ? patientInfo.nationality.trim() + : patientInfo.nationalityId != null + ? patientInfo.nationalityId + : ""; return Container( width: SizeConfig.screenWidth * 0.9, margin: EdgeInsets.all(6), - padding: EdgeInsets.only(left: 0, right: 5, bottom: 0, top: 0), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10), - color: Colors.white, - ), + padding: EdgeInsets.only( + left: projectViewModel.isArabic ? 5 : 0, + right: projectViewModel.isArabic ? 0 : 5, + bottom: 0, + top: 0), + decoration: Helpers.getCardBoxDecoration(), child: CardWithBgWidget( padding: 0, - marginLeft: (!isMyPatient && isInpatient) ? 0 : 10, + marginLeft: (!isMyPatient && isInpatient) || isFromLiveCare ? 0 : 10, marginSymmetric: isFromSearch ? 10 : 0.0, hasBorder: false, bgColor: isFromLiveCare ? Colors.white : (isMyPatient && !isFromSearch) - ? Colors.green[500] + ? AppGlobal.appGreenColor : patientInfo.patientStatusType == 43 - ? Colors.green[500] + ? AppGlobal.appGreenColor : isMyPatient - ? Colors.green[500] + ? AppGlobal.appGreenColor : isInpatient ? Colors.white : !isFromSearch ? Colors.red[800] : Colors.white, widget: Container( - color: Colors.white, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + ), // padding: EdgeInsets.only(left: 10, right: 0, bottom: 0), child: InkWell( child: Column( @@ -87,17 +95,15 @@ class PatientCard extends StatelessWidget { padding: EdgeInsets.only(left: 12.0), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, children: [ patientInfo.patientStatusType == 43 ? Row( children: [ - AppText( - TranslationBase.of(context) + PatientStatus( + label: TranslationBase.of(context) .arrivedP, - color: Colors.green, - fontWeight: FontWeight.bold, - fontFamily: 'Poppins', - fontSize: 10, + color: AppGlobal.appGreenColor, ), SizedBox( width: 8, @@ -112,29 +118,24 @@ class PatientCard extends StatelessWidget { SizedBox( width: 8, ), - AppText( - patientInfo.status == 2 + PatientStatus( + label: patientInfo.status == 2 ? 'Confirmed' : 'Booked', color: patientInfo.status == 2 - ? Colors.green + ? AppGlobal.appGreenColor : Colors.grey, - fontWeight: FontWeight.bold, - fontFamily: 'Poppins', - fontSize: 10, ), ], ) : patientInfo.patientStatusType == 42 ? Row( children: [ - AppText( - TranslationBase.of(context) - .notArrived, + PatientStatus( + label: + TranslationBase.of(context) + .notArrived, color: Colors.red[800], - fontWeight: FontWeight.bold, - fontFamily: 'Poppins', - fontSize: 10, ), SizedBox( width: 8, @@ -149,17 +150,14 @@ class PatientCard extends StatelessWidget { SizedBox( width: 8, ), - AppText( - patientInfo.status == 2 + PatientStatus( + label: patientInfo.status == 2 ? 'Confirmed' : 'Booked', color: patientInfo.status == 2 - ? Colors.green + ? AppGlobal.appGreenColor : Colors.grey, - fontWeight: FontWeight.bold, - fontFamily: 'Poppins', - fontSize: 10, - ), + ) ], ) : !isFromSearch && @@ -168,13 +166,11 @@ class PatientCard extends StatelessWidget { null ? Row( children: [ - AppText( - TranslationBase.of(context) + PatientStatus( + label: TranslationBase.of( + context) .notArrived, color: Colors.red[800], - fontWeight: FontWeight.bold, - fontFamily: 'Poppins', - fontSize: 12, ), SizedBox( width: 8, @@ -189,17 +185,16 @@ class PatientCard extends StatelessWidget { SizedBox( width: 8, ), - AppText( - patientInfo.status == 2 - ? 'Booked' - : 'Confirmed', + PatientStatus( + label: + patientInfo.status == 2 + ? 'Booked' + : 'Confirmed', color: patientInfo.status == 2 ? Colors.grey - : Colors.green, - fontWeight: FontWeight.bold, - fontFamily: 'Poppins', - fontSize: 12, + : AppGlobal + .appGreenColor, ) ], ) @@ -213,30 +208,31 @@ class PatientCard extends StatelessWidget { fontWeight: FontWeight.w400, ) : patientInfo.arrivedOn != null - ? AppText( - AppDateUtils.getDayMonthYearDate( - AppDateUtils - .convertStringToDate( - patientInfo.arrivedOn, - )) + - " " + - "${AppDateUtils.getStartTime(patientInfo.startTime)}", + ? Container( + padding: EdgeInsets.only(right: 9), + + child: AppText( + "${AppDateUtils.getStartTime(patientInfo.startTime)}", fontFamily: 'Poppins', - fontWeight: FontWeight.w400, - fontSize: 15, - ) + fontWeight: FontWeight.w600, + fontSize: 11, + letterSpacing: -0.64, + ), + ) : (patientInfo.appointmentDate != null && patientInfo .appointmentDate.isNotEmpty) - ? AppText( - "${AppDateUtils.getDayMonthYearDate(AppDateUtils.convertStringToDate( - patientInfo.appointmentDate, - ))} ${AppDateUtils.getStartTime(patientInfo.startTime)}", + ? Container( + padding: EdgeInsets.only(right: 9), + child: AppText( + " ${AppDateUtils.getStartTime(patientInfo.startTime)}", fontFamily: 'Poppins', - fontWeight: FontWeight.w400, - fontSize: 15, - ) + fontWeight: FontWeight.w600, + fontSize: 11, + letterSpacing: -0.64, + ), + ) : SizedBox() ], )) @@ -247,12 +243,8 @@ class PatientCard extends StatelessWidget { SizedBox( width: 12, ), - AppText( - 'My Patient', - color: Colors.green, - fontWeight: FontWeight.bold, - fontFamily: 'Poppins', - fontSize: 12, + PatientStatus( + label: 'My Patient', ), ], ), @@ -265,37 +257,38 @@ class PatientCard extends StatelessWidget { Expanded( flex: 2, child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: - MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.start, children: [ - Expanded( - // width: MediaQuery.of(context).size.width*0.51, - child: AppText( - isFromLiveCare - ? Helpers.capitalize( - patientInfo.fullName) - : (Helpers.capitalize( - patientInfo.firstName) + - " " + - Helpers.capitalize( - patientInfo.lastName)), - fontSize: 16, - color: Color(0xff2e303a), - fontWeight: FontWeight.w700, - fontFamily: 'Poppins', - textOverflow: TextOverflow.ellipsis, - ), + AppText( + isFromLiveCare + ? Helpers.capitalize( + patientInfo.fullName) + : (Helpers.capitalize( + patientInfo.firstName) + + " " + + Helpers.capitalize( + patientInfo.lastName)), + fontSize: 16, + color: Color(0xFF2E303A), + fontWeight: FontWeight.w600, + fontFamily: 'Poppins', + letterSpacing: -0.64, + textOverflow: TextOverflow.ellipsis, ), if (patientInfo.gender == 1) - Icon( - DoctorApp.male_2, - color: Colors.blue, + Container( + padding: EdgeInsets.symmetric( + horizontal: 4, vertical: 2), + child: SvgPicture.asset( + "assets/images/svgs/male.svg"), ) else - Icon( - DoctorApp.female_1, - color: Colors.pink, + Container( + padding: EdgeInsets.symmetric( + horizontal: 4, vertical: 2), + child: SvgPicture.asset( + "assets/images/svgs/female.svg"), ), if (isFromLiveCare) ShowTimer( @@ -303,170 +296,254 @@ class PatientCard extends StatelessWidget { ), ]), ), - Expanded( - child: Row( - mainAxisAlignment: MainAxisAlignment.end, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Expanded( - child: Container( - alignment: Alignment.centerRight, - child: AppText( - nationalityName.truncate(14), - fontWeight: FontWeight.bold, - fontSize: 14, - textOverflow: TextOverflow.ellipsis, + if (nationalityName.isNotEmpty) + Expanded( + child: Row( + mainAxisAlignment: MainAxisAlignment.end, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: Container( + padding: EdgeInsets.only(top: 5), + alignment: Alignment.centerRight, + child: AppText( + nationalityName.truncate(14), + fontWeight: FontWeight.w600, + fontSize: 10, + color: Color(0xFF2E303A), + textOverflow: TextOverflow.ellipsis, + ), ), ), - ), - patientInfo.nationality != null || - patientInfo.nationalityId != null - ? ClipRRect( - borderRadius: - BorderRadius.circular(20.0), - child: CachedNetworkImage( - imageUrl: patientInfo - .nationalityFlagURL != - null - ? patientInfo.nationalityFlagURL - : '', - height: 25, - width: 30, - errorWidget: - (context, url, error) => - AppText( - 'No Image', - fontSize: 10, - ), - )) - : SizedBox() - ], - ), - ) + patientInfo.nationality != null || + patientInfo.nationalityId != null + ? Container( + padding: EdgeInsets.only( + right: 7, top: 5), + child: ClipRRect( + borderRadius: + BorderRadius.circular(20.0), + child: CachedNetworkImage( + imageUrl: patientInfo + .nationalityFlagURL != + null + ? patientInfo + .nationalityFlagURL + : '', + height: 16, + width: 22, + errorWidget: + (context, url, error) => + AppText( + 'No Image', + fontSize: 10, + ), + )), + ) + : SizedBox() + ], + ), + ) ], )), - Row(children: [ - Column( - mainAxisAlignment: MainAxisAlignment.start, + SizedBox( + height: 10, + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: EdgeInsets.only(left: 12.0), + padding: EdgeInsets.only(left: 12.0, top: 5), child: Container( width: 60, height: 60, - child: Image.asset( + //TODO Elham* create widget for this to make it use every where + child: SvgPicture.asset( patientInfo.gender == 1 - ? 'assets/images/male_avatar.png' - : 'assets/images/female_avatar.png', + ? 'assets/images/svgs/male avatar.svg' + : 'assets/images/svgs/female avatar.svg', fit: BoxFit.cover, ), ), ), - ], - ), - SizedBox( - width: 10, - ), - Expanded( - child: Row( - children: [ + SizedBox( + width: 10, + ), Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - CustomRow( - label: - TranslationBase.of(context).fileNumber, - value: patientInfo.patientId.toString(), - ), - CustomRow( - label: - TranslationBase.of(context).age + " : ", - value: - "${AppDateUtils.getAgeByBirthday(patientInfo.dateofBirth, context, isServerFormat: !isFromLiveCare)}", - ), - if (isInpatient) - CustomRow( - label: patientInfo.admissionDate == null - ? "" - : TranslationBase.of(context) - .admissionDate + + child: Row( + children: [ + Expanded( + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + // SizedBox(height: 10,), + CustomRow( + label: TranslationBase.of(context) + .fileNumber, + value: patientInfo.patientId.toString(), + ), + CustomRow( + label: TranslationBase.of(context).age + + " : ", + value: + "${AppDateUtils.getAgeByBirthday(patientInfo.dateofBirth, context, isServerFormat: !isFromLiveCare)}", + ), + + patientInfo.arrivedOn != null + ? Column( + crossAxisAlignment: + CrossAxisAlignment.end, + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + // AppText( + // AppDateUtils + // .getDayMonthYearDateFormatted( + // AppDateUtils + // .convertStringToDate( + // patientInfo.arrivedOn, + // ), + // isMonthShort: true, + // ), + // fontFamily: 'Poppins', + // fontWeight: FontWeight.w600, + // fontSize: 11, + // letterSpacing: -0.64, + // ), + + CustomRow( + label: TranslationBase.of( + context) + .arrivedP + + " : ", + value: AppDateUtils + .getDayMonthYearDateFormatted( + AppDateUtils + .convertStringToDate( + patientInfo.arrivedOn, + ), + isMonthShort: true, + ), + ), + ], + ) + : (patientInfo.appointmentDate != + null && + patientInfo.appointmentDate + .isNotEmpty) + ? Column( + crossAxisAlignment: + CrossAxisAlignment.end, + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + CustomRow( + label: TranslationBase.of( + context) + .appointmentDate + + " : ", + value: "${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.convertStringToDate( + patientInfo + .appointmentDate, + ), isMonthShort: true)}", + ), + ], + ) + : SizedBox(), + + if (isInpatient) + CustomRow( + label: + patientInfo.admissionDate == null + ? "" + : TranslationBase.of(context) + .admissionDate + + " : ", + value: patientInfo.admissionDate == + null + ? "" + : "${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(patientInfo.admissionDate.toString()), isMonthShort: true)}", + ), + if (patientInfo.admissionDate != null) + CustomRow( + label: TranslationBase.of(context) + .numOfDays + " : ", - value: patientInfo.admissionDate == null - ? "" - : "${AppDateUtils.convertDateFromServerFormat(patientInfo.admissionDate.toString(), 'yyyy-MM-dd')}", - ), - if (patientInfo.admissionDate != null) - CustomRow( - label: TranslationBase.of(context) - .numOfDays + - " : ", - value: - "${DateTime.now().difference(AppDateUtils.getDateTimeFromServerFormat(patientInfo.admissionDate)).inDays + 1}", - ), - if (patientInfo.admissionDate != null) - CustomRow( - label: TranslationBase.of(context) - .clinicName + - " : ", - value: "${patientInfo.clinicDescription}", - ), - if (patientInfo.admissionDate != null) - CustomRow( - label: - TranslationBase.of(context).roomNo + + value: + "${DateTime.now().difference(AppDateUtils.getDateTimeFromServerFormat(patientInfo.admissionDate)).inDays + 1}", + ), + if (patientInfo.admissionDate != null) + CustomRow( + label: TranslationBase.of(context) + .clinicName + " : ", - value: "${patientInfo.roomId}", - ), - if (isFromLiveCare) - Column( - children: [ + value: + "${patientInfo.clinicDescription}", + ), + if (patientInfo.admissionDate != null) CustomRow( label: TranslationBase.of(context) - .clinic + + .roomNo + " : ", - value: patientInfo.clinicName, + value: "${patientInfo.roomId}", ), - ], - ), - ]), - ), - Icon( - Icons.arrow_forward, - size: 24, - ), - ], - )) - ]), + if (isFromLiveCare) + Column( + children: [ + CustomRow( + label: TranslationBase.of(context) + .clinic + + " : ", + value: patientInfo.clinicName, + ), + ], + ), + ]), + ), + Padding( + padding: const EdgeInsets.only(right: 8), + child: Icon( + Icons.arrow_forward, + size: 24, + ), + ), + ], + )) + ]), isFromLiveCare ? Row( mainAxisAlignment: MainAxisAlignment.end, children: [ Container( - padding: EdgeInsets.all(4), - child: Image.asset( - 'assets/images/livecare.png', - height: 25, - width: 35, - color: Colors.grey.shade700, + padding: EdgeInsets.only( + left: 9, right: 9, bottom: 9), + child: SvgPicture.asset( + 'assets/images/svgs/profile_screen/livecare.svg', + height: 20, + width: 20, + // color: Colors.grey.shade700, )), ], ) : !isInpatient && !isFromSearch ? Row( mainAxisAlignment: MainAxisAlignment.end, + crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( - padding: EdgeInsets.all(4), - child: Image.asset( + padding: EdgeInsets.only( + left: 9, right: 9, bottom: 9), + child: SvgPicture.asset( patientInfo.appointmentType == 'Regular' && patientInfo.visitTypeId == 100 - ? 'assets/images/livecare.png' + ? 'assets/images/svgs/profile_screen/livecare.svg' : patientInfo.appointmentType == 'Walkin' - ? 'assets/images/walkin.png' - : 'assets/images/booked.png', + ? 'assets/images/svgs/profile_screen/walkin.svg' + : 'assets/images/svgs/profile_screen/booked.svg', height: 25, width: 35, )), @@ -474,11 +551,16 @@ class PatientCard extends StatelessWidget { : (isInpatient == true) ? Row( mainAxisAlignment: MainAxisAlignment.end, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ Container( - padding: EdgeInsets.all(4), - child: Image.asset( - 'assets/images/inpatient.png', + padding: EdgeInsets.only( + left: 9, + right: 9, + bottom: 9), + child: SvgPicture.asset( + 'assets/images/svgs/inpatient.svg', height: 25, width: 35, )), @@ -491,3 +573,24 @@ class PatientCard extends StatelessWidget { )); } } + +class PatientStatus extends StatelessWidget { + PatientStatus({ + Key key, + this.label, + this.color, + }) : super(key: key); + final String label; + final Color color; + + @override + Widget build(BuildContext context) { + return AppText( + label, + color: color ?? AppGlobal.appGreenColor, + fontWeight: FontWeight.w600, + fontFamily: 'Poppins', + fontSize: 10, + ); + } +} diff --git a/lib/widgets/patients/patient_service_title.dart b/lib/widgets/patients/patient_service_title.dart new file mode 100644 index 00000000..08ce9293 --- /dev/null +++ b/lib/widgets/patients/patient_service_title.dart @@ -0,0 +1,43 @@ +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class ServiceTitle extends StatefulWidget { + final String title; + final String subTitle; + + const ServiceTitle({Key key, this.title, this.subTitle}) : super(key: key); + + @override + _ServiceTitleState createState() => _ServiceTitleState(); +} + +class _ServiceTitleState extends State { + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + widget.title, + color: Color(0xff2E303A), + fontSize: 12.0, + letterSpacing: -0.72, + fontWeight: FontWeight.w600, + fontHeight: 1.0, + ), + AppText( + widget.subTitle, + color: Color(0xff2E303A), + fontSize: 24, + fontWeight: FontWeight.w700, + letterSpacing: -1.44, + fontHeight: 1.0, + ), + ], + ), + ); + } +} diff --git a/lib/widgets/patients/profile/PatientProfileButton.dart b/lib/widgets/patients/profile/PatientProfileButton.dart index 073a6d51..a3c4492f 100644 --- a/lib/widgets/patients/profile/PatientProfileButton.dart +++ b/lib/widgets/patients/profile/PatientProfileButton.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; @@ -5,6 +6,7 @@ import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; import 'package:provider/provider.dart'; // ignore: must_be_immutable @@ -59,7 +61,7 @@ class PatientProfileButton extends StatelessWidget { return Container( margin: EdgeInsets.symmetric(horizontal: 0.0), - padding: EdgeInsets.symmetric(horizontal: 8, vertical: 16), + padding: EdgeInsets.symmetric(horizontal: 8, vertical: 0), child: InkWell( onTap: isDisable ? null @@ -68,7 +70,9 @@ class PatientProfileButton extends StatelessWidget { : () { navigator(context, this.route); }, - child: Column(children: [ + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ Container( padding: EdgeInsets.fromLTRB(8, 0, 8, 8), child: Row( @@ -81,11 +85,10 @@ class PatientProfileButton extends StatelessWidget { size: 30, color: color ?? Color(0xFF333C45), ) - : new Image.asset( - url + icon, + : new SvgPicture.asset( + icon, width: 30, height: 30, - fit: BoxFit.contain, ), ) ], @@ -98,17 +101,19 @@ class PatientProfileButton extends StatelessWidget { children: [ AppText( !projectsProvider.isArabic ? this.nameLine1 : nameLine2, - color: color ?? Color(0xFF2B353E), + color: color ?? AppGlobal.appTextColor, + letterSpacing: -0.33, fontWeight: FontWeight.w600, textAlign: TextAlign.left, - fontSize: SizeConfig.textMultiplier * 1.35, + fontSize: SizeConfig.textMultiplier * 1.30, ), AppText( !projectsProvider.isArabic ? this.nameLine2 : nameLine1, color: color ?? Color(0xFF2B353E), fontWeight: FontWeight.w600, textAlign: TextAlign.left, - fontSize: SizeConfig.textMultiplier * 1.35, + fontHeight: 1.4, + fontSize: SizeConfig.textMultiplier * 1.30, ), if (isLoading) DrAppCircularProgressIndeicator() ], @@ -119,9 +124,9 @@ class PatientProfileButton extends StatelessWidget { decoration: BoxDecoration( // border: Border.all(), color: isDisable ? Colors.grey.withOpacity(0.4) : Colors.white, - borderRadius: BorderRadius.all(Radius.circular(10)), + borderRadius: BorderRadius.all(Radius.circular(15)), border: Border.fromBorderSide(BorderSide( - color: color ?? Color(0xffBBBBBB), + color: color ?? Color(0xFFEFEFEF), width: 1, )), ), diff --git a/lib/widgets/patients/profile/add-order/addNewOrder.dart b/lib/widgets/patients/profile/add-order/addNewOrder.dart index 275888e3..cc9223f6 100644 --- a/lib/widgets/patients/profile/add-order/addNewOrder.dart +++ b/lib/widgets/patients/profile/add-order/addNewOrder.dart @@ -4,7 +4,8 @@ import 'package:flutter/material.dart'; class AddNewOrder extends StatelessWidget { const AddNewOrder({ Key key, - this.onTap, this.label, + this.onTap, + this.label, }) : super(key: key); final Function onTap; @@ -16,22 +17,22 @@ class AddNewOrder extends StatelessWidget { onTap: onTap, child: Container( width: double.maxFinite, - height: 140, + height: MediaQuery.of(context).size.height * 0.18, margin: EdgeInsets.all(10), decoration: BoxDecoration( - color: Colors.grey[300], + color: Color(0xffEAEAEA), borderRadius: BorderRadius.circular(10), ), child: Center( child: Container( - height: 90, + height: MediaQuery.of(context).size.height * 0.11, child: Column( children: [ Container( - height: 40, - width: 40, + height: MediaQuery.of(context).size.height * 0.05, + width: MediaQuery.of(context).size.height * 0.05, decoration: BoxDecoration( - color: Colors.grey[600], + color: Color(0xff7E7E7E), borderRadius: BorderRadius.circular(10), ), child: Center( @@ -45,8 +46,10 @@ class AddNewOrder extends StatelessWidget { height: 10, ), AppText( - label ??'', - color: Colors.grey[600], + label ?? '', + color: Color(0xff7E7E7E), + letterSpacing: -0.64, + fontSize: 16.0, fontWeight: FontWeight.w600, ) ], diff --git a/lib/widgets/patients/profile/patient-profile-app-bar.dart b/lib/widgets/patients/profile/patient-profile-app-bar.dart index 174da04d..974d3590 100644 --- a/lib/widgets/patients/profile/patient-profile-app-bar.dart +++ b/lib/widgets/patients/profile/patient-profile-app-bar.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; @@ -137,7 +138,9 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { width: SizeConfig.getTextMultiplierBasedOnWidth() * 20, height: SizeConfig.getTextMultiplierBasedOnWidth() * 20, child: Image.asset( - gender == 1 ? 'assets/images/male_avatar.png' : 'assets/images/female_avatar.png', + gender == 1 + ? 'assets/images/male_avatar.png' + : 'assets/images/female_avatar.png', fit: BoxFit.cover, ), ), @@ -157,7 +160,7 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { patient.patientStatusType == 43 ? AppText( TranslationBase.of(context).arrivedP, - color: Colors.green, + color: AppGlobal.appGreenColor, fontWeight: FontWeight.bold, fontFamily: 'Poppins', fontSize: SizeConfig @@ -174,7 +177,10 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { 3.5, ), patient.startTime != null - ? AppText(patient.startTime != null ? patient.startTime : '', + ? AppText( + patient.startTime != null + ? patient.startTime + : '', fontWeight: FontWeight.w700, fontSize: SizeConfig .getTextMultiplierBasedOnWidth() * @@ -302,7 +308,9 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { width: 30, height: 30, margin: EdgeInsets.only( - left: projectViewModel.isArabic ? 10 : 85, right: projectViewModel.isArabic ? 85 : 10, top: 5), + left: projectViewModel.isArabic ? 10 : 85, + right: projectViewModel.isArabic ? 85 : 10, + top: 5), decoration: BoxDecoration( shape: BoxShape.rectangle, border: Border( @@ -349,7 +357,7 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { ), if (invoiceNO != null && !isPrescriptions) HeaderRow( - label: 'Invoice: ', + label: 'Invoice: ', value: invoiceNO ?? "", ), if (branch != null) @@ -379,8 +387,8 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { : 'Prescriptions Date ', value: '${AppDateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}', - ), - ]), + ), + ]), ), ), ], diff --git a/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart b/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart index f0678e22..46b8ed7f 100644 --- a/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart +++ b/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart @@ -162,7 +162,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget patient.patientStatusType == 43 ? AppText( TranslationBase.of(context).arrivedP, - color: Colors.green, + color: AppGlobal.appGreenColor, fontWeight: FontWeight.bold, fontFamily: 'Poppins', fontSize: 12, @@ -356,7 +356,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget return BoxDecoration( border: Border( top: BorderSide( - color: Colors.green, + color: AppGlobal.appGreenColor, width: 5, ), ), diff --git a/lib/widgets/patients/profile/prescription_in_patinets_widget.dart b/lib/widgets/patients/profile/prescription_in_patinets_widget.dart index 9d22962a..52af839c 100644 --- a/lib/widgets/patients/profile/prescription_in_patinets_widget.dart +++ b/lib/widgets/patients/profile/prescription_in_patinets_widget.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/models/patient/prescription/prescription_report_for_in_patient.dart'; import 'package:doctor_app_flutter/routes.dart'; @@ -29,7 +30,7 @@ class PrescriptionInPatientWidget extends StatelessWidget { padding: EdgeInsets.all(40), decoration: BoxDecoration( border: - Border.all(color: HexColor('#B8382C'), width: 4), + Border.all(color: AppGlobal.appRedColor, width: 4), borderRadius: BorderRadius.all(Radius.circular(100))), child: IconButton( icon: Icon( diff --git a/lib/widgets/patients/profile/profile_medical_info_widget.dart b/lib/widgets/patients/profile/profile_medical_info_widget.dart index a7832481..fec33a62 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget.dart @@ -40,7 +40,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { nameLine1: TranslationBase.of(context).vital, nameLine2: TranslationBase.of(context).signs, route: VITAL_SIGN_DETAILS, - icon: 'patient/vital_signs.png'), + icon: 'assets/images/svgs/profile_screen/vital signs.svg'), // if (selectedPatientType != 7) PatientProfileButton( key: key, @@ -50,7 +50,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { route: HEALTH_SUMMARY, nameLine1: "Health", //TranslationBase.of(context).medicalReport, nameLine2: "Summary", //TranslationBase.of(context).summaryReport, - icon: 'patient/health_summary.png'), + icon: 'assets/images/svgs/profile_screen/health summary.svg'), PatientProfileButton( key: key, patient: patient, @@ -59,7 +59,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { route: LAB_RESULT, nameLine1: TranslationBase.of(context).lab, nameLine2: TranslationBase.of(context).result, - icon: 'patient/lab_results.png'), + icon: 'assets/images/svgs/profile_screen/lab results.svg'), PatientProfileButton( key: key, patient: patient, @@ -68,7 +68,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { route: ALL_SPECIAL_LAB_RESULT, nameLine1: TranslationBase.of(context).lab, nameLine2: TranslationBase.of(context).special, - icon: 'patient/lab_results.png'), + icon: 'assets/images/svgs/profile_screen/lab results.svg'), // if (int.parse(patientType) == 7 || int.parse(patientType) == 6) PatientProfileButton( key: key, @@ -79,7 +79,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { route: RADIOLOGY_PATIENT, nameLine1: TranslationBase.of(context).radiology, nameLine2: TranslationBase.of(context).service, - icon: 'patient/health_summary.png'), + icon: 'assets/images/svgs/profile_screen/health summary.svg'), PatientProfileButton( key: key, patient: patient, @@ -88,7 +88,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { route: PATIENT_ECG, nameLine1: TranslationBase.of(context).patient, nameLine2: "ECG", - icon: 'patient/patient_sick_leave.png'), + icon: 'assets/images/svgs/profile_screen/ECG.svg'), PatientProfileButton( key: key, patient: patient, @@ -97,7 +97,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { route: ORDER_PRESCRIPTION_NEW, nameLine1: TranslationBase.of(context).orders, nameLine2: TranslationBase.of(context).prescription, - icon: 'patient/order_prescription.png'), + icon: 'assets/images/svgs/profile_screen/order prescription.svg'), // if (int.parse(patientType) == 7 || int.parse(patientType) == 6) PatientProfileButton( key: key, @@ -107,7 +107,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { route: ORDER_PROCEDURE, nameLine1: TranslationBase.of(context).orders, nameLine2: TranslationBase.of(context).procedures, - icon: 'patient/Order_Procedures.png'), + icon: 'assets/images/svgs/profile_screen/Order Procedures.svg'), //if (int.parse(patientType) == 7 || int.parse(patientType) == 6) PatientProfileButton( key: key, @@ -117,7 +117,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { route: PATIENT_INSURANCE_APPROVALS_NEW, nameLine1: TranslationBase.of(context).insurance, nameLine2: TranslationBase.of(context).service, - icon: 'patient/vital_signs.png'), + icon: 'assets/images/svgs/profile_screen/insurance approval.svg'), // if (int.parse(patientType) == 7 || int.parse(patientType) == 6) PatientProfileButton( key: key, @@ -127,7 +127,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { route: ADD_SICKLEAVE, nameLine1: TranslationBase.of(context).patientSick, nameLine2: TranslationBase.of(context).leave, - icon: 'patient/patient_sick_leave.png'), + icon: 'assets/images/svgs/profile_screen/patient sick leave.svg'), if (patient.appointmentNo != null && patient.appointmentNo != 0) PatientProfileButton( key: key, @@ -170,7 +170,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { route: PROGRESS_NOTE, nameLine1: TranslationBase.of(context).progress, nameLine2: TranslationBase.of(context).note, - icon: 'patient/Progress_notes.png'), + icon: 'assets/images/svgs/profile_screen/Progress notes.svg'), if (isInpatient) PatientProfileButton( key: key, @@ -180,7 +180,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { route: ORDER_NOTE, nameLine1: "Order", //"Text", nameLine2: "Sheet", - icon: 'patient/Progress_notes.png'), + icon: 'assets/images/svgs/profile_screen/Progress notes.svg'), ], ), ); diff --git a/lib/widgets/patients/profile/profile_medical_info_widget_in_patient.dart b/lib/widgets/patients/profile/profile_medical_info_widget_in_patient.dart index 17feaf0a..a7ab2412 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget_in_patient.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget_in_patient.dart @@ -49,7 +49,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget { nameLine2: TranslationBase.of(context).signs, route: VITAL_SIGN_DETAILS, isInPatient: true, - icon: 'patient/vital_signs.png'), + icon: 'assets/images/svgs/profile_screen/vital signs.svg'), PatientProfileButton( key: key, patient: patient, @@ -59,7 +59,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget { isInPatient: true, nameLine1: TranslationBase.of(context).lab, nameLine2: TranslationBase.of(context).result, - icon: 'patient/lab_results.png'), + icon: 'assets/images/svgs/profile_screen/lab results.svg'), PatientProfileButton( key: key, patient: patient, @@ -69,7 +69,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget { route: RADIOLOGY_PATIENT, nameLine1: TranslationBase.of(context).radiology, nameLine2: TranslationBase.of(context).result, - icon: 'patient/health_summary.png'), + icon: 'assets/images/svgs/profile_screen/health summary.svg'), PatientProfileButton( key: key, patient: patient, @@ -78,7 +78,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget { route: ORDER_PRESCRIPTION_NEW, nameLine1: TranslationBase.of(context).patient, nameLine2: TranslationBase.of(context).prescription, - icon: 'patient/order_prescription.png'), + icon: 'assets/images/svgs/profile_screen/order prescription.svg'), PatientProfileButton( key: key, patient: patient, @@ -88,7 +88,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget { isDischargedPatient: isDischargedPatient, nameLine1: TranslationBase.of(context).progress, nameLine2: TranslationBase.of(context).note, - icon: 'patient/Progress_notes.png'), + icon: 'assets/images/svgs/profile_screen/Progress notes.svg'), PatientProfileButton( key: key, patient: patient, @@ -98,7 +98,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget { isDischargedPatient: isDischargedPatient, nameLine1: "Order", //"Text", nameLine2: "Sheet", //TranslationBase.of(context).orders, - icon: 'patient/Progress_notes.png'), + icon: 'assets/images/svgs/profile_screen/Progress notes.svg'), PatientProfileButton( key: key, patient: patient, @@ -107,7 +107,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget { route: ORDER_PROCEDURE, nameLine1: TranslationBase.of(context).orders, nameLine2: TranslationBase.of(context).procedures, - icon: 'patient/Order_Procedures.png'), + icon: 'assets/images/svgs/profile_screen/Order Procedures.svg'), PatientProfileButton( key: key, patient: patient, @@ -118,7 +118,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget { //TranslationBase.of(context).medicalReport, nameLine2: "Summary", //TranslationBase.of(context).summaryReport, - icon: 'patient/health_summary.png'), + icon: 'assets/images/svgs/profile_screen/health summary.svg'), PatientProfileButton( key: key, patient: patient, @@ -130,7 +130,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget { //TranslationBase.of(context).medicalReport, nameLine2: "Report", //Report //TranslationBase.of(context).summaryReport, - icon: 'patient/health_summary.png'), + icon: 'assets/images/svgs/profile_screen/health summary.svg'), PatientProfileButton( key: key, patient: patient, @@ -149,7 +149,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget { route: PATIENT_INSURANCE_APPROVALS_NEW, nameLine1: TranslationBase.of(context).insurance, nameLine2: TranslationBase.of(context).approvals, - icon: 'patient/vital_signs.png'), + icon: 'assets/images/svgs/profile_screen/insurance approval.svg'), PatientProfileButton( key: key, patient: patient, @@ -159,7 +159,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget { route: null, nameLine1: "Discharge", nameLine2: "Summery", - icon: 'patient/patient_sick_leave.png'), + icon: 'assets/images/svgs/profile_screen/patient sick leave.svg'), PatientProfileButton( key: key, patient: patient, @@ -168,7 +168,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget { route: ADD_SICKLEAVE, nameLine1: TranslationBase.of(context).patientSick, nameLine2: TranslationBase.of(context).leave, - icon: 'patient/patient_sick_leave.png'), + icon: 'assets/images/svgs/profile_screen/patient sick leave.svg'), ], ), ); diff --git a/lib/widgets/patients/profile/profile_medical_info_widget_search.dart b/lib/widgets/patients/profile/profile_medical_info_widget_search.dart index 573ada32..a45f7cdc 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget_search.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget_search.dart @@ -64,7 +64,7 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { nameLine1: TranslationBase.of(context).vital, nameLine2: TranslationBase.of(context).signs, route: VITAL_SIGN_DETAILS, - icon: 'patient/vital_signs.png'), + icon: 'assets/images/svgs/profile_screen/vital signs.svg'), // if (selectedPatientType != 7) PatientProfileButton( key: key, @@ -76,7 +76,7 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { "Health", //TranslationBase.of(context).medicalReport, nameLine2: "Summary", //TranslationBase.of(context).summaryReport, - icon: 'patient/health_summary.png'), + icon: 'assets/images/svgs/profile_screen/health summary.svg'), PatientProfileButton( key: key, patient: patient, @@ -85,7 +85,7 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { route: LAB_RESULT, nameLine1: TranslationBase.of(context).lab, nameLine2: TranslationBase.of(context).result, - icon: 'patient/lab_results.png'), + icon: 'assets/images/svgs/profile_screen/lab results.svg'), // if (int.parse(patientType) == 7 || int.parse(patientType) == 6) PatientProfileButton( key: key, @@ -96,7 +96,7 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { route: RADIOLOGY_PATIENT, nameLine1: TranslationBase.of(context).radiology, nameLine2: TranslationBase.of(context).service, - icon: 'patient/health_summary.png'), + icon: 'assets/images/svgs/profile_screen/health summary.svg'), PatientProfileButton( key: key, patient: patient, @@ -105,7 +105,7 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { route: PATIENT_ECG, nameLine1: TranslationBase.of(context).patient, nameLine2: "ECG", - icon: 'patient/patient_sick_leave.png'), + icon: 'assets/images/svgs/profile_screen/ECG.svg'), PatientProfileButton( key: key, patient: patient, @@ -114,7 +114,7 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { route: ORDER_PRESCRIPTION_NEW, nameLine1: TranslationBase.of(context).orders, nameLine2: TranslationBase.of(context).prescription, - icon: 'patient/order_prescription.png'), + icon: 'assets/images/svgs/profile_screen/order prescription.svg'), // if (int.parse(patientType) == 7 || int.parse(patientType) == 6) PatientProfileButton( key: key, @@ -124,7 +124,7 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { route: ORDER_PROCEDURE, nameLine1: TranslationBase.of(context).orders, nameLine2: TranslationBase.of(context).procedures, - icon: 'patient/Order_Procedures.png'), + icon: 'assets/images/svgs/profile_screen/Order Procedures.svg'), //if (int.parse(patientType) == 7 || int.parse(patientType) == 6) PatientProfileButton( key: key, @@ -134,7 +134,7 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { route: PATIENT_INSURANCE_APPROVALS_NEW, nameLine1: TranslationBase.of(context).insurance, nameLine2: TranslationBase.of(context).service, - icon: 'patient/vital_signs.png'), + icon: 'assets/images/svgs/profile_screen/insurance approval.svg'), // if (int.parse(patientType) == 7 || int.parse(patientType) == 6) PatientProfileButton( key: key, @@ -144,7 +144,7 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { route: ADD_SICKLEAVE, nameLine1: TranslationBase.of(context).patientSick, nameLine2: TranslationBase.of(context).leave, - icon: 'patient/patient_sick_leave.png'), + icon: 'assets/images/svgs/profile_screen/patient sick leave.svg'), if (patient.appointmentNo != null && patient.appointmentNo != 0) PatientProfileButton( @@ -157,7 +157,7 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { patient.patientStatusType != 43 ? true : false, nameLine1: TranslationBase.of(context).patient, nameLine2: TranslationBase.of(context).ucaf, - icon: 'patient/ucaf.png'), + icon: 'assets/images/svgs/profile_screen/UCAF.svg'), if (patient.appointmentNo != null && patient.appointmentNo != 0) PatientProfileButton( @@ -170,7 +170,7 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { patient.patientStatusType != 43 ? true : false, nameLine1: TranslationBase.of(context).referral, nameLine2: TranslationBase.of(context).patient, - icon: 'patient/refer_patient.png'), + icon: 'assets/images/svgs/profile_screen/refer patient.svg'), if (patient.appointmentNo != null && patient.appointmentNo != 0) PatientProfileButton( @@ -183,7 +183,7 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { patient.patientStatusType != 43 ? true : false, nameLine1: TranslationBase.of(context).admission, nameLine2: TranslationBase.of(context).request, - icon: 'patient/admission_req.png'), + icon: 'assets/images/svgs/profile_screen/admission req.svg'), if (isInpatient) PatientProfileButton( key: key, @@ -193,7 +193,7 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { route: PROGRESS_NOTE, nameLine1: TranslationBase.of(context).progress, nameLine2: TranslationBase.of(context).note, - icon: 'patient/Progress_notes.png'), + icon: 'assets/images/svgs/profile_screen/Progress notes.svg'), if (isInpatient) PatientProfileButton( key: key, @@ -203,7 +203,7 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { route: ORDER_NOTE, nameLine1: "Order", //"Text", nameLine2: "Sheet", - icon: 'patient/Progress_notes.png'), + icon: 'assets/images/svgs/profile_screen/Progress notes.svg'), ], ), ), diff --git a/lib/widgets/shared/app_drawer_widget.dart b/lib/widgets/shared/app_drawer_widget.dart index 49f7d4e8..4444cf0a 100644 --- a/lib/widgets/shared/app_drawer_widget.dart +++ b/lib/widgets/shared/app_drawer_widget.dart @@ -17,7 +17,6 @@ import 'app_texts_widget.dart'; DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); - class AppDrawer extends StatefulWidget { @override _AppDrawerState createState() => _AppDrawerState(); @@ -37,7 +36,7 @@ class _AppDrawerState extends State { child: Drawer( child: Column(children: [ Expanded( - flex: 4, + flex: 7, child: ListView(padding: EdgeInsets.zero, children: [ Container( margin: EdgeInsets.symmetric(horizontal: 15), @@ -50,6 +49,8 @@ class _AppDrawerState extends State { Container( child: Image.asset( 'assets/images/dr_app_logo.png', + width: MediaQuery.of(context).size.width * 0.16, + height: MediaQuery.of(context).size.height * 0.16, ), margin: EdgeInsets.only(top: 10, bottom: 10), ), @@ -61,6 +62,7 @@ class _AppDrawerState extends State { child: Icon( DoctorApp.close_1, size: 20, + color: Color(0xff2B353E), ), ), margin: EdgeInsets.only(top: 20, bottom: 10), @@ -83,24 +85,32 @@ class _AppDrawerState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: EdgeInsets.only(top: 10), + padding: EdgeInsets.only(top: 8.0), child: AppText( TranslationBase.of(context).dr + - authenticationViewModel.doctorProfile?.doctorName, - fontWeight: FontWeight.bold, + capitalizeOnlyFirstLater( + authenticationViewModel + .doctorProfile.doctorName + .replaceAll("DR.", "") + .toLowerCase()), + fontWeight: FontWeight.w700, color: Color(0xFF2E303A), fontFamily: 'Poppins', - fontSize: 17, + fontSize: 25.0, + letterSpacing: -1.5, ), ), Padding( padding: EdgeInsets.only(top: 0), child: AppText( - authenticationViewModel.doctorProfile?.clinicDescription, - fontWeight: FontWeight.w600, + authenticationViewModel + .doctorProfile?.clinicDescription, + fontWeight: FontWeight.w500, color: Color(0xFF2E303A), - fontSize: 15, + fontSize: 16, fontFamily: 'Poppins', + letterSpacing: -0.96, + //textAlign: TextAlign.left, )) ], ), @@ -110,6 +120,7 @@ class _AppDrawerState extends State { child: DrawerItem( TranslationBase.of(context).applyOrRescheduleLeave, icon: DoctorApp.reschedule__1, + // subTitle: , ), onTap: () { @@ -117,10 +128,11 @@ class _AppDrawerState extends State { Navigator.push( context, MaterialPageRoute( - builder: (context) => AddRescheduleLeavScreen(), - settings: RouteSettings(name: 'AddRescheduleLeaveScreen') - // MyReferredPatient(), - )); + builder: (context) => AddRescheduleLeavScreen(), + settings: RouteSettings( + name: 'AddRescheduleLeaveScreen') + // MyReferredPatient(), + )); }, ), SizedBox(height: 15), @@ -131,10 +143,11 @@ class _AppDrawerState extends State { // subTitle: , ), ), - SizedBox(height: 15), + SizedBox(height: MediaQuery.of(context).size.height * 0.02), InkWell( child: Container( - height: 80, + height: MediaQuery.of(context).size.height * 0.16, + width: MediaQuery.of(context).size.width * 0.16, child: Image.asset('assets/images/qr_code.png'), ), onTap: () {}, @@ -143,7 +156,7 @@ class _AppDrawerState extends State { ), ), SizedBox( - height: MediaQuery.of(context).size.height * 0.09, + height: MediaQuery.of(context).size.height * 0.02, ), Container( margin: EdgeInsets.symmetric(horizontal: 20), @@ -174,8 +187,8 @@ class _AppDrawerState extends State { ), onTap: () async { Navigator.pop(context); - await authenticationViewModel.logout(isFromLogin: false); - + await authenticationViewModel.logout( + isFromLogin: false); }, ), ], @@ -191,43 +204,49 @@ class _AppDrawerState extends State { child: Align( alignment: FractionalOffset.bottomCenter, child: Container( - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Container( - width: MediaQuery.of(context).size.width * 0.3, - child: RichText( - text: TextSpan( - text: 'Powered by', - style: TextStyle( - color: Color(0xFF989898), - fontWeight: FontWeight.bold, - fontSize: 14, - fontFamily: 'Poppins', - ), - children: [ - TextSpan( - text: ' Cloud Solutions', - style: TextStyle( - color: Color(0xFF2E303A), - fontSize: 15, - fontFamily: 'Poppins', - ), - ) - ]), + child: Padding( + padding: EdgeInsets.only( + left: projectsProvider.isArabic ? 0 : 15.0, + right: projectsProvider.isArabic ? 15.0 : 0), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Container( + width: MediaQuery.of(context).size.width * 0.5, + child: RichText( + text: TextSpan( + text: 'Powered by', + style: TextStyle( + color: Color(0xFF989898), + fontWeight: FontWeight.w600, + fontSize: 14, + fontFamily: 'Poppins', + letterSpacing: -0.56, + ), + children: [ + TextSpan( + text: ' Cloud Solutions', + style: TextStyle( + color: Color(0xFF2E303A), + fontSize: 14, + fontFamily: 'Poppins', + letterSpacing: -0.56, + fontWeight: FontWeight.w700), + ) + ]), + ), ), - ), - // Text("Powered by"), - Image.asset( - 'assets/images/cs_logo_container.png', - width: SizeConfig.imageSizeMultiplier * 20, - ) - ], + // Text("Powered by"), + Image.asset('assets/images/cs_logo_container.png', + width: + MediaQuery.of(context).size.width * 0.13) + ], + ), )))) ])) ])), ), - width: SizeConfig.realScreenWidth * 0.60, + width: SizeConfig.realScreenWidth * 0.80, margin: EdgeInsets.all(0), customCornerRaduis: false, @@ -241,3 +260,9 @@ class _AppDrawerState extends State { Navigator.of(context).pushNamed(routeName); } } + +String capitalizeOnlyFirstLater(String text) { + if (text.trim().isEmpty) return ""; + + return "${text[0].toUpperCase()}${text.substring(1)}"; +} diff --git a/lib/widgets/shared/app_texts_widget.dart b/lib/widgets/shared/app_texts_widget.dart index 56a503a8..f612e9e0 100644 --- a/lib/widgets/shared/app_texts_widget.dart +++ b/lib/widgets/shared/app_texts_widget.dart @@ -103,7 +103,10 @@ class _AppTextState extends State { margin: widget.margin != null ? EdgeInsets.all(widget.margin) : EdgeInsets.only( - top: widget.marginTop, right: widget.marginRight, bottom: widget.marginBottom, left: widget.marginLeft), + top: widget.marginTop, + right: widget.marginRight, + bottom: widget.marginBottom, + left: widget.marginLeft), child: Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.start, @@ -118,16 +121,21 @@ class _AppTextState extends State { right: 0, child: Container( decoration: BoxDecoration( - gradient: LinearGradient(colors: [ - Theme.of(context).backgroundColor, - Theme.of(context).backgroundColor.withOpacity(0), - ], begin: Alignment.bottomCenter, end: Alignment.topCenter)), + gradient: LinearGradient( + colors: [ + Theme.of(context).backgroundColor, + Theme.of(context).backgroundColor.withOpacity(0), + ], + begin: Alignment.bottomCenter, + end: Alignment.topCenter)), height: 30, ), ) ], ), - if (widget.allowExpand && widget.readMore && text.length > widget.maxLength) + if (widget.allowExpand && + widget.readMore && + text.length > widget.maxLength) Padding( padding: EdgeInsets.only(top: 8.0, right: 8.0, bottom: 8.0), child: InkWell( @@ -164,7 +172,13 @@ class _AppTextState extends State { ), child: Container( child: SelectableText( - !hidden ? text : (text.substring(0, text.length > widget.maxLength ? widget.maxLength : text.length)), + !hidden + ? text + : (text.substring( + 0, + text.length > widget.maxLength + ? widget.maxLength + : text.length)), textAlign: widget.textAlign, // overflow: widget.maxLines != null // ? ((widget.maxLines > 1) @@ -180,9 +194,11 @@ class _AppTextState extends State { height: widget.fontHeight) : TextStyle( fontStyle: widget.italic ? FontStyle.italic : null, - color: widget.color != null ? widget.color : Colors.black, + color: + widget.color != null ? widget.color : Color(0xff2E303A), fontSize: widget.fontSize ?? _getFontSize(), - letterSpacing: widget.letterSpacing ?? (widget.variant == "overline" ? 1.5 : null), + letterSpacing: widget.letterSpacing ?? + (widget.variant == "overline" ? 1.5 : null), fontWeight: widget.fontWeight ?? _getFontWeight(), fontFamily: widget.fontFamily ?? 'Poppins', decoration: widget.textDecoration, @@ -192,9 +208,19 @@ class _AppTextState extends State { ); } else { return Text( - !hidden ? text : (text.substring(0, text.length > widget.maxLength ? widget.maxLength : text.length)), + !hidden + ? text + : (text.substring( + 0, + text.length > widget.maxLength + ? widget.maxLength + : text.length)), textAlign: widget.textAlign, - overflow: widget.maxLines != null ? ((widget.maxLines > 1) ? TextOverflow.fade : TextOverflow.ellipsis) : null, + overflow: widget.maxLines != null + ? ((widget.maxLines > 1) + ? TextOverflow.fade + : TextOverflow.ellipsis) + : null, maxLines: widget.maxLines ?? null, style: widget.style != null ? _getFontStyle().copyWith( @@ -206,7 +232,8 @@ class _AppTextState extends State { fontStyle: widget.italic ? FontStyle.italic : null, color: widget.color != null ? widget.color : Colors.black, fontSize: widget.fontSize ?? _getFontSize(), - letterSpacing: widget.letterSpacing ?? (widget.variant == "overline" ? 1.5 : null), + letterSpacing: widget.letterSpacing ?? + (widget.variant == "overline" ? 1.5 : null), fontWeight: widget.fontWeight ?? _getFontWeight(), fontFamily: widget.fontFamily ?? 'Poppins', decoration: widget.textDecoration, diff --git a/lib/widgets/shared/bottom_nav_bar.dart b/lib/widgets/shared/bottom_nav_bar.dart index 16988d82..dca59ee0 100644 --- a/lib/widgets/shared/bottom_nav_bar.dart +++ b/lib/widgets/shared/bottom_nav_bar.dart @@ -41,52 +41,61 @@ class _BottomNavBarState extends State { elevation: 4, shape: CircularNotchedRectangle(), color: Colors.white, - child: Padding( - padding: EdgeInsets.symmetric(horizontal: 18), - child: Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - BottomNavigationItem( - icon: DoctorApp.home_1, - activeIcon: DoctorApp.home_active_1, - changeIndex: _changeIndex, - index: widget.index, - currentIndex: 0, - name: TranslationBase.of(context).home, - dashboardViewModel: widget.dashboardViewModel, - ), - BottomNavigationItem( - icon: DoctorApp.schedule_1, - activeIcon: DoctorApp.schedule_active_1, - changeIndex: _changeIndex, - index: widget.index, - currentIndex: 1, - name: TranslationBase.of(context).mySchedule, - dashboardViewModel: widget.dashboardViewModel, + child: Container( + decoration: BoxDecoration( + border: Border.all(color: Color(0XFFEFEFEF), width: 1) + ), + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 18), + child: Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + BottomNavigationItem( + icon: DoctorApp.home_1, + activeIcon: DoctorApp.home_active_1, + svgPath: "assets/images/svgs/bottom_nav/home-active.svg", + changeIndex: _changeIndex, + index: widget.index, + currentIndex: 0, + name: TranslationBase.of(context).home, + dashboardViewModel: widget.dashboardViewModel, + ), + BottomNavigationItem( + icon: DoctorApp.schedule_1, + activeIcon: DoctorApp.schedule_active_1, + svgPath: "assets/images/svgs/bottom_nav/schedule-active.svg", + changeIndex: _changeIndex, + index: widget.index, + currentIndex: 1, + name: TranslationBase.of(context).mySchedule, + dashboardViewModel: widget.dashboardViewModel, - ), - BottomNavigationItem( - icon: DoctorApp.qr_reader, - activeIcon: DoctorApp.qr_reader_active_1, - changeIndex: _changeIndex, - index: widget.index, - currentIndex: 2, - name: TranslationBase.of(context).qr, - dashboardViewModel: widget.dashboardViewModel, + ), + BottomNavigationItem( + icon: DoctorApp.qr_reader, + activeIcon: DoctorApp.qr_reader_active_1, + svgPath: "assets/images/svgs/bottom_nav/reader-active.svg", + changeIndex: _changeIndex, + index: widget.index, + currentIndex: 2, + name: TranslationBase.of(context).qr, + dashboardViewModel: widget.dashboardViewModel, - ), - BottomNavigationItem( - icon: DoctorApp.dr_reply_1, - activeIcon: DoctorApp.dr_reply_active_1, - changeIndex: _changeIndex, - index: widget.index, - currentIndex: 3, - name: TranslationBase.of(context).replay2, - dashboardViewModel: widget.dashboardViewModel, + ), + BottomNavigationItem( + icon: DoctorApp.dr_reply_1, + activeIcon: DoctorApp.dr_reply_active_1, + svgPath: "assets/images/svgs/bottom_nav/reply-active.svg", + changeIndex: _changeIndex, + index: widget.index, + currentIndex: 3, + name: TranslationBase.of(context).replay2, + dashboardViewModel: widget.dashboardViewModel, - ), - ], + ), + ], + ), ), ), ); diff --git a/lib/widgets/shared/bottom_navigation_item.dart b/lib/widgets/shared/bottom_navigation_item.dart index 02b64c78..8924d719 100644 --- a/lib/widgets/shared/bottom_navigation_item.dart +++ b/lib/widgets/shared/bottom_navigation_item.dart @@ -1,8 +1,12 @@ import 'package:badges/badges.dart'; +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/dashboard_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/doctor_replay_view_model.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; import 'package:provider/provider.dart'; import '../../locator.dart'; @@ -15,8 +19,7 @@ class BottomNavigationItem extends StatelessWidget { final int currentIndex; final String name; final DashboardViewModel dashboardViewModel; - - + final String svgPath; BottomNavigationItem( {this.icon, @@ -24,8 +27,9 @@ class BottomNavigationItem extends StatelessWidget { this.changeIndex, this.index, this.currentIndex, - this.name, this.dashboardViewModel}); - + this.name, + this.dashboardViewModel, + this.svgPath}); @override Widget build(BuildContext context) { @@ -41,51 +45,69 @@ class BottomNavigationItem extends StatelessWidget { child: Stack( alignment: AlignmentDirectional.center, children: [ - - + if (currentIndex == index) + Positioned( + top: 0, + child: Container( + color: AppGlobal.appRedColor, + width: 100, + height: 3, + )), Column( mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.center, children: [ - SizedBox(height: 15,), + SizedBox( + height: 15, + ), Container( - child: Icon(currentIndex == index ? activeIcon : icon, - color: currentIndex == index - ? Color(0xFF333C45) - : Theme.of(context).dividerColor, - size: 22.0), + child: SvgPicture.asset( + svgPath, + width: SizeConfig.widthMultiplier * (10), + height: SizeConfig.getHeightMultiplier( + height: SizeConfig.heightMultiplier * + (SizeConfig.isHeightVeryShort + ? 10 + : SizeConfig.isHeightShort + ? 8.5 + : 7)) * + 40, + ), + ), + SizedBox( + height: 8, ), - SizedBox(height: 5,), Expanded( - child: Text( - name, - style: TextStyle( - color: currentIndex == index - ? Theme.of(context).primaryColor - : Theme.of(context).dividerColor, + child: AppText(name ?? "", + textAlign: TextAlign.center, + fontSize: + SizeConfig.getTextMultiplierBasedOnWidth() * 2.5, + letterSpacing: -0.24, + color: AppGlobal.appTextColor, + fontWeight: FontWeight.w600) //#989898, ), - ), - ), ], ), - if(currentIndex == 3 && dashboardViewModel.notRepliedCount != 0) - Positioned( - right: 18.0, - bottom: 40.0, - child: Badge( - toAnimate: false, - position: BadgePosition.topEnd(), - shape: BadgeShape.circle, - badgeColor: Colors.red[800], - borderRadius: BorderRadius.circular(8), - badgeContent: Container( - // padding: EdgeInsets.all(2.0), - child: Text(dashboardViewModel.notRepliedCount.toString(), - style: TextStyle( - color: Colors.white, fontSize: 12.0)), + if (currentIndex == 3 && + dashboardViewModel.notRepliedCount != 0) + Positioned( + right: 18.0, + bottom: 40.0, + child: Badge( + toAnimate: false, + position: BadgePosition.topEnd(), + shape: BadgeShape.circle, + badgeColor: Colors.red[800], + borderRadius: BorderRadius.circular(8), + badgeContent: Container( + // padding: EdgeInsets.all(2.0), + child: AppText( + dashboardViewModel.notRepliedCount.toString(), + color: Colors.white, + fontSize: 12.0), + ), ), ), - ), ], ), ), diff --git a/lib/widgets/shared/buttons/app_buttons_widget.dart b/lib/widgets/shared/buttons/app_buttons_widget.dart index acbd27fe..bb43dc8c 100644 --- a/lib/widgets/shared/buttons/app_buttons_widget.dart +++ b/lib/widgets/shared/buttons/app_buttons_widget.dart @@ -1,3 +1,5 @@ +import 'dart:ui'; + import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; @@ -30,7 +32,7 @@ class AppButton extends StatefulWidget { this.iconData, this.icon, this.color, - this.fontSize = 2, + this.fontSize = 16, this.padding = 13, this.loading = false, this.disabled = false, @@ -54,10 +56,13 @@ class _AppButtonState extends State { // height: MediaQuery.of(context).size.height * 0.075, height: widget.height, child: IgnorePointer( - ignoring: widget.loading ||widget.disabled, + ignoring: widget.loading || widget.disabled, child: RawMaterialButton( fillColor: widget.disabled - ? Colors.grey : widget.color != null ? widget.color : HexColor("#B8382C"), + ? Colors.grey + : widget.color != null + ? widget.color + : HexColor("#D02127"), splashColor: widget.color, child: Padding( padding: (widget.hPadding > 0 || widget.vPadding > 0) @@ -102,19 +107,22 @@ class _AppButtonState extends State { child: AppText( widget.title, color: widget.fontColor, - fontSize: SizeConfig.textMultiplier * widget.fontSize, - fontWeight: widget.fontWeight, + fontSize: widget.fontSize, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, ), ), ], ), ), - onPressed: widget.disabled ? (){} : widget.onPressed, + onPressed: widget.disabled ? () {} : widget.onPressed, shape: RoundedRectangleBorder( side: BorderSide( - color: - widget.hasBorder ? widget.borderColor : widget.disabled - ? Colors.grey : widget.color ?? Color(0xFFB8382C), + color: widget.hasBorder + ? widget.borderColor + : widget.disabled + ? Colors.grey + : widget.color ?? Color(0xFFB8382C), width: 0.8, ), borderRadius: BorderRadius.all(Radius.circular(widget.radius))), diff --git a/lib/widgets/shared/card_with_bg_widget.dart b/lib/widgets/shared/card_with_bg_widget.dart index c8e187a1..d7513975 100644 --- a/lib/widgets/shared/card_with_bg_widget.dart +++ b/lib/widgets/shared/card_with_bg_widget.dart @@ -2,7 +2,6 @@ import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; - class CardWithBgWidget extends StatelessWidget { final Widget widget; final Color bgColor; @@ -12,7 +11,12 @@ class CardWithBgWidget extends StatelessWidget { final double marginSymmetric; CardWithBgWidget( - {@required this.widget, this.bgColor, this.hasBorder = true, this.padding = 15.0, this.marginLeft = 10.0, this.marginSymmetric=10.0}); + {@required this.widget, + this.bgColor, + this.hasBorder = true, + this.padding = 15.0, + this.marginLeft = 10.0, + this.marginSymmetric = 10.0}); @override Widget build(BuildContext context) { @@ -27,6 +31,7 @@ class CardWithBgWidget extends StatelessWidget { border: Border.all( color: hasBorder ? Color(0xFF707070) : Colors.transparent, width: hasBorder ? 0.30 : 0), + ), child: Material( borderRadius: BorderRadius.all(Radius.circular(10.0)), @@ -34,13 +39,15 @@ class CardWithBgWidget extends StatelessWidget { children: [ if (projectProvider.isArabic) Positioned( - child: Container( + child: Container( decoration: BoxDecoration( color: bgColor ?? Color(0xFF58434F), borderRadius: BorderRadius.only( topRight: Radius.circular(10), - bottomRight: Radius.circular(10),),), - width: 10, + bottomRight: Radius.circular(10), + ), + ), + width: 6, ), bottom: 1, top: 1, @@ -50,11 +57,13 @@ class CardWithBgWidget extends StatelessWidget { Positioned( child: Container( decoration: BoxDecoration( - color: bgColor ?? Color(0xFF58434F), - borderRadius: BorderRadius.only( - topLeft: Radius.circular(10), - bottomLeft: Radius.circular(10),),), - width: 7, + color: bgColor ?? Color(0xFF58434F), + borderRadius: BorderRadius.only( + topLeft: Radius.circular(10), + bottomLeft: Radius.circular(10), + ), + ), + width: 5, ), bottom: 1, top: 1, @@ -62,7 +71,7 @@ class CardWithBgWidget extends StatelessWidget { ), Container( padding: EdgeInsets.all(padding), - margin: EdgeInsets.only(left: marginLeft), + margin: EdgeInsets.only(left: !projectProvider.isArabic?marginLeft:0, right:projectProvider.isArabic?marginLeft:0 ), child: widget) ], ), diff --git a/lib/widgets/shared/doctor_card_insurance.dart b/lib/widgets/shared/doctor_card_insurance.dart index 5615015e..abb8efcc 100644 --- a/lib/widgets/shared/doctor_card_insurance.dart +++ b/lib/widgets/shared/doctor_card_insurance.dart @@ -1,7 +1,9 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/large_avatar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/user-guid/CusomRow.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -9,13 +11,13 @@ import 'package:provider/provider.dart'; class DoctorCardInsurance extends StatelessWidget { final String doctorName; - final String branch; + final String approvalNo; final DateTime appointmentDate; final String profileUrl; final String invoiceNO; final String orderNo; final Function onTap; - final bool isPrescriptions; + final bool isInsurance; final String clinic; final String approvalStatus; final String patientOut; @@ -23,13 +25,13 @@ class DoctorCardInsurance extends StatelessWidget { DoctorCardInsurance( {this.doctorName, - this.branch, + this.approvalNo, this.profileUrl, this.invoiceNO, this.onTap, this.appointmentDate, this.orderNo, - this.isPrescriptions = false, + this.isInsurance = false, this.clinic, this.approvalStatus, this.patientOut, @@ -59,7 +61,8 @@ class DoctorCardInsurance extends StatelessWidget { topLeft: Radius.circular(10), bottomLeft: Radius.circular(10), ), - color: approvalStatus == "Approved" || approvalStatus == "تمت الموافقة" + color: approvalStatus == "Approved" || + approvalStatus == "تمت الموافقة" ? Color(0xff359846) : Color(0xffD02127), ), @@ -67,7 +70,8 @@ class DoctorCardInsurance extends StatelessWidget { Expanded( child: Container( padding: EdgeInsets.only( - left: projectViewModel.isArabic ? 0 : 15, right: projectViewModel.isArabic ? 15 : 0), + left: projectViewModel.isArabic ? 0 : 15, + right: projectViewModel.isArabic ? 15 : 0), child: InkWell( onTap: onTap, child: Column( @@ -78,22 +82,32 @@ class DoctorCardInsurance extends StatelessWidget { children: [ AppText( "$approvalStatus", - color: approvalStatus == "Approved" || approvalStatus == "تمت الموافقة" + color: approvalStatus == "Approved" || + approvalStatus == "تمت الموافقة" ? Color(0xff359846) : Color(0xffD02127), + letterSpacing: -0.4, + fontSize: + SizeConfig.getTextMultiplierBasedOnWidth() * + 2.7, ), Container( decoration: BoxDecoration( borderRadius: BorderRadius.all( - Radius.circular(25.0), + Radius.circular(20.0), ), color: Color(0xff2E303A)), child: Padding( - padding: const EdgeInsets.all(12.0), + padding: const EdgeInsets.symmetric( + vertical: 6.5, horizontal: 11.5), child: AppText( '$patientOut'.replaceAll(" ", ""), color: Colors.white, - fontSize: 13.0, + fontSize: + SizeConfig.getTextMultiplierBasedOnWidth() * + 2.7, + letterSpacing: -0.4, + fontWeight: FontWeight.w600, ), ), ) @@ -104,7 +118,9 @@ class DoctorCardInsurance extends StatelessWidget { Expanded( child: AppText( doctorName, - bold: true, + fontSize: 16.0, + letterSpacing: -0.64, + fontWeight: FontWeight.w600, )), ], ), @@ -123,86 +139,54 @@ class DoctorCardInsurance extends StatelessWidget { flex: 4, child: Container( margin: EdgeInsets.all(10), - child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ - if (orderNo != null && !isPrescriptions) - Row( - children: [ - AppText( - 'order No:', - color: Colors.grey[500], + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + if (orderNo != null && !isInsurance) + CustomRow( + label: 'Invoice:', + value: invoiceNO, ), - AppText( - orderNo ?? '', - ) - ], - ), - if (invoiceNO != null && !isPrescriptions) - Row( - children: [ - AppText( - 'Invoice:', - color: Colors.grey[500], + if (invoiceNO != null && !isInsurance) + CustomRow( + label: 'Invoice:', + value: invoiceNO, ), - AppText( - invoiceNO, - ) - ], - ), - if (isPrescriptions) - Row( - children: [ - AppText( - TranslationBase.of(context).clinic + ": ", - color: Colors.grey[500], - fontSize: 14, - //fontWeight: FontWeight.w600, - //color: Colors.grey[500], + if (isInsurance) + CustomRow( + label: + TranslationBase.of(context).clinic + + ": ", + value: clinic, ), - Expanded( - child: AppText( - clinic, - //fontWeight: FontWeight.w700, - fontSize: 14.0, - ), - ) - ], - ), - if (branch2 != null) - Row( - children: [ - AppText( - TranslationBase.of(context).branch + ": ", - fontSize: 14, - color: Colors.grey[500], + if (branch2 != null) + CustomRow( + label: + TranslationBase.of(context).branch + + ": ", + value: branch2, ), - AppText( - branch2, - fontSize: 14.0, - ) - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context).approvalNo + ": ", - fontSize: 14, - color: Colors.grey[500], - //color: Colors.grey[500], - ), - AppText( - branch, - fontSize: 14.0, - ) - ], - ), - ]), + if (approvalNo != null) + CustomRow( + label: TranslationBase.of(context) + .approvalNo + + ": ", + value: approvalNo, + ), + ]), ), ), - Padding( - padding: const EdgeInsets.symmetric(horizontal: 15.0), - child: Icon( - EvaIcons.eye, - ), + Column( + children: [ + Padding( + padding: const EdgeInsets.symmetric( + horizontal: 15.0), + child: Icon( + EvaIcons.eye, + color: Color(0xff2E303A), + ), + ), + ], ) ], ), diff --git a/lib/widgets/shared/drawer_item_widget.dart b/lib/widgets/shared/drawer_item_widget.dart index 2b8ce40d..46497e17 100644 --- a/lib/widgets/shared/drawer_item_widget.dart +++ b/lib/widgets/shared/drawer_item_widget.dart @@ -12,7 +12,8 @@ class DrawerItem extends StatefulWidget { final Color color; final String assetLink; - DrawerItem(this.title, {this.icon, this.color, this.subTitle = '', this.assetLink}); + DrawerItem(this.title, + {this.icon, this.color, this.subTitle = '', this.assetLink}); @override _DrawerItemState createState() => _DrawerItemState(); @@ -26,33 +27,34 @@ class _DrawerItemState extends State { child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - if(widget.assetLink!=null) + if (widget.assetLink != null) Container( height: 20, width: 20, child: Image.asset(widget.assetLink), ), - if(widget.assetLink==null) - Icon( - widget.icon, - color: widget.color ?? Colors.black87, - size: SizeConfig.imageSizeMultiplier * 5, - ), + if (widget.assetLink == null) + Icon( + widget.icon, + color: widget.color ?? Colors.black87, + size: SizeConfig.imageSizeMultiplier * 5, + ), Expanded( child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start, children: [ Container( - width: MediaQuery.of(context).size.width *0.45, + width: MediaQuery.of(context).size.width * 0.45, child: AppText( widget.title, marginLeft: 5, marginRight: 5, - color:widget.color ??Color(0xFF2E303A), + color: widget.color ?? Color(0xFF2E303A), fontSize: 14, fontFamily: 'Poppins', fontWeight: FontWeight.w600, + letterSpacing: -0.84, ), ), ], diff --git a/lib/widgets/shared/errors/error_message.dart b/lib/widgets/shared/errors/error_message.dart index 21e04e6c..2930ae84 100644 --- a/lib/widgets/shared/errors/error_message.dart +++ b/lib/widgets/shared/errors/error_message.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; import '../app_texts_widget.dart'; @@ -18,7 +19,7 @@ class ErrorMessage extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.center, children: [ SizedBox(height: 100,), - Image.asset('assets/images/no-data.png'), + SvgPicture.asset('assets/images/svgs/no data.svg'), Center( child: Center( child: Padding( diff --git a/lib/widgets/shared/loader/gif_loader_dialog_utils.dart b/lib/widgets/shared/loader/gif_loader_dialog_utils.dart index bf383fff..264e1a66 100644 --- a/lib/widgets/shared/loader/gif_loader_dialog_utils.dart +++ b/lib/widgets/shared/loader/gif_loader_dialog_utils.dart @@ -9,6 +9,7 @@ class GifLoaderDialogUtils { } static hideDialog(BuildContext context) { + if(Navigator.canPop(context)) Navigator.of(context).pop(); } } diff --git a/lib/widgets/shared/text_fields/app-textfield-custom.dart b/lib/widgets/shared/text_fields/app-textfield-custom.dart index cd97c8d4..769cd4f8 100644 --- a/lib/widgets/shared/text_fields/app-textfield-custom.dart +++ b/lib/widgets/shared/text_fields/app-textfield-custom.dart @@ -96,16 +96,17 @@ class _AppTextFieldCustomState extends State { Container( height: widget.height != 0 && widget.maxLines == 1 ? widget.height + 8 - : null, + : MediaQuery.of(context).size.height * 0.098, decoration: widget.hasBorder ? TextFieldsUtils.containerBorderDecoration( Color(0Xffffffff), widget.validationError == null ? Color(0xFFEFEFEF) - : Colors.red.shade700) + : Colors.red.shade700, + ) : null, padding: - EdgeInsets.only(top: 4.0, bottom: 4.0, left: 8.0, right: 8.0), + EdgeInsets.only(top: 4.0, bottom: 0.0, left: 8.0, right: 8.0), child: InkWell( onTap: widget.onClick ?? null, child: Row( @@ -116,43 +117,51 @@ class _AppTextFieldCustomState extends State { padding: widget.dropDownText == null ? widget.isSearchTextField ? EdgeInsets.only(top: 10) - : EdgeInsets.symmetric(vertical: 0) - : EdgeInsets.symmetric(vertical: 0), // 8.0 + : EdgeInsets.only(top: 7.5) + : EdgeInsets.only(top: 0), // 8.0 child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.center, children: [ - if ((widget.controller != null && - widget.controller.text != "") || - widget.dropDownText != null) - AppText( - widget.hintText, - // marginTop: widget.hasHintmargin ? 0 : 30, - color: Color(0xFF2E303A), - fontSize: widget.isPrscription == false - ? SizeConfig.getHeightMultiplier() * - (SizeConfig.isWidthLarge ? 1.1 : 1.3) - : 0, - fontWeight: FontWeight.w700, - ), + // if ((widget.controller != null && + // widget.controller.text != "") || + // widget.dropDownText != null) + AppText( + widget.hintText, + // marginTop: widget.hasHintmargin ? 0 : 30, + color: Color(0xFF2E303A), + fontSize: widget.isPrscription == false + ? 11.0 + // SizeConfig.getHeightMultiplier() * + // (SizeConfig.isWidthLarge ? 1.1 : 1.3) + : 0, + fontWeight: FontWeight.w600, + letterSpacing: -0.44, + fontFamily: 'Poppins', + ), widget.dropDownText == null ? Container( height: widget.height != 0 && widget.maxLines == 1 ? widget.height - 22 - : null, + : MediaQuery.of(context).size.height * + 0.045, child: TextFormField( textAlign: projectViewModel.isArabic ? TextAlign.right : TextAlign.left, focusNode: _focusNode, + textAlignVertical: TextAlignVertical.top, decoration: TextFieldsUtils .textFieldSelectorDecoration( widget.hintText, null, true), style: TextStyle( - fontSize: SizeConfig.textMultiplier * 1.7, + fontSize: + 14.0, //SizeConfig.textMultiplier * 1.7, fontFamily: 'Poppins', color: Color(0xFF575757), + fontWeight: FontWeight.w400, + letterSpacing: -0.56, ), controller: widget.controller, keyboardType: widget.inputType ?? @@ -201,7 +210,8 @@ class _AppTextFieldCustomState extends State { Icons.keyboard_arrow_down, color: widget.dropDownColor != null ? widget.dropDownColor - : Colors.black, + : Color(0xff2E303A), + size: 12.0, ), ) : Container(), diff --git a/lib/widgets/shared/text_fields/app_text_field_custom_serach.dart b/lib/widgets/shared/text_fields/app_text_field_custom_serach.dart index 2a5304e2..46fa78d1 100644 --- a/lib/widgets/shared/text_fields/app_text_field_custom_serach.dart +++ b/lib/widgets/shared/text_fields/app_text_field_custom_serach.dart @@ -1,7 +1,9 @@ import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; +import 'package:provider/provider.dart'; import 'app-textfield-custom.dart'; @@ -35,6 +37,7 @@ class AppTextFieldCustomSearch extends StatelessWidget { final List inputFormatters; @override Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); return Container( margin: EdgeInsets.only(left: 16, right: 16, bottom: 16, top: marginTop), child: Stack( @@ -58,7 +61,7 @@ class AppTextFieldCustomSearch extends StatelessWidget { onFieldSubmitted: onFieldSubmitted, validationError: validationError), if (positionedChild != null) - Positioned(right: 35, top: 5, child: positionedChild) + projectViewModel.isArabic?Positioned(left: 35, top: 5, child: positionedChild):Positioned(right: 35, top: 5, child: positionedChild) ], ), ); diff --git a/lib/widgets/shared/text_fields/country_textfield_custom.dart b/lib/widgets/shared/text_fields/country_textfield_custom.dart new file mode 100644 index 00000000..baed4995 --- /dev/null +++ b/lib/widgets/shared/text_fields/country_textfield_custom.dart @@ -0,0 +1,77 @@ +import 'package:doctor_app_flutter/util/helpers.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class CountryTextField extends StatefulWidget { + final dynamic element; + final String elementError; + final List elementList; + final String keyName; + final String keyId; + final String hintText; + final double width; + final Function(dynamic) okFunction; + + CountryTextField( + {Key key, + @required this.element, + @required this.elementError, + this.width, + this.elementList, + this.keyName, + this.keyId, + this.hintText, + this.okFunction}) + : super(key: key); + + @override + _CountryTextfieldState createState() => _CountryTextfieldState(); +} + +class _CountryTextfieldState extends State { + @override + Widget build(BuildContext context) { + return Container( + width: widget.width ?? null, + child: InkWell( + onTap: widget.elementList != null + ? () { + Helpers.hideKeyboard(context); + ListSelectDialog dialog = ListSelectDialog( + list: widget.elementList, + attributeName: '${widget.keyName}', + attributeValueId: widget.elementList.length == 1 + ? widget.elementList[0]['${widget.keyId}'] + : '${widget.keyId}', + okText: TranslationBase.of(context).ok, + okFunction: (selectedValue) => + widget.okFunction(selectedValue), + ); + showDialog( + barrierDismissible: false, + context: context, + builder: (BuildContext context) { + return dialog; + }, + ); + } + : null, + child: AppTextFieldCustom( + hintText: widget.hintText, + dropDownText: widget.elementList.length == 1 + ? widget.elementList[0]['${widget.keyName}'] + : widget.element != null + ? widget.element['${widget.keyName}'] + : null, + isTextFieldHasSuffix: true, + validationError: + widget.elementList.length != 1 ? widget.elementError : null, + enabled: false, + ), + ), + ); + } +} diff --git a/lib/widgets/shared/text_fields/text_fields_utils.dart b/lib/widgets/shared/text_fields/text_fields_utils.dart index 1f1ff2bb..23ae13a8 100644 --- a/lib/widgets/shared/text_fields/text_fields_utils.dart +++ b/lib/widgets/shared/text_fields/text_fields_utils.dart @@ -1,10 +1,9 @@ import 'package:flutter/material.dart'; -class TextFieldsUtils{ - +class TextFieldsUtils { static BoxDecoration containerBorderDecoration( Color containerColor, Color borderColor, - {double borderWidth = -1, double borderRadius = 12}) { + {double borderWidth = -1, double borderRadius = 10.0}) { return BoxDecoration( color: containerColor, shape: BoxShape.rectangle, @@ -46,13 +45,15 @@ class TextFieldsUtils{ borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), borderRadius: BorderRadius.circular(8), ),*/ - hintText: selectedText != null ? selectedText : hintText??"", - suffixIcon: Icon(suffixIcon??null, color: Colors.grey.shade600,), - + hintText: selectedText != null ? selectedText : "" ?? "", + suffixIcon: Icon( + suffixIcon ?? null, + color: Colors.grey.shade600, + ), hintStyle: TextStyle( - fontSize: 14, + fontSize: 11, color: Colors.grey.shade600, ), ); } -} \ No newline at end of file +} diff --git a/lib/widgets/shared/user-guid/CusomRow.dart b/lib/widgets/shared/user-guid/CusomRow.dart index b66d4926..21875e4d 100644 --- a/lib/widgets/shared/user-guid/CusomRow.dart +++ b/lib/widgets/shared/user-guid/CusomRow.dart @@ -7,7 +7,11 @@ class CustomRow extends StatelessWidget { const CustomRow({ Key key, this.label, - this.value, this.labelSize, this.valueSize, this.width, this.isCopyable= true, + this.value, + this.labelSize, + this.valueSize, + this.width, + this.isCopyable = true, }) : super(key: key); final String label; @@ -24,21 +28,27 @@ class CustomRow extends StatelessWidget { children: [ AppText( label, - fontSize: labelSize??SizeConfig.getTextMultiplierBasedOnWidth() * 2.8, + fontSize: + labelSize ?? SizeConfig.getTextMultiplierBasedOnWidth() * 2.7, color: Color(0xFF575757), fontWeight: FontWeight.w600, + letterSpacing: -0.4, ), SizedBox( width: 1, ), - AppText( - value, - fontSize: valueSize??SizeConfig.getTextMultiplierBasedOnWidth() * 3, - color: Color(0xFF2E303A), - fontWeight: FontWeight.w700, - isCopyable: isCopyable, + Expanded( + child: AppText( + value, + fontSize: + valueSize ?? SizeConfig.getTextMultiplierBasedOnWidth() * 2.9, + color: Color(0xFF2B353E), + fontWeight: FontWeight.w700, + letterSpacing: -0.48, + isCopyable: isCopyable, + ), ), ], ); } -} \ No newline at end of file +} diff --git a/lib/widgets/transitions/slide_up_page.dart b/lib/widgets/transitions/slide_up_page.dart index f534e2a3..ee0b7473 100644 --- a/lib/widgets/transitions/slide_up_page.dart +++ b/lib/widgets/transitions/slide_up_page.dart @@ -9,9 +9,9 @@ class SlideUpPageRoute extends PageRouteBuilder { final Widget widget; final bool fullscreenDialog; final bool opaque; + final String settingRoute; - SlideUpPageRoute( - {this.widget, this.fullscreenDialog = false, this.opaque = true}) + SlideUpPageRoute({this.widget, this.fullscreenDialog = false, this.opaque = true, this.settingRoute}) : super( pageBuilder: ( BuildContext context, @@ -24,21 +24,17 @@ class SlideUpPageRoute extends PageRouteBuilder { opaque: opaque, barrierColor: Color.fromRGBO(0, 0, 0, 0.5), barrierDismissible: true, - settings: RouteSettings(name: widget.runtimeType.toString()), + settings: RouteSettings(name: settingRoute ?? widget.runtimeType.toString()), transitionDuration: Duration(milliseconds: 800), - transitionsBuilder: ((BuildContext context, - Animation animation, - Animation secondaryAnimation, - Widget child) { + transitionsBuilder: + ((BuildContext context, Animation animation, Animation secondaryAnimation, Widget child) { var begin = Offset(0.0, 1.0); var end = Offset.zero; var curve = Curves.easeInOutQuint; - var tween = - Tween(begin: begin, end: end).chain(CurveTween(curve: curve)); + var tween = Tween(begin: begin, end: end).chain(CurveTween(curve: curve)); - return SlideTransition( - position: animation.drive(tween), child: child); + return SlideTransition(position: animation.drive(tween), child: child); }), ); } diff --git a/pubspec.lock b/pubspec.lock deleted file mode 100644 index 43aefcb2..00000000 --- a/pubspec.lock +++ /dev/null @@ -1,1235 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - _fe_analyzer_shared: - dependency: transitive - description: - name: _fe_analyzer_shared - url: "https://pub.dartlang.org" - source: hosted - version: "12.0.0" - analyzer: - dependency: transitive - description: - name: analyzer - url: "https://pub.dartlang.org" - source: hosted - version: "0.40.6" - archive: - dependency: transitive - description: - name: archive - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.13" - args: - dependency: transitive - description: - name: args - url: "https://pub.dartlang.org" - source: hosted - version: "1.6.0" - async: - dependency: transitive - description: - name: async - url: "https://pub.dartlang.org" - source: hosted - version: "2.5.0-nullsafety.1" - autocomplete_textfield: - dependency: "direct main" - description: - name: autocomplete_textfield - url: "https://pub.dartlang.org" - source: hosted - version: "1.7.3" - badges: - dependency: "direct main" - description: - name: badges - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - barcode_scan_fix: - dependency: "direct main" - description: - name: barcode_scan_fix - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.2" - bazel_worker: - dependency: transitive - description: - name: bazel_worker - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.25" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0-nullsafety.1" - build: - dependency: transitive - description: - name: build - url: "https://pub.dartlang.org" - source: hosted - version: "1.6.2" - build_config: - dependency: transitive - description: - name: build_config - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.5" - build_daemon: - dependency: transitive - description: - name: build_daemon - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.7" - build_modules: - dependency: transitive - description: - name: build_modules - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.4" - build_resolvers: - dependency: transitive - description: - name: build_resolvers - url: "https://pub.dartlang.org" - source: hosted - version: "1.5.3" - build_runner: - dependency: "direct dev" - description: - name: build_runner - url: "https://pub.dartlang.org" - source: hosted - version: "1.11.1" - build_runner_core: - dependency: transitive - description: - name: build_runner_core - url: "https://pub.dartlang.org" - source: hosted - version: "6.1.7" - build_web_compilers: - dependency: "direct dev" - description: - name: build_web_compilers - url: "https://pub.dartlang.org" - source: hosted - version: "2.12.2" - built_collection: - dependency: transitive - description: - name: built_collection - url: "https://pub.dartlang.org" - source: hosted - version: "4.3.2" - built_value: - dependency: transitive - description: - name: built_value - url: "https://pub.dartlang.org" - source: hosted - version: "7.1.0" - cached_network_image: - dependency: "direct main" - description: - name: cached_network_image - url: "https://pub.dartlang.org" - source: hosted - version: "2.5.1" - characters: - dependency: transitive - description: - name: characters - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0-nullsafety.3" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0-nullsafety.1" - charts_common: - dependency: transitive - description: - name: charts_common - url: "https://pub.dartlang.org" - source: hosted - version: "0.9.0" - charts_flutter: - dependency: "direct main" - description: - name: charts_flutter - url: "https://pub.dartlang.org" - source: hosted - version: "0.9.0" - checked_yaml: - dependency: transitive - description: - name: checked_yaml - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.4" - chewie: - dependency: transitive - description: - name: chewie - url: "https://pub.dartlang.org" - source: hosted - version: "0.9.10" - chewie_audio: - dependency: transitive - description: - name: chewie_audio - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0+1" - cli_util: - dependency: transitive - description: - name: cli_util - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0" - clock: - dependency: transitive - description: - name: clock - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0-nullsafety.1" - code_builder: - dependency: transitive - description: - name: code_builder - url: "https://pub.dartlang.org" - source: hosted - version: "3.7.0" - collection: - dependency: transitive - description: - name: collection - url: "https://pub.dartlang.org" - source: hosted - version: "1.15.0-nullsafety.3" - connectivity: - dependency: "direct main" - description: - name: connectivity - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.9+5" - connectivity_for_web: - dependency: transitive - description: - name: connectivity_for_web - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.1+4" - connectivity_macos: - dependency: transitive - description: - name: connectivity_macos - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.0+7" - connectivity_platform_interface: - dependency: transitive - description: - name: connectivity_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.6" - convert: - dependency: transitive - description: - name: convert - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" - crypto: - dependency: transitive - description: - name: crypto - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.5" - css_colors: - dependency: transitive - description: - name: css_colors - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.2" - csslib: - dependency: transitive - description: - name: csslib - url: "https://pub.dartlang.org" - source: hosted - version: "0.16.2" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.3" - dart_style: - dependency: transitive - description: - name: dart_style - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.10" - date_time_picker: - dependency: "direct main" - description: - name: date_time_picker - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.1" - device_info: - dependency: "direct main" - description: - name: device_info - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.2+10" - device_info_platform_interface: - dependency: transitive - description: - name: device_info_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1" - dropdown_search: - dependency: "direct main" - description: - name: dropdown_search - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.9" - equatable: - dependency: transitive - description: - name: equatable - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.6" - eva_icons_flutter: - dependency: "direct main" - description: - name: eva_icons_flutter - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.1" - expandable: - dependency: "direct main" - description: - name: expandable - url: "https://pub.dartlang.org" - source: hosted - version: "4.1.4" - fake_async: - dependency: transitive - description: - name: fake_async - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0-nullsafety.1" - ffi: - dependency: transitive - description: - name: ffi - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.3" - file: - dependency: transitive - description: - name: file - url: "https://pub.dartlang.org" - source: hosted - version: "5.2.1" - firebase: - dependency: transitive - description: - name: firebase - url: "https://pub.dartlang.org" - source: hosted - version: "7.3.3" - firebase_analytics: - dependency: "direct main" - description: - name: firebase_analytics - url: "https://pub.dartlang.org" - source: hosted - version: "6.3.0" - firebase_analytics_platform_interface: - dependency: transitive - description: - name: firebase_analytics_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.3" - firebase_analytics_web: - dependency: transitive - description: - name: firebase_analytics_web - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.1" - firebase_core: - dependency: transitive - description: - name: firebase_core - url: "https://pub.dartlang.org" - source: hosted - version: "0.5.3" - firebase_core_platform_interface: - dependency: transitive - description: - name: firebase_core_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - firebase_core_web: - dependency: transitive - description: - name: firebase_core_web - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.1+1" - firebase_messaging: - dependency: "direct main" - description: - name: firebase_messaging - url: "https://pub.dartlang.org" - source: hosted - version: "7.0.3" - fixnum: - dependency: transitive - description: - name: fixnum - url: "https://pub.dartlang.org" - source: hosted - version: "0.10.11" - fl_chart: - dependency: "direct main" - description: - name: fl_chart - url: "https://pub.dartlang.org" - source: hosted - version: "0.12.3" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_blurhash: - dependency: transitive - description: - name: flutter_blurhash - url: "https://pub.dartlang.org" - source: hosted - version: "0.5.0" - flutter_cache_manager: - dependency: transitive - description: - name: flutter_cache_manager - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.2" - flutter_device_type: - dependency: "direct main" - description: - name: flutter_device_type - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0" - flutter_flexible_toast: - dependency: "direct main" - description: - name: flutter_flexible_toast - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.4" - flutter_gifimage: - dependency: "direct main" - description: - name: flutter_gifimage - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1" - flutter_html: - dependency: "direct main" - description: - name: flutter_html - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.2" - flutter_inappwebview: - dependency: transitive - description: - name: flutter_inappwebview - url: "https://pub.dartlang.org" - source: hosted - version: "4.0.0+4" - flutter_localizations: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_page_indicator: - dependency: transitive - description: - name: flutter_page_indicator - url: "https://pub.dartlang.org" - source: hosted - version: "0.0.3" - flutter_plugin_android_lifecycle: - dependency: transitive - description: - name: flutter_plugin_android_lifecycle - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.11" - flutter_staggered_grid_view: - dependency: "direct main" - description: - name: flutter_staggered_grid_view - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.4" - flutter_svg: - dependency: transitive - description: - name: flutter_svg - url: "https://pub.dartlang.org" - source: hosted - version: "0.18.1" - flutter_swiper: - dependency: "direct main" - description: - name: flutter_swiper - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.6" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - flutter_web_plugins: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - font_awesome_flutter: - dependency: "direct main" - description: - name: font_awesome_flutter - url: "https://pub.dartlang.org" - source: hosted - version: "8.12.0" - get_it: - dependency: "direct main" - description: - name: get_it - url: "https://pub.dartlang.org" - source: hosted - version: "4.0.4" - glob: - dependency: transitive - description: - name: glob - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - graphs: - dependency: transitive - description: - name: graphs - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0" - hexcolor: - dependency: "direct main" - description: - name: hexcolor - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.6" - html: - dependency: "direct main" - description: - name: html - url: "https://pub.dartlang.org" - source: hosted - version: "0.14.0+4" - html_editor_enhanced: - dependency: "direct main" - description: - name: html_editor_enhanced - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - http: - dependency: "direct main" - description: - name: http - url: "https://pub.dartlang.org" - source: hosted - version: "0.12.2" - http_interceptor: - dependency: "direct main" - description: - name: http_interceptor - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0" - http_multi_server: - dependency: transitive - description: - name: http_multi_server - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.0" - http_parser: - dependency: transitive - description: - name: http_parser - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.4" - image: - dependency: transitive - description: - name: image - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.19" - imei_plugin: - dependency: "direct main" - description: - name: imei_plugin - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - intl: - dependency: "direct main" - description: - name: intl - url: "https://pub.dartlang.org" - source: hosted - version: "0.16.1" - io: - dependency: transitive - description: - name: io - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.5" - js: - dependency: transitive - description: - name: js - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.3-nullsafety.1" - json_annotation: - dependency: transitive - description: - name: json_annotation - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.1" - local_auth: - dependency: "direct main" - description: - name: local_auth - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.3+4" - logging: - dependency: transitive - description: - name: logging - url: "https://pub.dartlang.org" - source: hosted - version: "0.11.4" - maps_launcher: - dependency: "direct main" - description: - name: maps_launcher - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.2+2" - matcher: - dependency: transitive - description: - name: matcher - url: "https://pub.dartlang.org" - source: hosted - version: "0.12.10-nullsafety.1" - meta: - dependency: transitive - description: - name: meta - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0-nullsafety.3" - mime: - dependency: transitive - description: - name: mime - url: "https://pub.dartlang.org" - source: hosted - version: "0.9.7" - nested: - dependency: transitive - description: - name: nested - url: "https://pub.dartlang.org" - source: hosted - version: "0.0.4" - node_interop: - dependency: transitive - description: - name: node_interop - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.1" - node_io: - dependency: transitive - description: - name: node_io - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - octo_image: - dependency: transitive - description: - name: octo_image - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.0" - open_iconic_flutter: - dependency: transitive - description: - name: open_iconic_flutter - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.0" - package_config: - dependency: transitive - description: - name: package_config - url: "https://pub.dartlang.org" - source: hosted - version: "1.9.3" - path: - dependency: transitive - description: - name: path - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.0-nullsafety.1" - path_drawing: - dependency: transitive - description: - name: path_drawing - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.1+1" - path_parsing: - dependency: transitive - description: - name: path_parsing - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.4" - path_provider: - dependency: transitive - description: - name: path_provider - url: "https://pub.dartlang.org" - source: hosted - version: "1.6.28" - path_provider_linux: - dependency: transitive - description: - name: path_provider_linux - url: "https://pub.dartlang.org" - source: hosted - version: "0.0.1+2" - path_provider_macos: - dependency: transitive - description: - name: path_provider_macos - url: "https://pub.dartlang.org" - source: hosted - version: "0.0.4+8" - path_provider_platform_interface: - dependency: transitive - description: - name: path_provider_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.4" - path_provider_windows: - dependency: transitive - description: - name: path_provider_windows - url: "https://pub.dartlang.org" - source: hosted - version: "0.0.4+3" - pedantic: - dependency: transitive - description: - name: pedantic - url: "https://pub.dartlang.org" - source: hosted - version: "1.9.2" - percent_indicator: - dependency: "direct main" - description: - name: percent_indicator - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.9+1" - permission_handler: - dependency: "direct main" - description: - name: permission_handler - url: "https://pub.dartlang.org" - source: hosted - version: "5.1.0+2" - permission_handler_platform_interface: - dependency: transitive - description: - name: permission_handler_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.2" - petitparser: - dependency: transitive - description: - name: petitparser - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.0" - platform: - dependency: transitive - description: - name: platform - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.1" - plugin_platform_interface: - dependency: transitive - description: - name: plugin_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.3" - pool: - dependency: transitive - description: - name: pool - url: "https://pub.dartlang.org" - source: hosted - version: "1.4.0" - process: - dependency: transitive - description: - name: process - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.13" - progress_hud_v2: - dependency: "direct main" - description: - name: progress_hud_v2 - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - protobuf: - dependency: transitive - description: - name: protobuf - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.4" - provider: - dependency: "direct main" - description: - name: provider - url: "https://pub.dartlang.org" - source: hosted - version: "4.3.3" - pub_semver: - dependency: transitive - description: - name: pub_semver - url: "https://pub.dartlang.org" - source: hosted - version: "1.4.4" - pubspec_parse: - dependency: transitive - description: - name: pubspec_parse - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.8" - quiver: - dependency: "direct main" - description: - name: quiver - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.5" - rxdart: - dependency: transitive - description: - name: rxdart - url: "https://pub.dartlang.org" - source: hosted - version: "0.25.0" - scratch_space: - dependency: transitive - description: - name: scratch_space - url: "https://pub.dartlang.org" - source: hosted - version: "0.0.4+3" - screen: - dependency: transitive - description: - name: screen - url: "https://pub.dartlang.org" - source: hosted - version: "0.0.5" - shared_preferences: - dependency: "direct main" - description: - name: shared_preferences - url: "https://pub.dartlang.org" - source: hosted - version: "0.5.12+4" - shared_preferences_linux: - dependency: transitive - description: - name: shared_preferences_linux - url: "https://pub.dartlang.org" - source: hosted - version: "0.0.2+4" - shared_preferences_macos: - dependency: transitive - description: - name: shared_preferences_macos - url: "https://pub.dartlang.org" - source: hosted - version: "0.0.1+11" - shared_preferences_platform_interface: - dependency: transitive - description: - name: shared_preferences_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.4" - shared_preferences_web: - dependency: transitive - description: - name: shared_preferences_web - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.2+7" - shared_preferences_windows: - dependency: transitive - description: - name: shared_preferences_windows - url: "https://pub.dartlang.org" - source: hosted - version: "0.0.2+3" - shelf: - dependency: transitive - description: - name: shelf - url: "https://pub.dartlang.org" - source: hosted - version: "0.7.9" - shelf_web_socket: - dependency: transitive - description: - name: shelf_web_socket - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.4+1" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - source_maps: - dependency: transitive - description: - name: source_maps - url: "https://pub.dartlang.org" - source: hosted - version: "0.10.9" - source_span: - dependency: transitive - description: - name: source_span - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.0-nullsafety.2" - speech_to_text: - dependency: "direct main" - description: - path: speech_to_text - relative: true - source: path - version: "0.0.0" - sqflite: - dependency: transitive - description: - name: sqflite - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.2+4" - sqflite_common: - dependency: transitive - description: - name: sqflite_common - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.3+3" - stack_trace: - dependency: transitive - description: - name: stack_trace - url: "https://pub.dartlang.org" - source: hosted - version: "1.10.0-nullsafety.1" - sticky_headers: - dependency: "direct main" - description: - name: sticky_headers - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.8+1" - stream_channel: - dependency: transitive - description: - name: stream_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0-nullsafety.1" - stream_transform: - dependency: transitive - description: - name: stream_transform - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - string_scanner: - dependency: transitive - description: - name: string_scanner - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0-nullsafety.1" - synchronized: - dependency: transitive - description: - name: synchronized - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.0+2" - term_glyph: - dependency: transitive - description: - name: term_glyph - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0-nullsafety.1" - test_api: - dependency: transitive - description: - name: test_api - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.19-nullsafety.2" - timing: - dependency: transitive - description: - name: timing - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.1+3" - transformer_page_view: - dependency: transitive - description: - name: transformer_page_view - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.6" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0-nullsafety.3" - url_launcher: - dependency: "direct main" - description: - name: url_launcher - url: "https://pub.dartlang.org" - source: hosted - version: "5.7.10" - url_launcher_linux: - dependency: transitive - description: - name: url_launcher_linux - url: "https://pub.dartlang.org" - source: hosted - version: "0.0.1+4" - url_launcher_macos: - dependency: transitive - description: - name: url_launcher_macos - url: "https://pub.dartlang.org" - source: hosted - version: "0.0.1+9" - url_launcher_platform_interface: - dependency: transitive - description: - name: url_launcher_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.9" - url_launcher_web: - dependency: transitive - description: - name: url_launcher_web - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.5+3" - url_launcher_windows: - dependency: transitive - description: - name: url_launcher_windows - url: "https://pub.dartlang.org" - source: hosted - version: "0.0.1+3" - uuid: - dependency: transitive - description: - name: uuid - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.2" - vector_math: - dependency: transitive - description: - name: vector_math - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0-nullsafety.3" - video_player: - dependency: transitive - description: - name: video_player - url: "https://pub.dartlang.org" - source: hosted - version: "0.10.12+5" - video_player_platform_interface: - dependency: transitive - description: - name: video_player_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.0" - video_player_web: - dependency: transitive - description: - name: video_player_web - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.4+1" - wakelock: - dependency: transitive - description: - name: wakelock - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.4+2" - watcher: - dependency: transitive - description: - name: watcher - url: "https://pub.dartlang.org" - source: hosted - version: "0.9.7+15" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - webview_flutter: - dependency: transitive - description: - name: webview_flutter - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.24" - win32: - dependency: transitive - description: - name: win32 - url: "https://pub.dartlang.org" - source: hosted - version: "1.7.4+1" - xdg_directories: - dependency: transitive - description: - name: xdg_directories - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.2" - xml: - dependency: transitive - description: - name: xml - url: "https://pub.dartlang.org" - source: hosted - version: "4.5.1" - yaml: - dependency: transitive - description: - name: yaml - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.1" -sdks: - dart: ">=2.10.2 <2.11.0" - flutter: ">=1.22.2 <2.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 66f0df91..1e5125de 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -60,7 +60,7 @@ dependencies: # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^0.1.2 # SVG - #flutter_svg: ^0.17.4 + flutter_svg: ^0.18.1 percent_indicator: ^2.1.1 #Dependency Injection @@ -103,6 +103,12 @@ dependencies: # Badges badges: ^1.1.4 + # Hijri +# hijri: ^2.0.3 + hijri_picker: ^2.0.0 + + + dev_dependencies: flutter_test: sdk: flutter @@ -124,6 +130,10 @@ flutter: - assets/images/ - assets/images/dashboard/ - assets/images/login/ + - assets/images/svgs/ + - assets/images/svgs/verification/ + - assets/images/svgs/profile_screen/ + - assets/images/svgs/bottom_nav/ - assets/images/patient/ - assets/images/patient/vital_signs/ @@ -146,6 +156,8 @@ flutter: weight: 400 - asset: assets/fonts/Poppins/Poppins-Medium.ttf weight: 500 + - asset: assets/fonts/Poppins/Poppins-SemiBold.ttf + weight: 600 - asset: assets/fonts/Poppins/Poppins-Bold.ttf weight: 700 - asset: assets/fonts/Poppins/Poppins-Bold.ttf