From 6a8353854400eae24fdd6a33bda92e47536fcf8c Mon Sep 17 00:00:00 2001 From: Mohammad Aljmma Date: Sun, 8 Nov 2020 20:34:40 +0200 Subject: [PATCH] add info for Medical --- lib/config/localized_values.dart | 135 +++++++++++++++++- .../insurance/insurance_approval_screen.dart | 2 + .../insurance/insurance_card_screen.dart | 2 + lib/pages/medical/allergies_page.dart | 1 + .../medical/doctor/doctor_home_page.dart | 5 +- .../medical/patient_sick_leave_page.dart | 4 +- .../prescriptions_home_page.dart | 2 + .../medical/reports/report_home_page.dart | 4 +- lib/uitl/translations_delegate_base.dart | 22 +++ lib/widgets/others/app_scaffold_widget.dart | 77 +++++----- lib/widgets/others/not_auh_page.dart | 37 ++++- 11 files changed, 254 insertions(+), 37 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index dfdd758b..223620df 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1,4 +1,4 @@ -const Map> localizedValues = { +const Map localizedValues = { 'dashboardScreenToolbarTitle': {'ar': 'الرئيسة', 'en': 'Home'}, 'settings': {'en': 'Settings', 'ar': 'الاعدادات'}, 'language': {'en': 'App Language', 'ar': 'لغة التطبيق'}, @@ -686,5 +686,138 @@ const Map> localizedValues = { "marital-status": {"en": "Marital status", "ar": "الحالة الإجتماعية"}, "notifications": {"en": "Notifications", "ar": "إشعارات"}, "notificationDetails": {"en": "Notification Details", "ar": "تفاصيل الاشعار"}, + "notificationDetailsa": { + "en": "Notification Details", + "ar": "تفاصيل الاشعار" + }, + + "info-my-doctor-points": { + "en": [ + "View the doctor's profile and qualifications.", + "View the doctor's schedule.", + "View details of your appointments with the selected doctor.", + "Book appointment with the doctor. ", + ], + "ar": [ + "الاطلاع على معلومات الطبيب ومؤهلاته.", + "الاطلاع على جدول الطبيب.", + "الاطلاع على تفاصيل المواعيد التي تمت مع الطبيب.", + "حجز موعد مع الطبيب." + ] + }, + "info-my-doctor": { + "en": + "This service allows you to see all the doctors you have visited in Al Habib Medical Group, and through this service:", + "ar": + "خدمة اطبائي: هذه الخدمة تمكنك من الاطلاع على جميع الاطباء الذين قمت بزيارتهم في مجموعة الحبيب الطبية, كما تستطيع من خلال هذه الخدمة:" + }, + "info-prescriptions": { + "en": + "This service allows you to view all the medical prescriptions issued by Al Habib Medical Group, and through this service, you can:", + "ar": + "خدمة الوصفات الطبية: هذه الخدمة تمكنك من الاطلاع على جميع الوصفات الطبية التي تم اصدارها في مجموعة الحبيب الطبية، كما تستطيع من خلال هذه الخدمة:" + }, + "info-my-prescription-points": { + "en": [ + "View the duration days.", + "View the frequency timing.", + "View the doctor's remarks.", + "Add a reminder to remind you when to take medicine doses.", + "Search in AlHabib Pharmacies about the branches where medicines are available, pharmacies locations and contact numbers.", + "Ordering and delivery medications online.", + "View the prices of the drug. ", + ], + "ar": [ + "الاطلاع على طريقة تناول العلاج.", + "الاطلاع على مدة تناول العلاج.", + "الاطلاع على ملاحظات الطبيب.", + "اضافة منبه للتذكير بموعد تناول جرعات الادوية.", + "البحث في صيدليات الحبيب عن الفروع التي يتوفر فيها العلاج وكذلك مواقع الصيدليات وارقام الاتصال. ", + "امكانية شراء وتوصيل العلاج عن طريق الانترنت.", + "الاطلاع على اسعار الادوية المصروفة." + ] + }, + + "info-insurance-cards": { + "en": + "This service allows you to view all the insurance cards that recorded during your visits to Al Habib Medical Group in addition to:", + "ar": + "خدمة بطاقات التامين: هذه الخدمة تمكنك من الاطلاع على جميع بطاقات التامين والتي تم تسجيلها اثناء زياراتك لمجموعة الحبيب الطبية بالاضافة الى:" + }, + + "info-insurance-cards-points": { + "en": [ + "Name of the insurance company.", + "Insurance category.", + "Insurance policy number.", + "The expiry date of insurance.", + "The status of the insurance card (active or inactive).", + "Details of the coverage, e.x the room category covered as well some cases covered by the insurance.", + ], + "ar": [ + "اسم شركة التامين.", + "فئة التامين.", + "رقم بوليصة التامين.", + "تاريخ انتهاء التامين.", + "حالة بطاقة التامين (فعالة او غير فعالة).", + "تفاصيل التامين، مثلاً: مستوى الغرفة التي يغطيها التامين وكذلك الحالات التي يغطيها التامين.", + ] + }, + + "info-allergies": { + "en": + "This service allows you to view all types of allergies recorded during your visits to Al Habib Medical Group.", + "ar": + "خدمة الحساسية: هذه الخدمة تمكنك من الاطلاع على جميع انواع الحساسية التي تم تسجيلها خلال زياراتك في مجموعة الحبيب الطبية." + }, + + "sick-leaves": {"en": "Sick Leaves", "ar": "الاجازات المرضية"}, + + "info-sick-leaves": { + "en": + "This service allows you to view all sick leaves that were taken in Al Habib Medical Group in addition to:", + "ar": + "الاجازات المرضية: هذه الخدمة تمكنك من الاطلاع على جميع الاجازات المرضية والتي تم اصدارها في مجموعة الحبيب الطبية بالاضافة الى:" + }, + "info-sick-leave-points": { + "en": [ + "Doctor Name", + "Sick leave date ", + "Sick leave days", + "Branch that patient take the vaccination form.", + "Sending a report of vaccinations to the email. ", + ], + "ar": [ + "اسم الطبيب", + "تاريخ الاجازة.", + "عدد ايام الاجازة.", + "الفرع الذي تم اصدار الاجازة منه.", + "ارسال نسخة مختومة من الاجازة الى البريد الالكتروني." + ] + }, + + "info-approvals": { + "en": + "This service allows you to view all approvals requests that have been sent to the insurance companies in addition to:", + "ar": + "خدمة الموافقات: هذه الخدمة تمكنك من الاطلاع على جميع طلبات الموافقات والتي تم ارسالها الى شركات التامين بالاضافة الى:" + }, + + "info-approval-points": { + "en": [ + "View the total unused approvals.", + "Track the approvals status.", + ], + "ar": [ + "الاطلاع على اجمالي الموافقات الغير مستخدمة.", + "تتبع حالة الموافقة.", + ] + }, + + "month-report": {"en": "Monthly Reports", "ar": "تقاريري الشهرية"}, + "info-month-report": { + "en": "Upon activation of this service, the system will send a monthly report automatically to the registered email which lists the vital signs and the results for the last visits made in AlHabib Medical Group.", + "ar": "خدمة التقارير الشهرية: عند تفعيل هذه الخدمة سيقوم النظام بارسال تقرير شهري بشكل آلي على الايميل المسجل والذي يسرد المؤشرات الحيوية ونتائج التحاليل لآخر زيارات تمت بمجموعة الحبيب الطبية." + }, }; diff --git a/lib/pages/insurance/insurance_approval_screen.dart b/lib/pages/insurance/insurance_approval_screen.dart index 038468e0..3b19e670 100644 --- a/lib/pages/insurance/insurance_approval_screen.dart +++ b/lib/pages/insurance/insurance_approval_screen.dart @@ -30,6 +30,8 @@ class _InsuranceApprovalState extends State { isShowAppBar: true, baseViewModel: model, appBarTitle: TranslationBase.of(context).approvals, + description: TranslationBase.of(context).infoApprovals, + infoList: TranslationBase.of(context).infoApprovalPoints, body: SingleChildScrollView( child: Container( margin: EdgeInsets.only( diff --git a/lib/pages/insurance/insurance_card_screen.dart b/lib/pages/insurance/insurance_card_screen.dart index 55100497..a7065399 100644 --- a/lib/pages/insurance/insurance_card_screen.dart +++ b/lib/pages/insurance/insurance_card_screen.dart @@ -31,6 +31,8 @@ class _InsuranceCardState extends State { baseViewModel: model, image: 'assets/images/medical/insurance_card_icon.png', appBarTitle: TranslationBase.of(context).insuranceCards, + description: TranslationBase.of(context).infoInsuranceCards, + infoList: TranslationBase.of(context).infoInsuranceCardsPoints, body: Container( margin: EdgeInsets.only( left: SizeConfig.screenWidth * 0.004, diff --git a/lib/pages/medical/allergies_page.dart b/lib/pages/medical/allergies_page.dart index ea063e19..7fe30a8a 100644 --- a/lib/pages/medical/allergies_page.dart +++ b/lib/pages/medical/allergies_page.dart @@ -15,6 +15,7 @@ class AllergiesPage extends StatelessWidget { isShowAppBar: true, appBarTitle: TranslationBase.of(context).allergies, baseViewModel: model, + description: TranslationBase.of(context).infoAllergies, body: ListView.builder( itemCount: model.allergies.length, itemBuilder: (context, index) => Container( diff --git a/lib/pages/medical/doctor/doctor_home_page.dart b/lib/pages/medical/doctor/doctor_home_page.dart index d406b889..9687b931 100644 --- a/lib/pages/medical/doctor/doctor_home_page.dart +++ b/lib/pages/medical/doctor/doctor_home_page.dart @@ -22,7 +22,9 @@ class DoctorHomePage extends StatelessWidget { builder: (context, MyDoctorViewModel model, widget) => AppScaffold( baseViewModel: model, isShowAppBar: true, - appBarTitle: 'My Doctors', + appBarTitle: TranslationBase.of(context).myDoctor, + description: TranslationBase.of(context).infoMyDoctor, + infoList: TranslationBase.of(context).infoMyDoctorPoints, body: SingleChildScrollView( physics: BouncingScrollPhysics(), child: FractionallySizedBox( @@ -94,6 +96,7 @@ class DoctorHomePage extends StatelessWidget { nationalityFlagURL: doctor.nationalityFlagURL); return DoctorView( doctor: doctorList, + isLiveCareAppointment: false, ); }).toList(), diff --git a/lib/pages/medical/patient_sick_leave_page.dart b/lib/pages/medical/patient_sick_leave_page.dart index d12573f0..dcb6eea3 100644 --- a/lib/pages/medical/patient_sick_leave_page.dart +++ b/lib/pages/medical/patient_sick_leave_page.dart @@ -18,7 +18,9 @@ class _PatientSickLeavePageState extends State { onModelReady: (model) => model.getSickLeave(), builder: (_, model, w) => AppScaffold( isShowAppBar: true, - appBarTitle: 'Sick Leave', + appBarTitle: TranslationBase.of(context).sickLeaves, + description: TranslationBase.of(context).infoSickLeaves, + infoList: TranslationBase.of(context).infoSickLeavePoints, baseViewModel: model, body: Container( margin: EdgeInsets.all(12), diff --git a/lib/pages/medical/prescriptions/prescriptions_home_page.dart b/lib/pages/medical/prescriptions/prescriptions_home_page.dart index 182fca30..dad6fd17 100644 --- a/lib/pages/medical/prescriptions/prescriptions_home_page.dart +++ b/lib/pages/medical/prescriptions/prescriptions_home_page.dart @@ -38,6 +38,8 @@ class _HomePrescriptionsPageState extends State builder: (_, model, widget) => AppScaffold( isShowAppBar: true, appBarTitle: TranslationBase.of(context).prescriptions, + description: TranslationBase.of(context).infoPrescriptions, + infoList: TranslationBase.of(context).infoPrescriptionsPoints, body: Scaffold( extendBodyBehindAppBar: true, appBar: PreferredSize( diff --git a/lib/pages/medical/reports/report_home_page.dart b/lib/pages/medical/reports/report_home_page.dart index 8f24d1dd..5c6812e2 100644 --- a/lib/pages/medical/reports/report_home_page.dart +++ b/lib/pages/medical/reports/report_home_page.dart @@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/viewModels/medical/reports_view_model. import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/medical/reports/report_list_widget.dart'; import 'package:diplomaticquarterapp/pages/medical/reports/reports_page.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -38,7 +39,8 @@ class _HomeReportPageState extends State onModelReady: (model) => model.getReports(), //model.getPrescriptions(), builder: (_, model, widget) => AppScaffold( isShowAppBar: true, - appBarTitle: 'Request', + appBarTitle: TranslationBase.of(context).monthReport, + description: TranslationBase.of(context).infoMonthReport, baseViewModel: model, //bottomSheet: Container(), diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 051823ad..87d6c257 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -740,6 +740,28 @@ class TranslationBase { localizedValues['marital-status'][locale.languageCode]; String get notifications => localizedValues['notifications'][locale.languageCode]; String get notificationDetails => localizedValues['notificationDetails'][locale.languageCode]; + List get infoMyDoctorPoints => localizedValues['info-my-doctor-points'][locale.languageCode]; + String get infoMyDoctor => localizedValues['info-my-doctor'][locale.languageCode]; + String get infoPrescriptions => localizedValues['info-prescriptions'][locale.languageCode]; + List get infoPrescriptionsPoints => localizedValues['info-my-prescription-points'][locale.languageCode]; + + String get infoInsuranceCards => localizedValues['info-insurance-cards'][locale.languageCode]; + List get infoInsuranceCardsPoints => localizedValues['info-insurance-cards-points'][locale.languageCode]; + + String get infoAllergies => localizedValues['info-allergies'][locale.languageCode]; + + String get sickLeaves => localizedValues['sick-leaves'][locale.languageCode]; + String get infoSickLeaves => localizedValues['info-sick-leaves'][locale.languageCode]; + List get infoSickLeavePoints => localizedValues['info-sick-leave-points'][locale.languageCode]; + + String get infoApprovals => localizedValues['info-approvals'][locale.languageCode]; + List get infoApprovalPoints => localizedValues['info-approval-points'][locale.languageCode]; + + String get monthReport => localizedValues['month-report'][locale.languageCode]; + String get infoMonthReport => localizedValues['info-month-report'][locale.languageCode]; + + + } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/widgets/others/app_scaffold_widget.dart b/lib/widgets/others/app_scaffold_widget.dart index cdfda8f0..86a07958 100644 --- a/lib/widgets/others/app_scaffold_widget.dart +++ b/lib/widgets/others/app_scaffold_widget.dart @@ -39,7 +39,7 @@ class AppScaffold extends StatelessWidget { final String description; final String image; final bool isShowDecPage; - + final List infoList; AuthenticatedUserObject authenticatedUserObject = locator(); @@ -55,7 +55,9 @@ class AppScaffold extends StatelessWidget { this.title, this.description, this.isShowDecPage = true, - this.isBottomBar, this.image}); + this.isBottomBar, + this.image, + this.infoList}); @override Widget build(BuildContext context) { @@ -71,49 +73,58 @@ class AppScaffold extends StatelessWidget { headline6: TextStyle(color: Colors.white, fontWeight: FontWeight.bold), ), - title: Texts(authenticatedUserObject.isLogin || !isShowDecPage - ? appBarTitle.toUpperCase() - : TranslationBase.of(context).serviceInformationTitle,color: Colors.white,bold: true,), - leading:Builder( + title: Texts( + authenticatedUserObject.isLogin || !isShowDecPage + ? appBarTitle.toUpperCase() + : TranslationBase.of(context).serviceInformationTitle, + color: Colors.white, + bold: true, + ), + leading: Builder( builder: (BuildContext context) { return ArrowBack(); }, ), centerTitle: true, actions: [ - image!=null? InkWell( - onTap: ()=> - Navigator.push( - context, - FadePage( - page: InsuranceUpdate(), + image != null + ? InkWell( + onTap: () => Navigator.push( + context, + FadePage( + page: InsuranceUpdate(), + ), + ), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Image.asset( + image, + height: SizeConfig.heightMultiplier * 5, + width: SizeConfig.heightMultiplier * 5, + color: Colors.white, + ), ), + ) + : IconButton( + icon: Icon(FontAwesomeIcons.home), + color: Colors.white, + onPressed: () { + Navigator.pushAndRemoveUntil( + context, + MaterialPageRoute( + builder: (context) => LandingPage()), + (Route r) => false); + }, ), - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Image.asset( - image, - height: SizeConfig.heightMultiplier * 5, - width: SizeConfig.heightMultiplier * 5, - color: Colors.white, - ), - ),): IconButton( - icon: Icon(FontAwesomeIcons.home), - color: Colors.white, - onPressed: () { - Navigator.pushAndRemoveUntil( - context, - MaterialPageRoute(builder: (context) => LandingPage()), - (Route r) => false); - }, - ), ], ) : null, - body: (!Provider.of(context, listen: false).isLogin && isShowDecPage) + body: (!Provider.of(context, listen: false).isLogin && + isShowDecPage) ? NotAutPage( title: appBarTitle, description: description, + infoList: infoList, ) : baseViewModel != null ? NetworkBaseView( @@ -135,6 +146,8 @@ class AppScaffold extends StatelessWidget { buildBodyWidget() { // return body; //Stack(children: [body, buildAppLoaderWidget(isLoading)]); - return Stack(children: [body, /*FloatingSearchButton()*/]); + return Stack(children: [ + body, /*FloatingSearchButton()*/ + ]); } } diff --git a/lib/widgets/others/not_auh_page.dart b/lib/widgets/others/not_auh_page.dart index 8f8ed729..a1a2f00c 100644 --- a/lib/widgets/others/not_auh_page.dart +++ b/lib/widgets/others/not_auh_page.dart @@ -11,8 +11,9 @@ import 'package:provider/provider.dart'; class NotAutPage extends StatelessWidget { final String title; final String description; + final List infoList; - NotAutPage({@required this.title, @required this.description}); + NotAutPage({@required this.title, @required this.description, this.infoList}); @override Widget build(BuildContext context) { @@ -30,6 +31,7 @@ class NotAutPage extends StatelessWidget { bold: true, color: Color(0xff60686b), ), + SizedBox( height: 12, ), @@ -38,6 +40,39 @@ class NotAutPage extends StatelessWidget { fontWeight: FontWeight.normal, fontSize: 17, ), + if (infoList != null) + SizedBox( + height: 12, + ), + if (infoList != null) + ...List.generate( + infoList.length, + (index) => Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Container( + width: 30, + height: 30, + decoration: BoxDecoration( + // shape: BoxShape.circle, + borderRadius: BorderRadius.circular(15), + color: Theme.of(context).primaryColor), + child: Center( + child: Texts('${index+1}',color: Colors.white,), + ), + ), + SizedBox(width: 6,), + Expanded(child: Texts('${infoList[index]}')) + ], + ), + SizedBox(height: 12,), + ], + ), + ), + ), SizedBox( height: 22, ),