From f524cee1321496a5086faf69a6980243a96d9024 Mon Sep 17 00:00:00 2001 From: FaizHashmiCS22 Date: Thu, 21 Sep 2023 18:04:17 +0300 Subject: [PATCH] Structure Update --- lib/core/api.dart | 25 +- lib/core/base/app_scaffold_widget.dart | 86 +- lib/core/base/base_app_client.dart | 36 +- lib/core/base/base_service.dart | 9 - lib/core/base/base_view.dart | 50 - lib/core/base/base_view_model.dart | 40 - lib/core/base/locater.dart | 11 - lib/core/base/network_base_view.dart | 40 - lib/core/base/project_view_model.dart | 51 - lib/core/base/view_state.dart | 1 - lib/core/config/localized_values.dart | 1145 ----------------- lib/core/config/shared_pref_kay.dart | 16 - lib/core/config/size_config.dart | 22 +- .../call_config.dart | 100 +- .../patient_call.dart | 70 +- lib/header/app_header.dart | 2 + lib/home/app_provider.dart | 227 ++++ lib/home/home_screen.dart | 333 +---- lib/home/home_screen_components.dart | 98 -- ...ls.dart => priority_calls_components.dart} | 107 +- lib/home/que_item_list.dart | 27 - lib/main.dart | 41 +- lib/utils/call_by_voice.dart | 12 +- lib/utils/call_type.dart | 6 +- lib/utils/signalR_utils.dart | 49 +- lib/utils/utils.dart | 310 +++-- lib/widget/app_loader_widget.dart | 64 +- lib/widget/data_display/app_texts_widget.dart | 126 +- lib/widget/errors/error_message.dart | 79 +- lib/widget/loader/gif_loader_container.dart | 86 +- .../loader/gif_loader_dialog_utils.dart | 22 +- pubspec.lock | 172 ++- pubspec.yaml | 2 +- 33 files changed, 931 insertions(+), 2534 deletions(-) delete mode 100644 lib/core/base/base_service.dart delete mode 100644 lib/core/base/base_view.dart delete mode 100644 lib/core/base/base_view_model.dart delete mode 100644 lib/core/base/locater.dart delete mode 100644 lib/core/base/network_base_view.dart delete mode 100644 lib/core/base/project_view_model.dart delete mode 100644 lib/core/base/view_state.dart delete mode 100644 lib/core/config/localized_values.dart delete mode 100644 lib/core/config/shared_pref_kay.dart rename lib/core/{response_model => response_models}/call_config.dart (61%) rename lib/core/{response_model => response_models}/patient_call.dart (81%) create mode 100644 lib/home/app_provider.dart delete mode 100644 lib/home/home_screen_components.dart rename lib/home/{priority_calls.dart => priority_calls_components.dart} (53%) delete mode 100644 lib/home/que_item_list.dart diff --git a/lib/core/api.dart b/lib/core/api.dart index cc2cf43..3f5cd7c 100644 --- a/lib/core/api.dart +++ b/lib/core/api.dart @@ -1,25 +1,25 @@ import 'dart:developer'; import 'dart:io'; -import 'package:flutter/cupertino.dart'; import 'package:queuing_system/core/base/base_app_client.dart'; import 'package:queuing_system/core/config/config.dart'; -import 'package:queuing_system/core/response_model/call_config.dart'; -import 'package:queuing_system/core/response_model/patient_call.dart'; -import 'package:queuing_system/home/home_screen.dart'; +import 'package:queuing_system/core/response_models/call_config.dart'; +import 'package:queuing_system/core/response_models/patient_call.dart'; const _getCallRequestInfoByClinicInfo = "/GetCallRequestInfo_ByIP"; const _callUpdateNotIsQueueRecordByIDAsync = "/CallRequest_QueueUpdate"; class MyHttpOverrides extends HttpOverrides { @override - HttpClient createHttpClient(SecurityContext context) { + HttpClient createHttpClient(SecurityContext? context) { return super.createHttpClient(context)..badCertificateCallback = (X509Certificate cert, String host, int port) => true; } } +bool isDevMode = true; + class API { - static getCallRequestInfoByClinicInfo(String deviceIp, {@required Function(List, List, CallConfig callConfig) onSuccess, @required Function(dynamic) onFailure}) async { + static getCallRequestInfoByClinicInfo(String deviceIp, {required Function(List, List, CallConfig callConfig) onSuccess, required Function(dynamic) onFailure}) async { final body = {"ipAdress": deviceIp, "apiKey": apiKey}; if (isDevMode) { @@ -44,7 +44,7 @@ class API { var isQueuePatients = callPatients.where((element) => (element.callType == 1 && element.isQueue == false) || (element.callType == 2 && element.isQueue == false)).toList(); // callPatients.removeWhere((element) => (element.callType == 1 && element.isQueueNurse == false) || (element.callType == 2 && element.isQueueDr == false)); - callPatients.sort((a, b) => a.editedOnTimeStamp.compareTo(b.editedOnTimeStamp)); + callPatients.sort((a, b) => a.editedOnTimeStamp!.compareTo(b.editedOnTimeStamp!)); // callPatients.addAll(isQueuePatients.toList()); @@ -56,11 +56,12 @@ class API { onFailure: (error, status) => onFailure(error)); } - static callUpdateNotIsQueueRecordByIDAsync(String deviceIp, {@required Tickets ticket, @required Function(List) onSuccess, @required Function(dynamic) onFailure}) async { - if (ticket.id == null) { - return; - } - + static callUpdateNotIsQueueRecordByIDAsync( + String deviceIp, { + required Tickets ticket, + required Function(List) onSuccess, + required Function(dynamic) onFailure, + }) async { List _ticketsUpdated = []; // for (var ticket in tickets) { diff --git a/lib/core/base/app_scaffold_widget.dart b/lib/core/base/app_scaffold_widget.dart index b3733a4..e899e2e 100644 --- a/lib/core/base/app_scaffold_widget.dart +++ b/lib/core/base/app_scaffold_widget.dart @@ -1,100 +1,54 @@ import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; -import 'package:queuing_system/core/base/project_view_model.dart'; -import 'package:queuing_system/widget/app_loader_widget.dart'; +import 'package:queuing_system/home/app_provider.dart'; import 'package:queuing_system/widget/data_display/app_texts_widget.dart'; -import 'base_view_model.dart'; -import 'network_base_view.dart'; class AppScaffold extends StatelessWidget { final String appBarTitle; final Widget body; final bool isLoading; final bool isShowAppBar; - final BaseViewModel baseViewModel; - final Widget bottomSheet; - final Color backgroundColor; - final Widget appBar; + final Widget? bottomSheet; + final Color? backgroundColor; + final PreferredSizeWidget appBar; final Widget drawer; final Widget bottomNavigationBar; final String subtitle; final bool isHomeIcon; final bool extendBody; + final AppProvider appProvider; const AppScaffold( - {Key key, this.appBarTitle = '', - this.body, + {Key? key, + this.appBarTitle = '', + required this.body, this.isLoading = false, this.isShowAppBar = true, - this.baseViewModel, this.bottomSheet, this.backgroundColor, this.isHomeIcon = true, - this.appBar, - this.subtitle, - this.drawer, + required this.appBar, + this.subtitle = "", + this.drawer = const SizedBox.shrink(), this.extendBody = false, - this.bottomNavigationBar}) : super(key: key); + required this.appProvider, + required this.bottomNavigationBar}) + : super(key: key); @override Widget build(BuildContext context) { - ProjectViewModel projectProvider = Provider.of(context); - return GestureDetector( onTap: () { FocusScope.of(context).requestFocus(FocusNode()); }, child: Scaffold( - backgroundColor: backgroundColor ?? Theme.of(context).scaffoldBackgroundColor - , + backgroundColor: backgroundColor ?? Theme.of(context).scaffoldBackgroundColor, drawer: drawer, extendBody: extendBody, bottomNavigationBar: bottomNavigationBar, - appBar: isShowAppBar - ? appBar ?? - AppBar( - elevation: 0, - backgroundColor: Colors.white, - title: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text(appBarTitle.toUpperCase()), - if (subtitle != null) - Text( - subtitle, - style: const TextStyle(fontSize: 12, color: Colors.red), - ), - ], - ), - leading: Builder(builder: (BuildContext context) { - return IconButton( - icon: const Icon(Icons.arrow_back_ios), - color: Colors.black, //Colors.black, - onPressed: () => Navigator.pop(context), - ); - }), - centerTitle: true, - actions: const [ - ], toolbarTextStyle: const TextTheme( - titleLarge: TextStyle( - color: Colors.black87, - fontSize: 16.8, - )).bodyMedium, titleTextStyle: const TextTheme( - titleLarge: TextStyle( - color: Colors.black87, - fontSize: 16.8, - )).titleLarge, - ) - : null, + appBar: isShowAppBar ? appBar : null, bottomSheet: bottomSheet, - body: projectProvider.isInternetConnection - ? baseViewModel != null - ? NetworkBaseView( - baseViewModel: baseViewModel, - child: body, - ) - : Stack( - children: [body, buildAppLoaderWidget(isLoading)]) + body: appProvider.isInternetConnectionAvailable + ? body : Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, @@ -111,8 +65,4 @@ class AppScaffold extends StatelessWidget { ), ); } - - Widget buildAppLoaderWidget(bool isLoading) { - return isLoading ? AppLoaderWidget() : Container(); - } } diff --git a/lib/core/base/base_app_client.dart b/lib/core/base/base_app_client.dart index bfeb5f7..a11ad4d 100644 --- a/lib/core/base/base_app_client.dart +++ b/lib/core/base/base_app_client.dart @@ -6,7 +6,7 @@ import 'package:queuing_system/core/config/config.dart'; import 'package:queuing_system/utils/Utils.dart'; class BaseAppClient { - static post(String endPoint, {Map body, Function(dynamic response, int statusCode) onSuccess, Function(String error, int statusCode) onFailure}) async { + static post(String endPoint, {Map? body, Function(dynamic response, int statusCode)? onSuccess, Function(String error, int statusCode)? onFailure}) async { String url; url = BASE_URL + endPoint; @@ -21,21 +21,29 @@ class BaseAppClient { }); final int statusCode = response.statusCode; if (statusCode < 200 || statusCode >= 400) { - onFailure(Utils.generateContactAdminMsg(), statusCode); + if (onFailure != null) { + onFailure(Utils.generateContactAdminMsg(), statusCode); + } } else { log("Response: ${response.body.toString()}"); var parsed = json.decode(response.body.toString()); - onSuccess(parsed, statusCode); + if (onSuccess != null) { + onSuccess(parsed, statusCode); + } } } else { - onFailure('Please Check The Internet Connection', -1); + if (onFailure != null) { + onFailure('Please Check The Internet Connection', -1); + } } } catch (e) { - onFailure(e.toString(), -1); + if (onFailure != null) { + onFailure(e.toString(), -1); + } } } - static get(String endPoint, {Map body, Function(dynamic response, int statusCode) onSuccess, Function(String error, int statusCode) onFailure}) async { + static get(String endPoint, {Map? body, Function(dynamic response, int statusCode)? onSuccess, Function(String error, int statusCode)? onFailure}) async { String url; url = BASE_URL + endPoint; @@ -49,16 +57,24 @@ class BaseAppClient { final response = await http.get(Uri.parse(url), headers: {'Content-Type': 'application/json', 'Accept': 'application/json'}); final int statusCode = response.statusCode; if (statusCode < 200 || statusCode >= 400) { - onFailure(Utils.generateContactAdminMsg(), statusCode); + if (onFailure != null) { + onFailure(Utils.generateContactAdminMsg(), statusCode); + } } else { var parsed = json.decode(response.body.toString()); - onSuccess(parsed, statusCode); + if (onSuccess != null) { + onSuccess(parsed, statusCode); + } } } else { - onFailure('Please Check The Internet Connection', -1); + if (onFailure != null) { + onFailure('Please Check The Internet Connection', -1); + } } } catch (e) { - onFailure(e.toString(), -1); + if (onFailure != null) { + onFailure(e.toString(), -1); + } } } diff --git a/lib/core/base/base_service.dart b/lib/core/base/base_service.dart deleted file mode 100644 index c80d114..0000000 --- a/lib/core/base/base_service.dart +++ /dev/null @@ -1,9 +0,0 @@ -// -// class BaseService { -// String error; -// bool hasError = false; -// -// -// BaseService() { -// } -// } diff --git a/lib/core/base/base_view.dart b/lib/core/base/base_view.dart deleted file mode 100644 index 70e7f4c..0000000 --- a/lib/core/base/base_view.dart +++ /dev/null @@ -1,50 +0,0 @@ -// import 'package:flutter/material.dart'; -// import 'package:provider/provider.dart'; -// -// import 'base_view_model.dart'; -// import 'locater.dart'; -// -// class BaseView extends StatefulWidget { -// final Widget Function(BuildContext context, T model, Widget child) builder; -// final Function(T) onModelReady; -// -// BaseView({ -// this.builder, -// this.onModelReady, -// }); -// -// @override -// _BaseViewState createState() => _BaseViewState(); -// } -// -// class _BaseViewState extends State> { -// T model = locator(); -// -// bool isLogin = false; -// -// @override -// void initState() { -// if (widget.onModelReady != null) { -// widget.onModelReady(model); -// } -// -// super.initState(); -// } -// -// @override -// Widget build(BuildContext context) { -// return ChangeNotifierProvider.value( -// value: model, -// child: Consumer(builder: widget.builder), -// ); -// } -// -// @override -// void dispose() { -// if (model != null) { -// model = null; -// } -// -// super.dispose(); -// } -// } diff --git a/lib/core/base/base_view_model.dart b/lib/core/base/base_view_model.dart deleted file mode 100644 index aef84a0..0000000 --- a/lib/core/base/base_view_model.dart +++ /dev/null @@ -1,40 +0,0 @@ -import 'dart:async'; - -import 'package:connectivity/connectivity.dart'; -import 'package:flutter/material.dart'; -import 'package:queuing_system/core/base/view_state.dart'; - -class BaseViewModel extends ChangeNotifier { - - ViewState _state = ViewState.Idle; - bool isInternetConnection = true; - StreamSubscription subscription; - - ViewState get state => _state; - - String error = ""; - void setState(ViewState viewState) { - _state = viewState; - - notifyListeners(); - } - BaseViewModel(){ - subscription = Connectivity() - .onConnectivityChanged - .listen((ConnectivityResult result) { - switch (result) { - case ConnectivityResult.wifi: - isInternetConnection = true; - break; - case ConnectivityResult.mobile: - isInternetConnection = true; - break; - case ConnectivityResult.none: - isInternetConnection = false; - break; - } - notifyListeners(); - }); - } - -} diff --git a/lib/core/base/locater.dart b/lib/core/base/locater.dart deleted file mode 100644 index 11a4f84..0000000 --- a/lib/core/base/locater.dart +++ /dev/null @@ -1,11 +0,0 @@ -import 'package:get_it/get_it.dart'; - -GetIt locator = GetIt.instance; - -///di -void setupLocator() { - /// Services - - /// View Model - -} \ No newline at end of file diff --git a/lib/core/base/network_base_view.dart b/lib/core/base/network_base_view.dart deleted file mode 100644 index 7b9c73f..0000000 --- a/lib/core/base/network_base_view.dart +++ /dev/null @@ -1,40 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:queuing_system/core/base/view_state.dart'; -import 'package:queuing_system/widget/app_loader_widget.dart'; -import 'package:queuing_system/widget/errors/error_message.dart'; - -import 'base_view_model.dart'; - -class NetworkBaseView extends StatelessWidget { - final BaseViewModel baseViewModel; - final Widget child; - - NetworkBaseView({Key key, this.baseViewModel, this.child}); - - @override - Widget build(BuildContext context) { - return Container( - color: Colors.grey[100], - child: buildBaseViewWidget(), - ); - } - - buildBaseViewWidget() { - switch (baseViewModel.state) { - case ViewState.ErrorLocal: - case ViewState.Idle: - case ViewState.BusyLocal: - return child; - break; - case ViewState.Busy: - return AppLoaderWidget(); - break; - case ViewState.Error: - return ErrorMessage( - error: baseViewModel.error, - ); - break; - } - } -} diff --git a/lib/core/base/project_view_model.dart b/lib/core/base/project_view_model.dart deleted file mode 100644 index dfa7caf..0000000 --- a/lib/core/base/project_view_model.dart +++ /dev/null @@ -1,51 +0,0 @@ -import 'dart:async'; - -import 'package:connectivity/connectivity.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:queuing_system/core/base/base_app_client.dart'; - - -class ProjectViewModel with ChangeNotifier { - Locale _appLocale; - String currentLanguage = 'ar'; - bool _isArabic = false; - bool isInternetConnection = true; - bool isLoading = false; - bool isError = false; - String error = ''; - BaseAppClient baseAppClient = BaseAppClient(); - - Locale get appLocal => _appLocale; - - bool get isArabic => _isArabic; - StreamSubscription subscription; - - ProjectViewModel() { - - subscription = Connectivity() - .onConnectivityChanged - .listen((ConnectivityResult result) { - switch (result) { - case ConnectivityResult.wifi: - isInternetConnection = true; - break; - case ConnectivityResult.mobile: - isInternetConnection = true; - break; - case ConnectivityResult.none: - isInternetConnection = false; - break; - } - notifyListeners(); - }); - } - - - - - @override - void dispose() { - if (subscription != null) subscription.cancel(); - super.dispose(); - } -} diff --git a/lib/core/base/view_state.dart b/lib/core/base/view_state.dart deleted file mode 100644 index c8fa6a1..0000000 --- a/lib/core/base/view_state.dart +++ /dev/null @@ -1 +0,0 @@ -enum ViewState { Idle, Busy, Error, BusyLocal, ErrorLocal } \ No newline at end of file diff --git a/lib/core/config/localized_values.dart b/lib/core/config/localized_values.dart deleted file mode 100644 index 12a25a4..0000000 --- a/lib/core/config/localized_values.dart +++ /dev/null @@ -1,1145 +0,0 @@ -const Map> localizedValues = { - "dashboardScreenToolbarTitle": {"ar": "الرئيسة", "en": "Home"}, - "settings": {"en": "Settings", "ar": "الاعدادات"}, - "areYouSureYouWantTo": { - "en": "Are you sure you want to", - "ar": "هل انت متاكد من انك تريد أن" - }, - "language": {"en": "App Language", "ar": "لغة التطبيق"}, - "lanEnglish": {"en": "English", "ar": "English"}, - "lanArabic": {"en": "العربية", "ar": "العربية"}, - "theDoctor": {"en": "Doctor", "ar": "الطبيب"}, - "reply": {"en": "Reply", "ar": "رد"}, - "time": {"en": "Time", "ar": "الوقت"}, - "fileNo": {"en": "File No : ", "ar": "رقم الملف :"}, - "mobileNo": {"en": "Mobile No", "ar": "رقم الجوال"}, - "messagesScreenToolbarTitle": {"en": "Messages", "ar": "الرسائل"}, - "mySchedule": {"en": "Schedules", "ar": "جدولي"}, - "errorNoSchedule": { - "en": "You don't have any Schedule", - "ar": "ليس لديك أي جدول" - }, - "verify": {"en": "VERIFY", "ar": "تحقق"}, - "pharmacy-intervention": {"en": "Pharmacy Intervention", "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": "ملاحضات وتفاصيل العيادة" - }, - "answerSuggestions": {"en": "Answer/Suggestions", "ar": "الرد / الاقتراحات"}, - "outPatients": {"en": "Out Patient", "ar": "العيادات الخارجية"}, - "myOutPatient": {"en": "My OutPatients", "ar": "مرضى العيادات الخارجية"}, - "myOutPatient_2lines": { - "en": "My\nOutPatients", - "ar": "مريض\nالعيادات الخارجية" - }, - "searchPatient": {"en": "Search Patients", "ar": "البحث عن مريض"}, - "searchPatientDashBoard": {"en": "Search\nPatients", "ar": "البحث\nعن مريض"}, - "searchAbout": {"en": "Search", "ar": "البحث عن"}, - "patient": {"en": "Patient", "ar": " مريض"}, - "patients": {"en": "Patients", "ar": "مرضى"}, - "labResult": {"en": "Lab Result", "ar": "نتيجة المختبر"}, - "lab": {"en": "Lab", "ar": "المختبر"}, - "result": {"en": "Result", "ar": "نتيجة"}, - "todayStatistics": {"en": "Today Statistics", "ar": "إحصائيات اليوم"}, - "arrived": {"en": "Arrival Patients", "ar": " المرضى الحاضرين"}, - "er": {"en": "ER", "ar": "حالة طوارئ"}, - "walkIn": {"en": "Walk-in", "ar": "ادخل"}, - "notArrived": {"en": "Not Arrived", "ar": "لم يحضر"}, - "radiology": {"en": "Radiology", "ar": "الأشعة"}, - "service": {"en": "Service", "ar": "خدمة"}, - "referral": {"en": "Referral", "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 Patients", "ar": "المرضى المنومين"}, - "operations": {"en": "Operations", "ar": "عمليات"}, - "patientServices": {"en": "Patient Services", "ar": "خدمات المرضى"}, - "searchMedicineDashboard": { - "en": "Search\nMedicines", - "ar": "بحث\nعن الدواء" - }, - "searchMedicine": {"en": "Search Medicines", "ar": "بحث عن الدواء"}, - "myReferralPatient": {"en": "My Referral Patient", "ar": "مرضى الاحالة"}, - "referPatient": {"en": "Referral Patient", "ar": "إحالة مريض"}, - "myReferral": {"en": "My Referral", "ar": "إحالة"}, - "myReferredPatient": {"en": "Referred", "ar": "المحالين"}, - "referredPatient": {"en": "Referred Patient", "ar": "المرضى المحالين"}, - "referredOn": {"en": "referred On : ", "ar": " : تمت الإحالة في"}, - "firstName": {"en": "First Name", "ar": "الاسم الاول"}, - "middleName": {"en": "Middle Name", "ar": "اسم الاب"}, - "lastName": {"en": "Last Name", "ar": "اسم العائلة"}, - "phoneNumber": {"en": "Patients Phone Number ", "ar": "رقم الجوال"}, - "patientID": {"en": "Patient ID", "ar": "رقم المريض"}, - "patientFile": {"en": "Patient File", "ar": "ملف المريض"}, - "familyMedicine": {"en": "Family Medicine Clinic", "ar": "عيادة طب الأسرة"}, - "search": {"en": "Search", "ar": "بحث "}, - "onlyArrivedPatient": { - "en": "Only Arrived Patient", - "ar": "المريض الذي حضر للموعد" - }, - "searchMedicineNameHere": {"en": "Search Medicine ", "ar": "ابحث هنا"}, - "youCanFind": {"en": "You can find ", "ar": "تستطيع ان تجد "}, - "medicineSearchResult": {"en": "as a search result for", "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 لاسترداد ملف تعريف المريض" - }, - "scanQr": {"en": "Scan Qr", "ar": "اقراء ال QR"}, - "profile": {"en": "Profile", "ar": "ملفي الشخصي"}, - "gender": {"en": "Gender", "ar": "الجنس"}, - "clinic": {"en": "Clinic", "ar": "العيادة"}, - "hospital": {"en": "Hospital", "ar": "المستشفى"}, - "speciality": {"en": "Speciality", "ar": "التخصص"}, - "errorMessage": {"en": "Something went wrong", "ar": "حدث خطأ ما"}, - "patientProfile": {"en": "Patient Profile", "ar": "ملف المريض"}, - "vitalSign": {"en": "Vital Signs", "ar": "المؤشرات الحيوية"}, - "vital": {"en": "Vital", "ar": "الحيوية"}, - "signs": {"en": "Signs", "ar": "المؤشرات"}, - "labOrder": {"en": "Lab Order", "ar": "نتائج التحاليل"}, - "medicines": {"en": "Medicines", "ar": "الأدوية"}, - "prescription": {"en": "Prescription", "ar": "الوصفات"}, - "insuranceApprovals": {"en": "Insurance Approvals", "ar": "موافقات التأمين"}, - "insurance": {"en": "Insurance", "ar": "التأمين"}, - "approvals": {"en": "Approvals", "ar": "موافقات"}, - "bodyMeasurements": {"en": "Body Measurements", "ar": "قياسات الجسم"}, - "temperature": {"en": "Temperature", "ar": "درجة الحرارة"}, - "pulse": {"en": "Pulse", "ar": "النبض"}, - "respiration": {"en": "Respiration", "ar": "التنفس"}, - "bloodPressure": {"en": "Blood Pressure", "ar": "ضغط الدم"}, - "oxygenation": {"en": "Oxygenation", "ar": "الأوكسجين"}, - "painScale": {"en": "Pain Scale", "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": "ليس لديك اي طلبات للمختبر" - }, - "answerThePatient": {"en": "answer the patient", "ar": "الرد على المريض "}, - "pleaseEnterAnswer": {"en": "please enter answer", "ar": "الرجاء ادخال الرد"}, - "replay": {"en": "Reply", "ar": "تاكيد"}, - "progressNote": {"en": "Progress Note", "ar": "ملاحظات التقدم"}, - "progress": {"en": "Progress", "ar": "التقدم"}, - "note": {"en": "Note", "ar": "ملاحظة"}, - "searchNote": {"en": "Search 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": "الرجاء ادخال الهوية" - }, - "enterPassword": {"en": "Password", "ar": "كلمه السر"}, - "pleaseEnterPassword": { - "en": "Please Enter Password", - "ar": "الرجاء ادخال الرقم السري" - }, - "selectYourProject": {"en": "Branch", "ar": "فرع"}, - "pleaseEnterYourProject": { - "en": "Please Enter Your Project", - "ar": "الرجاء ادخال مستشفى" - }, - "login": {"en": "Login", "ar": "تسجيل دخول"}, - "drSulaimanAlHabib": {"en": "Dr Sulaiman Al Habib", "ar": "د.سليمان الحبيب"}, - "welcomeTo": {"en": "Welcome to", "ar": "مرحبا بك"}, - "welcomeBackTo": {"en": "Welcome Back to", "ar": "مرحبًا بعودتك الى "}, - "home": {"en": "Home", "ar": "الرئيسية"}, - "services": {"en": "Services", "ar": "الخدمات"}, - "sms": {"en": "SMS", "ar": "رسالة قصيرة"}, - "fingerprint": {"en": "Fingerprint", "ar": "بصمة"}, - "faceId": {"en": "Face ID", "ar": "معرف الوجه"}, - "whatsAppBy": {"en": "by WhatsApp", "ar": "عن طريق واتس اب"}, - "whatsApp": {"en": "WhatsApp", "ar": "واتس اب"}, - "pleaseChoose": { - "en": "Please choose one of the Following option to verify", - "ar": "يرجى اختيار أحد الخيارات التالية للتحقق" - }, - "choose": {"en": "Choose", "ar": "اختر"}, - "verification": {"en": "Verification", "ar": "طريقة التحقق"}, - "firstStep": { - "en": "As a first step, you need to verify by one of those methods", - "ar": "كخطوة أولى ، تحتاج إلى التحقق بإحدى هذه الطرق" - }, - "yourAccount!": {"en": "Your Account!", "ar": "حسابك!"}, - "verify1": {"en": "Verify", "ar": "ثبت"}, - "youWillReceiveA": {"en": "You will receive a", "ar": "سوف تتلقى "}, - "loginCode": {"en": "Login Code", "ar": "رمز تسجيل دخول"}, - "smsBy": {"en": "By SMS", "ar": "عن طريق رسالة قصيرة"}, - "pleaseEnterTheCode": { - "en": "Please enter the code", - "ar": "الرجاء ادخال الرمز" - }, - "youDontHaveAnyPatient": { - "en": "No data found for the selected search criteria", - "ar": "لا توجد بيانات لمعايير البحث المختارة" - }, - "age": {"en": "Age", "ar": "العمر"}, - "nationality": {"en": "Nationality", "ar": "الجنسية"}, - "today": {"en": "Today", "ar": "اليوم"}, - "yesterday": {"en": "Yesterday", "ar": "الأمس"}, - "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": "بحث عن موافقات التأمين" - }, - "status": {"en": "STATUS", "ar": "الحالة"}, - "expiryDate": {"en": "EXPIRY DATE", "ar": "تاريخ الانتهاء"}, - "producerName": {"en": "PRODUCER NAME", "ar": "اسم المنتج"}, - "receiptOn": {"en": "RECEIPT ON", "ar": "تاريخ الاستلام"}, - "approvalNo": {"en": "Approval No:", "ar": "رقم الموافقة:"}, - "Doctor": {"en": "Doctor", "ar": "الدكتور"}, - "ext": {"en": "Ext#", "ar": "رقم التحويلة"}, - "veryUrgent": {"en": "Very Urgent", "ar": "عاجل جدا"}, - "urgent": {"en": "Urgent", "ar": "عاجل"}, - "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": "التفاصيل السرسرية والملاحظات" - }, - "remarks": {"en": "Remarks", "ar": "ملاحظات"}, - "pleaseFill": { - "en": "Please fill all fields..!", - "ar": "الرجاء ملأ جميع الحقول..!" - }, - "replay2": {"en": "Reply", "ar": "رد الطبيب"}, - "logout": {"en": "Logout", "ar": "تسجيل خروج"}, - "pharmaciesList": {"en": "Pharmacies List", "ar": "قائمة الصيدليات"}, - "price": {"en": "Price", "ar": "السعر"}, - "youCanFindItIn": {"en": "You can Find it in", "ar": "تستطيع ان تجده هنا "}, - "radiologyReport": {"en": "Radiology Report", "ar": "تقرير الاشعة"}, - "orders": {"en": "Orders", "ar": "الطلبات"}, - "list": {"en": "List", "ar": "قائمة"}, - "searchOrders": {"en": "Search Orders", "ar": " بحث عن الطلبات"}, - "prescriptionDetails": {"en": "Prescription Details", "ar": "تفاصبل الوصفة"}, - "prescriptionInfo": {"en": "Prescription Info", "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": "رائع"}, - "cancel": {"en": "CANCEL", "ar": "الغاء"}, - "ok": {"en": "OK", "ar": "موافق"}, - "done": {"en": "DONE", "ar": "تأكيد"}, - "resumecall": {"en": "Resume call", "ar": "استئناف المكالمة"}, - "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": " اكتب اسم الدواء للبحث" - }, - "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": " أضف تفاصيل المريض للبحث" - }, - "welcome": {"en": "Welcome", "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", - "ar": "يجب أن يكون اسم الدواء أكثر من 3 أحرف" - }, - "gender2": {"en": "Gender: ", "ar": "الجنس: "}, - "age2": {"en": "Age: ", "ar": "العمر: "}, - "replySuccessfully": {"en": "Reply Successfully", "ar": "تم الرد بنجاح"}, - "sick-leaves": {"en": "Patient Sick Leave", "ar": "الاجازات المرضية"}, - "patient-sick": {"en": "Patient Sick", "ar": "مرضية"}, - "leave": {"en": "Leave", "ar": "مغادره"}, - "submit": {"en": "Submit", "ar": "ارسال"}, - "doc-name": {"en": "Doctor Name", "ar": "اسم الطبيب"}, - "clinicname": {"en": "Clinic Name", "ar": "اسم العيادة"}, - "sick-leave-date": {"en": "Sick leave date ", "ar": "تاريخ الاجازة."}, - "sick-leave-days": {"en": "Leave Days: ", "ar": " :أيام الإجازة"}, - "admissionDetail": {"en": "ADMISSION DETAIL: ", "ar": "تفاصيل القبول: "}, - "dateTime": {"en": "DATE / TIME:", "ar": "التاريخ / الوقت:"}, - "date": {"en": "Date", "ar": "التاريخ"}, - "admissionNo": {"en": "ADMISSION #: ", "ar": "قبول #:"}, - "losNo": {"en": "LOS #:", "ar": "LOS #:"}, - "area": {"en": "AREA:", "ar": "المنطقة"}, - "room": {"en": "ROOM:", "ar": "الغرفة"}, - "bed": {"en": "BED:", "ar": "السرير"}, - "next": {"en": "Next", "ar": "التالي"}, - "previous": {"en": "Previous", "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": "يرجى ادخال هذا الحقل" - }, - "no-sickleve-applied": { - "en": "No sick leave available, apply Now", - "ar": "لا توجد إجازة مرضية متاحة ، تقدم بطلب الآن" - }, - "no-sickleve": {"en": "No sick leave available", "ar": "لا توجد إجازة مرضية"}, - "applynow": {"en": "Apply Now", "ar": "التقدم بطلب الآن"}, - "add-sickleave": {"en": "Add Sick Leave", "ar": "أضف إجازة مرضية"}, - "add": {"en": "Add", "ar": "أضف"}, - "approved": {"en": "Approved", "ar": "موافق"}, - "extended": {"en": "Extended", "ar": "تمديد"}, - "pending": {"en": "Pending", "ar": "قيد الانتظار"}, - "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": "قم بتمديد الإجازة المرضية" - }, - "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": "لا يوجد وصفة طبية مدرجة" - }, - "referTo": {"en": "Refer To", "ar": "محال إلى"}, - "referredFrom": {"en": "From : ", "ar": " : من"}, - "branch": {"en": "Branch", "ar": "الفرع"}, - "chooseAppointment": {"en": "Choose Appointment", "ar": "اختر موعد"}, - "appointmentNo": {"en": "Appointment # : ", "ar": "# الموعد:"}, - "refer": {"en": "Refer", "ar": "إحالة"}, - "rejected": {"en": "Rejected", "ar": "مرفوض"}, - "sameBranch": {"en": "Same Branch", "ar": "نفس الفرع"}, - "otherBranch": {"en": "Other Branch", "ar": "فرع آخر"}, - "dr": {"en": "DR.", "ar": "د."}, - "previewHealth": {"en": "Health", "ar": "الصحة"}, - "summaryReport": {"en": "Summary", "ar": "ملخص"}, - "accept": {"en": "ACCEPT", "ar": "قبول"}, - "reject": {"en": "REJECT", "ar": "رفض"}, - "noAppointmentsErrorMsg": { - "en": "There is no appointments for at this date", - "ar": "لا توجد مواعيد في هذا التاريخ" - }, - "referralPatient": {"en": "Referral Patient", "ar": "المريض المحال "}, - "noPrescriptionListed": { - "en": "NO PRESCRIPTION LISTED", - "ar": "لأيوجد وصفة طبية" - }, - "addNow": {"en": "ADD Now", "ar": "اضف الآن"}, - "orderType": {"en": "Order Type", "ar": "نوع الطلب"}, - "strength": {"en": "Strength", "ar": "شديد"}, - "doseTime": {"en": "Dose Time", "ar": "وقت الجرعة"}, - "indication": {"en": "Indication", "ar": "دواعي الاستخدام"}, - "duration": {"en": "Duration", "ar": "الفترة"}, - "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": "لايوجد طلبات اعادة جدولة او مغادرة" - }, - "weight": {"en": "Weight", "ar": "الوزن"}, - "kg": {"en": "kg", "ar": "كغ"}, - "height": {"en": "Height", "ar": "الطول"}, - "cm": {"en": "cm", "ar": "سم"}, - "idealBodyWeight": {"en": "Ideal Body Weight", "ar": "وزن الجسم المثالي"}, - "waistSize": {"en": "Waist Size", "ar": "مقاس الخصر"}, - "inch": {"en": "Inch", "ar": "إنش"}, - "headCircum": {"en": "Head Circum", "ar": "محيط الرأس"}, - "leanBodyWeight": {"en": "Lean Body Weight", "ar": "وزن الجسم هزيل"}, - "bodyMassIndex": {"en": "Body Mass Index", "ar": "مؤشر كتلة الجسم"}, - "yourBodyMassIndex": {"en": "Body Mass Index is", "ar": "مؤشر كتلة الجسم هو"}, - "bmiUnderWeight": {"en": "UnderWeight", "ar": "اقل من الوزن المثالي"}, - "bmiHealthy": {"en": "Healthy", "ar": "صحي"}, - "bmiOverWeight": {"en": "OverWeight", "ar": "اعلى من الوزن المثالي"}, - "bmiObese": {"en": "Obese", "ar": "سمين"}, - "bmiObeseExtreme": {"en": "Extreme Obese", "ar": "سمنة مفرطة"}, - "method": {"en": "Method", "ar": "الطريقة"}, - "pulseBeats": {"en": "Pulse(beats/minute)", "ar": " (دقة/دقيقة)النبض"}, - "rhythm": {"en": "Rhythm", "ar": "الإيقاع"}, - "respBeats": {"en": "RESP (beats/minute)", "ar": " (دقة/دقيقة)التنفس"}, - "patternOfRespiration": {"en": "Pattern Of Respiration", "ar": "نمط التنفس"}, - "bloodPressureDiastoleAndSystole": { - "en": "Blood Pressure (Sys, Dias)", - "ar": "ضغط الدم (الانقباض, الإنبساط)" - }, - "cuffLocation": {"en": "Cuff Location", "ar": "موقع الكف"}, - "cuffSize": {"en": "Cuff Size", "ar": "حجم الكف"}, - "patientPosition": {"en": "Patient Position", "ar": "موقع المريض"}, - "fio2": {"en": "FIO2(%)", "ar": "FIO2(%)"}, - "sao2": {"en": "SAO2(%)", "ar": "SAO2(%)"}, - "painManagement": {"en": "Pain Management", "ar": "إدارة الألم"}, - "holiday": {"en": "Holiday", "ar": "عطلة"}, - "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": "الرجاء إدخال الملاحظات" - }, - "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": "تفاصيل التخصص والطبيب" - }, - "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": "تاريخ التنويم المتوقع" - }, - "admissionDate": {"en": "Admission Date", "ar": "تاريخ التنويم"}, - "isSickLeaveRequired": { - "en": "Is Sick Leave Required", - "ar": "هل الإجازة المرضية مطلوبة" - }, - "patientPregnant": {"en": "Patient Pregnant", "ar": "المريض حامل"}, - "treatmentLine": { - "en": "Main line of treatment", - "ar": "الخط الرئيسي للعلاج" - }, - "ward": {"en": "Ward", "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": "عنصر للتحسين" - }, - "dischargeDate": {"en": "Discharge Date", "ar": "تاريخ الخروج"}, - "dietType": {"en": "Diet Type", "ar": "نوع النظام الغذائي"}, - "dietTypeRemarks": { - "en": "Remarks on diet type", - "ar": "ملاحظات على نوع النظام الغذائي" - }, - "save": {"en": "SAVE", "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": "الشكوى الرئيسية" - }, - "patientFeelsPainInHisBackAndCough": { - "en": "Patient Feels pain in his back and cough", - "ar": "يشعر المريض بألم في ظهره ويسعل" - }, - "additionalTextComplaints": { - "en": "Additional text to add about Complaints", - "ar": "ملاحظات اخرى لإضافتها حول الشكوى" - }, - "otherConditions": {"en": "OTHER CONDITIONS", "ar": "شروط أخرى"}, - "other": {"en": "Other", "ar": "أخرى"}, - "how": {"en": "How", "ar": "كيف"}, - "when": {"en": "When", "ar": "متى"}, - "where": {"en": "Where", "ar": "أين"}, - "specifyPossibleLineManagement": { - "en": "Specify possible line of management", - "ar": "حدد خط الإدارة المحتمل" - }, - "significantSigns": {"en": "SIGNIFICANT SIGNS", "ar": "علامات مهمة"}, - "backAbdomen": {"en": "Back : Abdomen", "ar": "الظهر: البطن"}, - "reasons": {"en": "Reasons", "ar": "الأسباب"}, - "createNew": {"en": "Create", "ar": "انشاء "}, - "episode": {"en": "Episode", "ar": "الحدث"}, - "chiefComplaints": {"en": "Chief Complaints", "ar": "الشكاوى"}, - "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": "الرجاء إضافة الحقل المطلوب بشكل صحيح" - }, - "addHistory": {"en": "Add History", "ar": "اضافه تاريخ مرضي"}, - "searchHistory": {"en": "Search History", "ar": " البحث"}, - "addSelectedHistories": { - "en": "Add Selected Histories", - "ar": " اضافه تاريخ مرضي" - }, - "addAllergies": {"en": "Add Allergies", "ar": "أضف الحساسية"}, - "itemExist": {"en": "This item already exist", "ar": "هذا العنصر موجود"}, - "selectAllergy": {"en": "Select Allergy", "ar": "أختر الحساسية"}, - "selectSeverity": {"en": "Select Severity", "ar": "حدد الخطورة"}, - "leaveCreated": {"en": "Leave has been created", "ar": "تم إنشاء الإجازة"}, - "medications": {"en": "Medications", "ar": "الأدوية"}, - "medication": {"en": "Medication", "ar": "الدواء"}, - "createdByName": {"en": "Created By Name", "ar": "الدواء"}, - "statusDescription": {"en": "Status Description", "ar": "وصف الحالة"}, - "doctorComments": {"en": "Doctor Comments", "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": "تمت الاحالة بنجاح" - }, - "fromTime": {"en": "From Time", "ar": "من وقت"}, - "toTime": {"en": "To Time", "ar": "الى وقت"}, - "diagnoseType": {"en": "Diagnose Type", "ar": "نوع التشخيص"}, - "condition": {"en": "Condition", "ar": "الحالة"}, - "id": {"en": "ID", "ar": "بطاقة هوية"}, - "quantity": {"en": "Quantity", "ar": "الكمية"}, - "durDays": {"en": "Dur.(days)", "ar": "الفترة(أيام)"}, - "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": "المزيد من خيارات التحقق" - }, - "welcome-back": {"en": "Welcome back!", "ar": "مرحبا بك!"}, - "account-info": { - "en": "Would you like to login with current username?", - "ar": "هل ترغب في تسجيل الدخول باسم المستخدم الحالي؟" - }, - "another-acc": {"en": "Use Another Account", "ar": "استخدم حساب آخر"}, - "verify-login-with": { - "en": "Please choose one of the following options to verify", - "ar": "الرجاء اختيار احدى الخيارات التالية لعملية التحقق" - }, - "register-user": {"en": "Register", "ar": "تسجيل"}, - "verify-with-fingerprint": {"en": "Fingerprint", "ar": "بصمة الاصبع"}, - "verify-with-faceid": {"en": "Face ID", "ar": "بصمة الوجه"}, - "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-with": {"en": "VERIFICATION TYPE:", "ar": "نوع التحقق:"}, - "verify-fingerprint": { - "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": "تنتهي صلاحية رمز التحقق خلال" - }, - "addAssessment": {"en": "Add Assessment", "ar": "أضف التقييم"}, - "assessment": {"en": "Assessment", "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": "لا توجد تفاصيل لهذا المريض" - }, - "allergicTO": {"en": "ALLERGIC TO ", "ar": "حساس من"}, - "normal": {"en": "Normal", "ar": "عادي"}, - "abnormal": {"en": "Abnormal", "ar": " غير عادي"}, - "notExamined": {"en": "Not Examined", "ar": "لم يتم الفحص"}, - "systolic-lng": {"en": "Systolic", "ar": "الإنقباض"}, - "diastolic-lng": {"en": "Diastolic", "ar": "الإنبساط"}, - "mass": {"en": "Mass", "ar": "كتلة"}, - "temp-c": {"en": "°C", "ar": "°س"}, - "bpm": {"en": "bpm", "ar": "نبضة"}, - "respiration-signs": {"en": "Respiration", "ar": "تنفس"}, - "sys-dias": {"en": "SBP/DBP", "ar": "إنقباض/إنبساط"}, - "body": {"en": "Body \n Mass", "ar": "كتلة\nالجسم"}, - "respirationRate": {"en": "Respiration Rate", "ar": "معدل التنفس"}, - "heart": {"en": "Heart rate", "ar": "معدل ضربات القلب"}, - "medicalReport": {"en": "medical Report", "ar": "تقرير طبي"}, - "visitDate": {"en": "Visit Date", "ar": "تاريخ الزيارة"}, - "test": {"en": "Procedures/Test", "ar": "اجراءات/تحاليل"}, - "regular": {"en": "Regular", "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": "اضافة الاجراءات المختارة " - }, - "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": "أضف تفاصيل التقييم" - }, - "progressNoteSOAP": {"en": "Progress Note", "ar": "ملاحظة التقدم"}, - "addProgressNote": {"en": "Add Progress Note", "ar": "أضف ملاحظة التقدم"}, - "createdBy": {"en": "Created By :", "ar": "أضيفت عن طريق: "}, - "riskScore": {"en": "Risk Score :", "ar": "درجة المخاطر"}, - "editedBy": {"en": "Edited By :", "ar": "عدلت من : "}, - "currentMedications": {"en": "Current Medications", "ar": "الأدوية الحالية"}, - "noItem": { - "en": "sorry, there is 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": "يمكنك تقديم عطلة أو إجازة فقط" - }, - "active": {"en": "Active", "ar": "نشيط"}, - "hold": {"en": "Hold", "ar": "معلق"}, - "loading": {"en": "Loading...", "ar": "جار التحميل..."}, - "assessmentErrorMsg": { - "en": "You have to add at least one assessment.", - "ar": "يجب عليك إضافة تقييم واحد على الأقل." - }, - "examinationErrorMsg": { - "en": "You have to add at least one examination.", - "ar": "يجب عليك إضافة فحص واحد على الأقل." - }, - "progressNoteErrorMsg": { - "en": "You have to add progress Note.", - "ar": "يجب عليك إضافة ملاحظة التقدم." - }, - "chiefComplaintErrorMsg": { - "en": "You have to add chief complaint fields correctly .", - "ar": "يجب عليك إضافة الشكوى الرئيسية بشكل صحيح" - }, - "referralStatus": {"en": "Referral Status : ", "ar": "حالة الإحالة :"}, - "referralRemark": {"en": "Referral Remark : ", "ar": "ملاحظة الإحالة :"}, - "ICDName": {"en": "ICDName", "ar": "اسم ال ICD"}, - "offTime": {"en": "OffTime", "ar": "خارج الوقت"}, - "patient-name": {"en": "Patient Name", "ar": "اسم المريص"}, - "icd": {"en": "ICD", "ar": "التصنيف الدولي للأمراض"}, - "days": {"en": "Days", "ar": "أيام"}, - "months": {"en": "Months", "ar": "أشهر"}, - "years": {"en": "Years", "ar": "سنة"}, - "hr": {"en": "Hr", "ar": "س"}, - "min": {"en": "Min", "ar": "د"}, - "appointmentNumber": {"en": "Appointment Number", "ar": "رقم الموعد"}, - "referralStatusHold": {"en": "Hold", "ar": "معلق"}, - "referralStatusActive": {"en": "Active", "ar": "نشط"}, - "referralStatusCancelled": {"en": "Cancelled", "ar": "ملغي"}, - "referralStatusCompleted": {"en": "Completed", "ar": "مكتمل"}, - "referralStatusNotSeen": {"en": "NotSeen", "ar": "لم يحضر"}, - "clinicSearch": {"en": "Search Clinic", "ar": "بحث عن عيادة"}, - "doctorSearch": {"en": "Search Doctor", "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": "ملاحظات الإجازة المرضية" - }, - "pastMedicalHistory": {"en": "Past medical 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": "ملاحظات الأقسام الأخرى" - }, - "otherProcedure": {"en": "Other procedure", "ar": "إجراء آخر"}, - "admissionRequestSuccessMsg": { - "en": "Admission Request Created Successfully", - "ar": "تم إنشاء طلب التنويم بنجاح" - }, - "orderNo": {"en": "Order No : ", "ar": "رقم الطلب"}, - "infoStatus": {"en": "Info Status", "ar": "حالة المعلومات"}, - "doctorResponse": {"en": "Doctor Response", "ar": "استجابة الطبيب"}, - "sickleaveonhold": { - "en": "A Sick leave is on Hold status for this patient", - "ar": "الإجازة المرضية في حالة الانتظار لهذا المريض" - }, - "no-clinic": {"en": "No Clinic", "ar": "لايوجد عيادة"}, - "otherStatistic": {"en": "Other Statistics", "ar": "إحصائيات أخرى"}, - "ptientsreferral": {"en": "Patients Referrals", "ar": "إحالات المريض"}, - "myPatientsReferral": {"en": "Patient's\nReferrals", "ar": "إحالات\nالمريض"}, - "arrivalpatient": {"en": "Arrival Patients", "ar": "المرضى الواصلون"}, - "searchmedicinepatient": { - "en": "Search patient or Medicines", - "ar": "ابحث عن المريض أو الأدوية" - }, - "appointmentDate": {"en": "Appointment Date", "ar": "تاريخ الموعد"}, - "arrived_p": {"en": "Arrived", "ar": "وصل"}, - "details": {"en": "Details", "ar": "التفاصيل"}, - "liveCare": {"en": "LiveCare", "ar": "لايف كير"}, - "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": "تم إرسال نسخة إلى البريد الإلكتروني" - }, - "SpecialResult": {"en": "Special Result", "ar": "نتيجة خاصة"}, - "noDataAvailable": { - "en": "Sorry, no data is 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": "اسم البحث ، الملف الطبي ، رقم الهاتف" - }, - "reschedule": {"en": "Reschedule", "ar": "إعادة جدولة"}, - "leaves": {"en": "Leaves", "ar": "يغادر"}, - "totalApproval": { - "en": "Total approval unused", - "ar": "اجمالي الموافقات الغير مستخدمة" - }, - "procedureStatus": {"en": "Procedure Status: ", "ar": "حالة الاجراء"}, - "unusedCount": {"en": "Unused Count: ", "ar": "غير مستخدم: "}, - "companyName": {"en": "Company Name ", "ar": "اسم الشركة: "}, - "procedureName": {"en": "Procedure Name", "ar": "اسم الاجراء"}, - "usageStatus": {"en": "Usage Status", "ar": "حالة الاستخدام"}, - "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": "تقدم بطلب للحصول على إجازة أو إعادة جدولة" - }, - "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": "تمديد طلب الإجازة المرضية" - }, - "accepted": {"en": "Accepted", "ar": "موافق"}, - "cancelled": {"en": "Cancelled", "ar": "ألغي"}, - "unReplied": {"en": "UnReplied", "ar": "لم يتم الرد"}, - "searchHere": {"en": "Search here", "ar": "إبحث هنا"}, - "replied": {"en": "Replied", "ar": " تم الرد"}, - "typeHereToReply": {"en": "Type here to reply", "ar": "اكتب هنا للرد"}, - "remove": {"en": "Remove", "ar": "حذف"}, - "changeOfSchedule": {"en": "Change of Schedule", "ar": "تغيير الجدول"}, - "newSchedule": {"en": "New Schedule", "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": "التقدم بطلب أو إعادة جدولة الإجازة" - }, - "myQRCode": {"en": "My QR Code", "ar": " كود QR "}, - "patientIDMobilenational": { - "en": "Patient ID, National ID, Mobile Number", - "ar": "هوية المريض ، الهوية الوطنية ، رقم الهاتف المحمول" - }, - "updateNow": {"en": "Update Now", "ar": "تحديث الان"}, - "updateTheApp": {"en": "Update The App", "ar": "تحديث التطبيق"}, - "admission-date": {"en": "Admission Date", "ar": "تاريخ التنويم"}, - "noOfDays": {"en": "No of days", "ar": "عدد الأيام"}, - "numOfDays": {"en": "Number of Days", "ar": "عدد الأيام"}, - "replayBefore": {"en": "Replay Before", "ar": "رد قبل"}, - "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": "لم يتم التقاط ذلك. حاول التحدث مرة أخرى" - }, - "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": "لم يتم العثور على موافقة التأمين" - }, - "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": "الرجاء أملأ جميع الحقول" - }, - "narcoticMedicineCanOnlyBePrescribedFromVida": { - "en": "Narcotic medicine can only be prescribed from VIDA", - "ar": "لا يمكن وصف الأدوية المخدرة إلا من VIDA " - }, - "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": "تقدم بطلب جديد للمختبر الأشعة" - }, - "addLabOrder": {"en": "Add Lab Order", "ar": "إضافة طلب مختبر"}, - "addRadiologyOrder": {"en": "Add Radiology Order", "ar": "إضافة اشعة"}, - "newRadiologyOrder": {"en": "New Radiology Order", "ar": "طلب أشعة جديد"}, - "orderDate": {"en": "Order Date", "ar": "تاريخ الطلب"}, - "examType": {"en": "Exam Type", "ar": "نوع الفحص"}, - "health": {"en": "Health", "ar": "صحي"}, - "summary": {"en": "Summary", "ar": "التقرير"}, - "applyForNewPrescriptionsOrder": { - "en": "Apply for New Prescriptions Order", - "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": "أضف ملاحظة جديدة" - }, - "notePending": {"en": "Pending", "ar": "قيد الانتظار"}, - "noteCanceled": {"en": "Canceled", "ar": "ألغي"}, - "noteVerified": {"en": "Verified", "ar": "تم التحقق"}, - "noteVerify": {"en": "Verify", "ar": "تحقق"}, - "noteConfirm": {"en": "Confirm", "ar": "تاكيد"}, - "noteAdd": {"en": "Add ", "ar": "اضف "}, - "noteUpdate": {"en": "Update ", "ar": "تحديث"}, - "orderSheet": {"en": "Order Sheet", "ar": "ورقة الطلب"}, - "order": {"en": "Order", "ar": "الطلب"}, - "sheet": {"en": "Sheet", "ar": "ورقة"}, - "medical": {"en": "Medical", "ar": "الطبي"}, - "report": {"en": "Report", "ar": "التقرير"}, - "discharge": {"en": "Discharge", "ar": "مغادرة"}, - "discharged": {"en": "Discharged", "ar": "المغادرين"}, - "none": {"en": "None", "ar": "لا شيء"}, - "notRepliedYet": {"en": "Not Replied yet", "ar": "لم يتم الرد بعد"}, - "clearText": {"en": "Clear Text", "ar": "نص واضح"}, - "medicalReportAdd": {"en": "Add Medical Report", "ar": "إضافة تقرير طبي"}, - "medicalReportVerify": { - "en": "Verify Medical Report", - "ar": "تحقق من التقرير الطبي" - }, - "comments": {"en": "Comments", "ar": "ملاحظات"}, - "initiateCall": {"en": "Initiate Call ", "ar": "بدء الاتصال"}, - "transferTo": {"en": "Transfer To ", "ar": "حول إلى"}, - "admin": {"en": "Admin", "ar": "مشرف"}, - "instructions": {"en": "Instructions", "ar": "تعليمات"}, - "sendLC": {"en": "Send", "ar": "تعليمات"}, - "endLC": {"en": "End", "ar": "انهاء"}, - "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": "الانطباع والتوصية" - }, - "onHold": {"en": "On Hold", "ar": "قيد الانتظار"}, - "verified": {"en": "Verified", "ar": "تم التحقق"}, - "endCall": {"en": "End Call", "ar": "انهاء"}, - "favoriteTemplates": {"en": "Favorite Templates", "ar": "القوالب المفضلة"}, - "allProcedures": {"en": "All Procedures", "ar": "جميع الإجراءات"}, - "allRadiology": {"en": "All Radiology", "ar": "جميع الأشعة"}, - "allLab": {"en": "All Lab", "ar": "جميع المختبرات"}, - "allPrescription": {"en": "All Prescription", "ar": "جميع الوصفات"}, - "addPrescription": {"en": "Add prescription", "ar": "إضافة الوصفات"}, - "edit": {"en": "Edit", "ar": "تعديل"}, - "summeryReply": {"en": "Summary Reply", "ar": "ملخص الرد"}, - "finish": {"en": "Finish", "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": "تم نسخ النص بنجاح" - }, - "roomNo": {"en": "Room No", "ar": "رقم الغرفة"}, - "replayCallStatus": {"en": "Called", "ar": "تم الاتصال"}, - "patientArrived": {"en": "Patient Arrived", "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": "نوع الطلب"}, - "special": {"en": "Special", "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": "مرض السكري"}, - "pharmacy": {"en": "Pharmacy", "ar": "الصيدلاني"}, - "intervention": {"en": "Intervention", "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": "المزيد من التفاصيل"}, - "VTE_Type": {"en": "VTE Type", "ar": "VTE Type"}, - "pharmacology": {"en": "Pharmacology", "ar": "علم العقاقير"}, - "reasonsThrombo": {"en": "Reasons Thrombo", "ar": "أسباب ثرومبو"}, - "youDoNotHaveFavoritePrescription": {"en": "You Don't Have Favorite Prescription", "ar": "ليس لديك وصفة طبية مفضلة"}, - "pleaseSelectItem": {"en": "please Select Item", "ar": "الرجاء اختيار عنصر"}, - "searchFavoriteTemplate": {"en": "search Favorites Template", "ar": "البحث في قالب المفضلة"}, - "sorryNoMatch": {"en": "Sorry No Match", "ar": "عذرا لا يوجد تطابق"}, - "thousandIsTheMAXForTheStrength": {"en": "1000 Is The MAX For The Strength", "ar": "ألف هو القيمة الأعلى"}, - "strengthCanNotBeZero": {"en": "Strength Can't Be Zero", "ar": "القوة لا يمكن أن تكون صفر "}, - "old": {"en": "Old", "ar":"القديمه"}, - "orderTypeDescription": {"en": "Order Type Description", "ar":"وصف نوع الطلب"}, - "doseDetails": {"en": "Dose Details", "ar":"تفاصيل الجرعة"}, - "selectCondition": {"en": "Select Condition", "ar":"قم بتحديد الشرط"}, - "yourOrderAddedSuccessfully": {"en": "Your Order Added Successfully", "ar":"تم إضافة طلبك بنجاح"}, - "youCannotAddOnlySpaces": {"en": "You Can't Add Only Spaces", "ar":""}, - "conditionDescription": {"en": "Condition Description", "ar":"لا يمكنك إضافة مسافات فقط"}, -}; diff --git a/lib/core/config/shared_pref_kay.dart b/lib/core/config/shared_pref_kay.dart deleted file mode 100644 index 628f5a0..0000000 --- a/lib/core/config/shared_pref_kay.dart +++ /dev/null @@ -1,16 +0,0 @@ -const TOKEN = 'token'; -const PROJECT_ID = 'projectID'; -const VIDA_AUTH_TOKEN_ID = 'VidaAuthTokenID'; -const VIDA_REFRESH_TOKEN_ID = 'VidaRefreshTokenID'; -const LOGIN_TOKEN_ID = 'LogInToken'; -const DOCTOR_ID = 'doctorID'; -const SLECTED_PATIENT_TYPE = 'slectedPatientType'; -const APP_Language = 'language'; -const DOCTOR_PROFILE = 'doctorProfile'; -const LIVE_CARE_PATIENT = 'livecare-patient-profile'; -const LOGGED_IN_USER = 'loggedUser'; -const EMPLOYEE_ID = 'EmployeeID'; -const DASHBOARD_DATA = 'dashboard-data'; -const OTP_TYPE = 'otp-type'; -const LAST_LOGIN_USER = 'last-login-user'; -const CLINIC_NAME = 'clinic-name'; diff --git a/lib/core/config/size_config.dart b/lib/core/config/size_config.dart index f2fcf56..01a3e95 100644 --- a/lib/core/config/size_config.dart +++ b/lib/core/config/size_config.dart @@ -5,15 +5,15 @@ class SizeConfig { static double _blockWidth = 0; static double _blockHeight = 0; - static double realScreenWidth; - static double realScreenHeight; - static double screenWidth; - static double screenHeight; - static double textMultiplier; - static double imageSizeMultiplier; - static double heightMultiplier; + static double realScreenWidth = 0.0; + static double realScreenHeight = 0.0; + static double screenWidth = 0.0; + static double screenHeight = 0.0; + static double? textMultiplier; + static double? imageSizeMultiplier; + static double? heightMultiplier; static bool isPortrait = true; - static double widthMultiplier; + static double? widthMultiplier; static bool isMobilePortrait = false; static bool isMobile = false; static bool isHeightShort = false; @@ -77,7 +77,7 @@ class SizeConfig { // print('isMobilePortrait $isMobilePortrait'); } - static getTextMultiplierBasedOnWidth({double width}) { + static getTextMultiplierBasedOnWidth({required double width}) { // TODO handel LandScape case if (width != null) { return width / 100; @@ -85,7 +85,7 @@ class SizeConfig { return widthMultiplier; } - static getWidthMultiplier({double width}) { + static getWidthMultiplier({double? width}) { // TODO handel LandScape case if (width != null) { return width / 100; @@ -93,7 +93,7 @@ class SizeConfig { return widthMultiplier; } - static getHeightMultiplier({double height}) { + static getHeightMultiplier({double? height}) { // TODO handel LandScape case if (height != null) { return height / 100; diff --git a/lib/core/response_model/call_config.dart b/lib/core/response_models/call_config.dart similarity index 61% rename from lib/core/response_model/call_config.dart rename to lib/core/response_models/call_config.dart index 81aae85..5fdde42 100644 --- a/lib/core/response_model/call_config.dart +++ b/lib/core/response_models/call_config.dart @@ -1,56 +1,56 @@ class CallConfig { - int id; - bool globalClinicPrefixReq; - bool clinicPrefixReq; - int concurrentCallDelaySec; - int voiceType; - int screenLanguage; - int voiceLanguage; - int screenMaxDisplayPatients; - int prioritySMS; - int priorityWhatsApp; - int priorityEmail; - String vitalSignText; - String vitalSignTextN; - String doctorText; - String doctorTextN; - String procedureText; - String procedureTextN; - String vaccinationText; - String vaccinationTextN; - String nebulizationText; - String nebulizationTextN; - int createdBy; - String createdOn; - int editedBy; - String editedOn; + late int id; + late bool globalClinicPrefixReq; + late bool clinicPrefixReq; + late int concurrentCallDelaySec; + late int voiceType; + late int screenLanguage; + late int voiceLanguage; + late int screenMaxDisplayPatients; + late int prioritySMS; + late int priorityWhatsApp; + late int priorityEmail; + late String vitalSignText; + late String vitalSignTextN; + late String doctorText; + late String doctorTextN; + late String procedureText; + late String procedureTextN; + late String vaccinationText; + late String vaccinationTextN; + late String nebulizationText; + late String nebulizationTextN; + late int createdBy; + late String createdOn; + late int editedBy; + late String editedOn; CallConfig( - {this.id, - this.globalClinicPrefixReq, - this.clinicPrefixReq, - this.concurrentCallDelaySec, - this.voiceType, - this.screenLanguage, - this.voiceLanguage, - this.screenMaxDisplayPatients, - this.prioritySMS, - this.priorityWhatsApp, - this.priorityEmail, - this.vitalSignText, - this.vitalSignTextN, - this.doctorText, - this.doctorTextN, - this.procedureText, - this.procedureTextN, - this.vaccinationText, - this.vaccinationTextN, - this.nebulizationText, - this.nebulizationTextN, - this.createdBy, - this.createdOn, - this.editedBy, - this.editedOn}); + {this.id = 0, + this.globalClinicPrefixReq = false, + this.clinicPrefixReq = false, + this.concurrentCallDelaySec = 8, + this.voiceType = 0, + this.screenLanguage = 1, + this.voiceLanguage = 1, + this.screenMaxDisplayPatients = 5, + this.prioritySMS = 1, + this.priorityWhatsApp = 1, + this.priorityEmail = 1, + this.vitalSignText = "", + this.vitalSignTextN = "", + this.doctorText = "", + this.doctorTextN = "", + this.procedureText = "", + this.procedureTextN = "", + this.vaccinationText = "", + this.vaccinationTextN = "", + this.nebulizationText = "", + this.nebulizationTextN = "", + this.createdBy = 0, + this.createdOn = "", + this.editedBy = 0, + this.editedOn = ""}); CallConfig.fromJson(Map json) { id = json['id']; diff --git a/lib/core/response_model/patient_call.dart b/lib/core/response_models/patient_call.dart similarity index 81% rename from lib/core/response_model/patient_call.dart rename to lib/core/response_models/patient_call.dart index 72afad8..74dbbf3 100644 --- a/lib/core/response_model/patient_call.dart +++ b/lib/core/response_models/patient_call.dart @@ -3,43 +3,43 @@ import 'dart:math'; import 'package:queuing_system/utils/call_type.dart'; class Tickets { - int id; - int patientID; - String mobileNo; - String doctorName; - String doctorNameN; - int patientGender; - int callType; - int editedOnTimeStamp; - int concurrentCallDelaySec; - String roomNo; - String createdOn; - String editedOn; - String queueNo; - String callNoStr; - bool isQueue; - bool isToneReq; - bool isVoiceReq; - bool callUpdated = false; + late int id; + late int patientID; + late String mobileNo; + late String doctorName; + late String doctorNameN; + late int patientGender; + late int callType; + late int editedOnTimeStamp; + late int concurrentCallDelaySec; + late String roomNo; + late String createdOn; + late String editedOn; + late String queueNo; + late String callNoStr; + late bool isQueue; + late bool isToneReq; + late bool isVoiceReq; + late bool callUpdated = false; Tickets( - {this.id, - this.patientID, - this.mobileNo, - this.doctorName, - this.doctorNameN, - this.patientGender, - this.callType, - this.editedOnTimeStamp, - this.roomNo, - this.createdOn, - this.editedOn, - this.queueNo, - this.callNoStr, - this.isQueue, - this.isToneReq, - this.isVoiceReq, - this.concurrentCallDelaySec}); + {this.id = 0, + this.patientID = 0, + this.mobileNo = "", + this.doctorName = "", + this.doctorNameN = "", + this.patientGender = 1, + this.callType = 1, + this.editedOnTimeStamp = 0, + this.roomNo = "", + this.createdOn = "", + this.editedOn = "", + this.queueNo = "", + this.callNoStr = "", + this.isQueue = false, + this.isToneReq = false, + this.isVoiceReq = false, + this.concurrentCallDelaySec = 1}); int getRandomNum() { return Random().nextInt(9); diff --git a/lib/header/app_header.dart b/lib/header/app_header.dart index b2ce464..9454d8d 100644 --- a/lib/header/app_header.dart +++ b/lib/header/app_header.dart @@ -5,6 +5,8 @@ import 'package:queuing_system/utils/utils.dart'; import 'package:queuing_system/widget/data_display/app_texts_widget.dart'; class AppHeader extends StatelessWidget with PreferredSizeWidget { + const AppHeader({Key? key}) : super(key: key); + @override Widget build(BuildContext context) { return Container( diff --git a/lib/home/app_provider.dart b/lib/home/app_provider.dart new file mode 100644 index 0000000..55d1840 --- /dev/null +++ b/lib/home/app_provider.dart @@ -0,0 +1,227 @@ +import 'dart:async'; +import 'dart:developer'; +import 'dart:io'; + +import 'package:connectivity/connectivity.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:just_audio/just_audio.dart'; +import 'package:queuing_system/core/api.dart'; +import 'package:queuing_system/core/response_models/call_config.dart'; +import 'package:queuing_system/core/response_models/patient_call.dart'; +import 'package:queuing_system/utils/call_by_voice.dart'; +import 'package:queuing_system/utils/call_type.dart'; +import 'package:queuing_system/utils/signalR_utils.dart'; + +class AppProvider extends ChangeNotifier { + AppProvider() { + startSignalHubConnection(); + listenNetworkConnectivity(); + } + + SignalRHelper signalRHelper = SignalRHelper(); + + final AudioPlayer audioPlayer = AudioPlayer(); + + CallConfig patientCallConfigurations = CallConfig(); + List patientTickets = []; + List isQueuePatients = []; + + String currentDeviceIp = ""; + bool isCallingInProgress = false; + bool isInternetConnectionAvailable = true; + + updateInternetConnection(bool value) { + isInternetConnectionAvailable = value; + notifyListeners(); + } + + Future getCurrentIP() async { + final ips = await NetworkInterface.list(type: InternetAddressType.IPv4); + for (var interface in ips) { + if (interface.name == "eth0") { + for (var address in interface.addresses) { + currentDeviceIp = address.address; + notifyListeners(); + } + } + if (interface.name == "wlan0") { + for (var address in interface.addresses) { + currentDeviceIp = address.address; + notifyListeners(); + } + } + } + } + + Future startSignalHubConnection() async { + if (!signalRHelper.getConnectionState()) { + signalRHelper.startSignalRConnection(currentDeviceIp, onUpdateAvailable: onPingReceived, onConnect: onConnect, onConnecting: onConnecting, onDisconnect: onDisconnect); + } + } + + Future callPatientsAPI() async { + patientTickets.clear(); + API.getCallRequestInfoByClinicInfo(currentDeviceIp, onSuccess: (waitingCalls, isQueuePatientsCalls, callConfigs) { + patientCallConfigurations = callConfigs; + if (waitingCalls.length > patientCallConfigurations.screenMaxDisplayPatients) { + patientTickets = waitingCalls.sublist(0, patientCallConfigurations.screenMaxDisplayPatients); + } else { + patientTickets = waitingCalls; + } + isQueuePatients = isQueuePatientsCalls; + notifyListeners(); + }, onFailure: (error) { + log("Api call failed with this error: ${error.toString()}"); + }); + } + + onPingReceived(data) async { + if (patientTickets.isNotEmpty) { + if ((patientTickets.first.isToneReq && isCallingInProgress) || (patientTickets.first.isVoiceReq && voiceCaller != null)) { + Timer(Duration(seconds: patientCallConfigurations.concurrentCallDelaySec), () async { + await callPatientsAPI(); + }); + } else { + await callPatientsAPI(); + } + } else { + await callPatientsAPI(); + } + } + + String getCallTypeText(Tickets ticket, CallConfig callConfig) { + final callType = ticket.getCallType(); + switch (callType) { + case CallType.vitalSign: + return callConfig.vitalSignText; + case CallType.doctor: + return callConfig.doctorText; + case CallType.procedure: + return callConfig.procedureText; + case CallType.vaccination: + return callConfig.vaccinationText; + case CallType.nebulization: + return callConfig.nebulizationText; + default: + return callConfig.vitalSignText; + } + } + + CallByVoice? voiceCaller; + + callPatientTicket(AudioPlayer audioPlayer) async { + isCallingInProgress = true; + if (patientTickets.isNotEmpty) { + if (patientTickets.first.isToneReq && !patientTickets.first.isQueue) { + audioPlayer.setAsset("assets/tones/call_tone.mp3"); + await audioPlayer.play(); + await Future.delayed(const Duration(seconds: 2)); + isCallingInProgress = false; + } + if (patientTickets.first.isVoiceReq && voiceCaller == null && !patientTickets.first.isQueue) { + final postVoice = getCallTypeText(patientTickets.first, patientCallConfigurations); + voiceCaller = CallByVoice(preVoice: "Ticket Number", ticketNo: patientTickets.first.queueNo.trim().toString(), postVoice: postVoice, lang: 'en'); + await voiceCaller!.startCalling(patientTickets.first.queueNo.trim().toString() != patientTickets.first.callNoStr.trim().toString()); + voiceCaller = null; + isCallingInProgress = false; + } + } + if (isQueuePatients.isNotEmpty) { + await Future.delayed(Duration(seconds: isQueuePatients.first.concurrentCallDelaySec)).whenComplete(() async { + if (isQueuePatients.isNotEmpty) { + isQueuePatients.removeAt(0); + } + if (patientTickets.isNotEmpty) { + // Tickets ticket = patientTickets.elementAt(0); + // patientTickets.removeAt(0); + // patientTickets.add(ticket); + } + if (isQueuePatients.isNotEmpty) { + // setState(() {}); + } + }); + } else { + // if (isQueuePatients.isEmpty && callFlag == 1) { + // callFlag == 0; + // await Future.delayed(const Duration(seconds: 3)); + // patientTickets.clear(); + // API.getCallRequestInfoByClinicInfo(DEVICE_IP, onSuccess: (waitingCalls, isQueuePatientsCalls) { + // setState(() { + // patientTickets = waitingCalls; + // isQueuePatients = isQueuePatientsCalls; + // // currents = currentInClinic; + // }); + // + // log("--------------------"); + // log("waiting: $patientTickets"); + // log("isQueuePatients: $isQueuePatients"); + // log("--------------------"); + // + // updateTickets(); + // }, onFailure: (error) {}); + // } + } + } + + Future listenAudioPlayerEvents() async { + audioPlayer.playerStateStream.listen((playerState) { + if (playerState.processingState == ProcessingState.completed) { + isCallingInProgress = false; + } + }); + } + + updatePatientTickets() { + if (patientTickets.isNotEmpty) { + List _ticketsToUpdate = patientTickets.where((t) => t.callUpdated == false).toList(); + API.callUpdateNotIsQueueRecordByIDAsync(currentDeviceIp, ticket: _ticketsToUpdate.first, onSuccess: (ticketsUpdated) { + log("[${ticketsUpdated.length}] Tickets Updated: $ticketsUpdated"); + }, onFailure: (e) { + log(" Tickets Update Failed with : ${e.toString()}"); + }); + } + } + + updatePatientTicketByIndex(int index) { + if (patientTickets.isNotEmpty) { + API.callUpdateNotIsQueueRecordByIDAsync(currentDeviceIp, ticket: patientTickets.elementAt(index), onSuccess: (ticketsUpdated) { + log("[${patientTickets.elementAt(index).callNoStr}] Ticket Updated: $ticketsUpdated"); + }, onFailure: (e) { + log(" Tickets Update ${patientTickets.elementAt(index).callNoStr} Failed with Error : ${e.toString()}"); + }); + } + } + + onConnect() { + log("SignalR: onConnect"); + } + + onDisconnect(exception) { + log("SignalR: onDisconnect"); + signalRHelper.startSignalRConnection(currentDeviceIp, onUpdateAvailable: onPingReceived, onConnect: onConnect, onConnecting: onConnecting, onDisconnect: onDisconnect); + } + + onConnecting() { + log("SignalR: onConnecting"); + } + + listenNetworkConnectivity() async { + Connectivity().onConnectivityChanged.listen((event) async { + switch (event) { + case ConnectivityResult.wifi: + updateInternetConnection(true); + await getCurrentIP(); + if (signalRHelper.connection == null || signalRHelper.connection!.state != ConnectionState.active) { + signalRHelper.connection!.start(); + } + break; + case ConnectivityResult.none: + updateInternetConnection(false); + signalRHelper.closeConnection(); + break; + case ConnectivityResult.mobile: + break; + } + }); + } +} diff --git a/lib/home/home_screen.dart b/lib/home/home_screen.dart index c875c94..6fe743a 100644 --- a/lib/home/home_screen.dart +++ b/lib/home/home_screen.dart @@ -1,105 +1,23 @@ -import 'dart:async'; -import 'dart:developer'; -import 'dart:io'; - -import 'package:connectivity/connectivity.dart'; import 'package:flutter/material.dart'; -import 'package:just_audio/just_audio.dart'; -import 'package:queuing_system/core/api.dart'; +import 'package:provider/provider.dart'; import 'package:queuing_system/core/base/app_scaffold_widget.dart'; import 'package:queuing_system/core/config/size_config.dart'; -import 'package:queuing_system/core/response_model/call_config.dart'; -import 'package:queuing_system/core/response_model/patient_call.dart'; import 'package:queuing_system/header/app_header.dart'; -import 'package:queuing_system/home/home_screen_components.dart'; -import 'package:queuing_system/utils/call_by_voice.dart'; -import 'package:queuing_system/utils/call_type.dart'; -import 'package:queuing_system/utils/signalR_utils.dart'; +import 'package:queuing_system/home/app_provider.dart'; +import 'package:queuing_system/home/priority_calls_components.dart'; import 'package:queuing_system/utils/utils.dart'; import 'package:queuing_system/widget/data_display/app_texts_widget.dart'; -var deviceIPGlobal = "10.10.15.11"; - -bool isDevMode = false; // Testing IP - -// var DEVICE_IP = "10.10.14.11"; // Testing IP -// var DEVICE_IP = "10.10.15.11"; - -// var DEVICE_IP = "10.70.249.21"; // (Make sure by Haroon before use it) Production IP - -class MyHomePage extends StatefulWidget { - final String title = "MyHomePage"; - - const MyHomePage({Key key}) : super(key: key); - - @override - State createState() => _MyHomePageState(); -} - -class _MyHomePageState extends State { - SignalRHelper signalRHelper = SignalRHelper(); - - CallConfig callConfigsGlobal = CallConfig(); - List waitings = []; - List isQueuePatients = []; - - bool isLoading = false; - - @override - void dispose() { - super.dispose(); - } - - Future getCurrentIP() async { - final ips = await NetworkInterface.list(type: InternetAddressType.IPv4); - for (var interface in ips) { - //TODO: WE WILL UPDATE THIS WHEN TESTING ON SCREEN - // if (interface.name == "wlan0") { - if (interface.name == "eth0") { - for (var address in interface.addresses) { - deviceIPGlobal = address.address; - print("IP with eth0: ${address.address}"); - return deviceIPGlobal; - } - } - if (interface.name == "wlan0") { - for (var address in interface.addresses) { - deviceIPGlobal = address.address; - print("IP with wlan0: ${address.address}"); - return deviceIPGlobal; - } - } - return ""; - } - return ""; - } - - final AudioPlayer audioPlayer = AudioPlayer(); - - @override - void initState() { - listenNetworkConnectivity(); - scheduleMicrotask(() async { - if (!signalRHelper.getConnectionState()) { - signalRHelper.startSignalRConnection(await getCurrentIP(), onUpdateAvailable: onUpdateAvailable, onConnect: onConnect, onConnecting: onConnecting, onDisconnect: onDisconnect); - } - }); - audioPlayer.playerStateStream.listen((playerState) { - if (playerState.processingState == ProcessingState.completed) { - isCallingInProgress = false; - print("isCallingInProgress in Stream: $isCallingInProgress"); - } - }); - super.initState(); - } - - TextEditingController controller = TextEditingController(); +class MyHomePage extends StatelessWidget { + const MyHomePage({Key? key}) : super(key: key); @override Widget build(BuildContext context) { + final appProvider = context.watch(); return AppScaffold( + appProvider: appProvider, appBar: AppHeader(), - body: dataContent(audioPlayer), + body: dataContent(appProvider: appProvider), bottomNavigationBar: Container( color: Colors.grey.withOpacity(0.1), height: Utils.getHeight(), @@ -115,16 +33,14 @@ class _MyHomePageState extends State { mainAxisAlignment: MainAxisAlignment.center, children: [ InkWell( - onTap: () { - // onUpdateAvailable(""); - }, + onTap: () {}, child: AppText( "Powered By", fontSize: SizeConfig.getWidthMultiplier() * 2.6, fontFamily: 'Poppins-Medium.ttf', ), ), - Text(deviceIPGlobal, style: TextStyle(fontWeight: FontWeight.w500, fontSize: SizeConfig.getWidthMultiplier() * 2.2)), + Text(appProvider.currentDeviceIp, style: TextStyle(fontWeight: FontWeight.w500, fontSize: SizeConfig.getWidthMultiplier() * 2.2)), ], ), const SizedBox(width: 10), @@ -140,235 +56,16 @@ class _MyHomePageState extends State { ); } - onUpdateIPPressed() async { - // if (controller.text.isNotEmpty) { - // isLoading = true; - // setState(() {}); - // DEVICE_IP = controller.text; - // - // await signalRHelper.connection.stop(); - // if (!signalRHelper.getConnectionState()) { - // await signalRHelper.startSignalRConnection(DEVICE_IP, onUpdateAvailable: onUpdateAvailable, onConnect: onConnect, onConnecting: onConnecting, onDisconnect: onDisconnect); - // } - // - // controller.clear(); - // waitings.clear(); - // isLoading = false; - // setState(() {}); - // } - } - - Widget dataContent(AudioPlayer audioPlayer) { - voiceCall(audioPlayer); - // print("wlength: ${waitings.length}"); - // if (waitings.length > callConfigsGlobal.screenMaxDisplayPatients) { - // final newList = waitings.sublist(0, callConfigsGlobal.screenMaxDisplayPatients ); - // print("wlength: ${newList.length}"); - // } - - if (waitings.isEmpty) { + Widget dataContent({required AppProvider appProvider}) { + if (appProvider.patientTickets.isEmpty) { // No Patient in Queue return noPatientInQueue(); - } else if (waitings.length > 3) { + } else if (appProvider.patientTickets.length > 3) { // Return Content With Side List - return priorityTicketsWithSideList(waitings, callConfigsGlobal); + return priorityTicketsWithSideList(tickets: appProvider.patientTickets, callConfig: appProvider.patientCallConfigurations); } else { // Return Content In Center Aligned - return priorityTickets(waitings, callConfigsGlobal); - } - } - - String getCallTypeText(Tickets ticket, CallConfig callConfig) { - final callType = ticket.getCallType(); - final language = callConfig.screenLanguage; - switch (callType) { - case CallType.vitalSign: - return callConfig.vitalSignText; - case CallType.doctor: - return callConfig.doctorText; - case CallType.procedure: - return callConfig.procedureText; - case CallType.vaccination: - return callConfig.vaccinationText; - case CallType.nebulization: - return callConfig.nebulizationText; - break; - default: - return callConfig.vitalSignText; + return PriorityTickets(tickets: appProvider.patientTickets, callConfig: appProvider.patientCallConfigurations); } } - - CallByVoice voiceCaller; - - int callFlag = 0; - - // bool isRequiredVoice({CallType callType, bool isQueue}) { - // if (callType == CallType.DOCTOR && !isQueue) { - // return true; - // } - // if (callType == CallType.NURSE && !isQueue) { - // return true; - // } - // return false; - // } - - bool isCallingInProgress = false; - - voiceCall(AudioPlayer audioPlayer) async { - isCallingInProgress = true; - //DONE: After calling this voice call, we should delay for milliseconds that is given by API. After that we will check if there are more patients in isQueuePatients we will remove the patient from waiting list and then update the state - if (waitings.isNotEmpty) { - if (waitings.first.isToneReq && !waitings.first.isQueue) { - audioPlayer.setAsset("assets/tones/call_tone.mp3"); - await audioPlayer.play(); - await Future.delayed(const Duration(seconds: 2)); - isCallingInProgress = false; - } - if (waitings.first.isVoiceReq && voiceCaller == null && !waitings.first.isQueue) { - final postVoice = getCallTypeText(waitings.first, callConfigsGlobal); - voiceCaller = CallByVoice(preVoice: "Ticket Number", ticketNo: waitings.first.queueNo.trim().toString(), postVoice: postVoice, lang: 'en'); - await voiceCaller.startCalling(waitings.first.queueNo.trim().toString() != waitings.first.callNoStr.trim().toString()); - voiceCaller = null; - isCallingInProgress = false; - } - } - if (isQueuePatients.isNotEmpty) { - await Future.delayed(Duration(seconds: isQueuePatients.first.concurrentCallDelaySec)).whenComplete(() async { - if (isQueuePatients.isNotEmpty) { - isQueuePatients.removeAt(0); - } - if (waitings.isNotEmpty) { - // Tickets ticket = waitings.elementAt(0); - // waitings.removeAt(0); - // waitings.add(ticket); - } - if (isQueuePatients.isNotEmpty) { - // setState(() {}); - } - }); - } else { - // if (isQueuePatients.isEmpty && callFlag == 1) { - // callFlag == 0; - // await Future.delayed(const Duration(seconds: 3)); - // waitings.clear(); - // API.getCallRequestInfoByClinicInfo(DEVICE_IP, onSuccess: (waitingCalls, isQueuePatientsCalls) { - // setState(() { - // waitings = waitingCalls; - // isQueuePatients = isQueuePatientsCalls; - // // currents = currentInClinic; - // }); - // - // log("--------------------"); - // log("waiting: $waitings"); - // log("isQueuePatients: $isQueuePatients"); - // log("--------------------"); - // - // updateTickets(); - // }, onFailure: (error) {}); - // } - } - } - - Future callPatientsAPI() async { - waitings.clear(); - API.getCallRequestInfoByClinicInfo(deviceIPGlobal, onSuccess: (waitingCalls, isQueuePatientsCalls, callConfigs) { - setState(() { - callConfigsGlobal = callConfigs; - if (waitingCalls.length > callConfigsGlobal.screenMaxDisplayPatients) { - waitings = waitingCalls.sublist(0, callConfigsGlobal.screenMaxDisplayPatients); - } else { - waitings = waitingCalls; - } - isQueuePatients = isQueuePatientsCalls; - // currents = currentInClinic; - }); - - log("--------------------"); - log("waiting: $waitings"); - log("isQueuePatients: $isQueuePatients"); - log("--------------------"); - - updateTickets(); - }, onFailure: (error) {}); - } - - onUpdateAvailable(data) async { - // if (isQueuePatients.isNotEmpty && callFlag == 0) { - // callFlag = 1; - // return; - // } - if (waitings.isNotEmpty) { - print("isCallingInProgress: ${isCallingInProgress}"); - print("voiceCaller: ${voiceCaller == null}"); - if ((waitings.first.isToneReq && isCallingInProgress) || (waitings.first.isVoiceReq && voiceCaller != null)) { - // if (true) { - print("I will wait now for ${callConfigsGlobal.concurrentCallDelaySec} seconds"); - Timer(Duration(seconds: callConfigsGlobal.concurrentCallDelaySec), () async { - await callPatientsAPI(); - }); - } else { - await callPatientsAPI(); - } - } else { - await callPatientsAPI(); - } - } - - updateTickets() { - if (waitings != null && waitings.isNotEmpty) { - List _ticketsToUpdate = waitings.where((t) => t.callUpdated == false).toList(); - API.callUpdateNotIsQueueRecordByIDAsync(deviceIPGlobal, ticket: _ticketsToUpdate.first, onSuccess: (ticketsUpdated) { - log("[${ticketsUpdated.length}] Tickets Updated: $ticketsUpdated"); - }, onFailure: (e) { - log("API UPDate Tickets Failed with : ${e.toString()}"); - }); - } - } - - onConnect() { - log("SignalR: onConnect"); - } - - onDisconnect(exception) { - log("SignalR: onDisconnect"); - signalRHelper.startSignalRConnection(deviceIPGlobal, onUpdateAvailable: onUpdateAvailable, onConnect: onConnect, onConnecting: onConnecting, onDisconnect: onDisconnect); - } - - onConnecting() { - log("SignalR: onConnecting"); - } - - listenNetworkConnectivity() async { - Connectivity().onConnectivityChanged.listen((event) async { - switch (event) { - case ConnectivityResult.wifi: - await getCurrentIP(); - signalRHelper.connection.start(); - break; - case ConnectivityResult.none: - signalRHelper.closeConnection(context); - break; - case ConnectivityResult.mobile: - break; - } - }); - } } - -// if (isQueuePatients.length > 1) { -// Timer(Duration(milliseconds: int.parse(waitings.first.queueDuration)), () { -// Tickets calledTicket = Tickets(); -// if (isQueuePatients.isNotEmpty) { -// calledTicket = isQueuePatients.elementAt(0); -// isQueuePatients.removeAt(0); -// } -// if (waitings.isNotEmpty) { -// // Tickets ticket = waitings.elementAt(0); -// // waitings.removeAt(0); -// // waitings.add(ticket); -// } -// if (isQueuePatients.isNotEmpty) { -// // setState(() {}); -// } -// }); -// } diff --git a/lib/home/home_screen_components.dart b/lib/home/home_screen_components.dart deleted file mode 100644 index a24e35e..0000000 --- a/lib/home/home_screen_components.dart +++ /dev/null @@ -1,98 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:queuing_system/core/config/size_config.dart'; -import 'package:queuing_system/core/response_model/call_config.dart'; -import 'package:queuing_system/core/response_model/patient_call.dart'; -import 'package:queuing_system/home/priority_calls.dart'; -import 'package:queuing_system/utils/call_type.dart'; -import 'package:queuing_system/widget/data_display/app_texts_widget.dart'; - -Widget noPatientInQueue() { - return Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Center( - child: AppText("Awaiting Patients Arrival", fontFamily: 'Poppins-SemiBold.ttf', fontSize: SizeConfig.getWidthMultiplier() * 9), - ), - ], - ); -} - -Widget priorityTickets(List tickets, CallConfig callConfig) { - return PriorityTickets(tickets, callConfig); -} - -Widget priorityTicketsWithSideList(List tickets, CallConfig callConfig) { - final priorityTickets = tickets.sublist(0, 3); - final otherTickets = tickets.sublist(3, tickets.length); - return Row( - children: [ - Expanded(flex: 7, child: PriorityTickets(priorityTickets, callConfig)), - Container(color: Colors.grey.withOpacity(0.1), width: 10, margin: const EdgeInsets.symmetric(horizontal: 10, vertical: 50)), - Expanded( - flex: 5, - child: ListView.builder( - padding: const EdgeInsets.symmetric(horizontal: 0, vertical: 50), - itemCount: otherTickets.length, - itemBuilder: (ctx, idx) { - final itm = otherTickets[idx]; - - return Padding( - padding: const EdgeInsets.all(8), - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox( - width: SizeConfig.getWidthMultiplier() * 19, - child: AppText( - itm.queueNo.toString(), - letterSpacing: -2, - fontWeight: FontWeight.bold, - fontSize: SizeConfig.getWidthMultiplier() * 4, - textAlign: TextAlign.center, - ), - ), - const SizedBox(width: 5), - Row( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - SizedBox( - width: SizeConfig.getWidthMultiplier() * 3, - child: itm.getCallType().icon(SizeConfig.getHeightMultiplier() * 2.5), - ), - const SizedBox(width: 10), - SizedBox( - width: SizeConfig.getWidthMultiplier() * 28, - child: AppText( - itm.getCallType().message(callConfig), - color: itm.getCallType().color(), - letterSpacing: -1.5, - fontSize: SizeConfig.getWidthMultiplier() * 3, - fontWeight: FontWeight.w600, - fontHeight: 0.5, - ), - ), - Container( - color: Colors.grey.withOpacity(0.3), - width: 6, - height: SizeConfig.getHeightMultiplier() * 3, - margin: const EdgeInsets.symmetric(horizontal: 10), - ), - AppText( - "Room: ${itm.roomNo}", - color: itm.getCallType().color(), - letterSpacing: -1.5, - fontSize: SizeConfig.getWidthMultiplier() * 3.3, - fontWeight: FontWeight.w600, - fontHeight: 0.5, - ), - ], - ) - ], - ), - ); - }, - ), - ) - ], - ); -} diff --git a/lib/home/priority_calls.dart b/lib/home/priority_calls_components.dart similarity index 53% rename from lib/home/priority_calls.dart rename to lib/home/priority_calls_components.dart index 02db99e..dbb5181 100644 --- a/lib/home/priority_calls.dart +++ b/lib/home/priority_calls_components.dart @@ -1,8 +1,8 @@ import 'package:blinking_text/blinking_text.dart'; import 'package:flutter/material.dart'; import 'package:queuing_system/core/config/size_config.dart'; -import 'package:queuing_system/core/response_model/call_config.dart'; -import 'package:queuing_system/core/response_model/patient_call.dart'; +import 'package:queuing_system/core/response_models/call_config.dart'; +import 'package:queuing_system/core/response_models/patient_call.dart'; import 'package:queuing_system/utils/call_type.dart'; import 'package:queuing_system/widget/data_display/app_texts_widget.dart'; @@ -10,7 +10,7 @@ class PriorityTickets extends StatelessWidget { final List tickets; final CallConfig callConfig; - const PriorityTickets(this.tickets, this.callConfig, {Key key}) : super(key: key); + const PriorityTickets({required this.tickets, required this.callConfig, Key? key}) : super(key: key); @override Widget build(BuildContext context) { @@ -66,13 +66,13 @@ class TicketItem extends StatelessWidget { final CallConfig callConfig; const TicketItem({ - Key key, - @required this.isClinicAdded, - @required this.ticketNo, - @required this.roomNo, - @required this.callType, - @required this.callConfig, - this.scale, + Key? key, + required this.isClinicAdded, + required this.ticketNo, + required this.roomNo, + required this.callType, + required this.callConfig, + required this.scale, this.blink = false, }) : super(key: key); @@ -139,3 +139,90 @@ class TicketItem extends StatelessWidget { ); } } + +Widget noPatientInQueue() { + return Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Center( + child: AppText("Awaiting Patients Arrival", fontFamily: 'Poppins-SemiBold.ttf', fontSize: SizeConfig.getWidthMultiplier() * 9), + ), + ], + ); +} + +Widget priorityTicketsWithSideList({required List tickets, required CallConfig callConfig}) { + final priorityTickets = tickets.sublist(0, 3); + final otherTickets = tickets.sublist(3, tickets.length); + return Row( + children: [ + Expanded(flex: 7, child: PriorityTickets(callConfig: callConfig, tickets: priorityTickets)), + Container(color: Colors.grey.withOpacity(0.1), width: 10, margin: const EdgeInsets.symmetric(horizontal: 10, vertical: 50)), + Expanded( + flex: 5, + child: ListView.builder( + padding: const EdgeInsets.symmetric(horizontal: 0, vertical: 50), + itemCount: otherTickets.length, + itemBuilder: (ctx, idx) { + final itm = otherTickets[idx]; + + return Padding( + padding: const EdgeInsets.all(8), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + width: SizeConfig.getWidthMultiplier() * 19, + child: AppText( + itm.queueNo.toString(), + letterSpacing: -2, + fontWeight: FontWeight.bold, + fontSize: SizeConfig.getWidthMultiplier() * 4, + textAlign: TextAlign.center, + ), + ), + const SizedBox(width: 5), + Row( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + SizedBox( + width: SizeConfig.getWidthMultiplier() * 3, + child: itm.getCallType().icon(SizeConfig.getHeightMultiplier() * 2.5), + ), + const SizedBox(width: 10), + SizedBox( + width: SizeConfig.getWidthMultiplier() * 28, + child: AppText( + itm.getCallType().message(callConfig), + color: itm.getCallType().color(), + letterSpacing: -1.5, + fontSize: SizeConfig.getWidthMultiplier() * 3, + fontWeight: FontWeight.w600, + fontHeight: 0.5, + ), + ), + Container( + color: Colors.grey.withOpacity(0.3), + width: 6, + height: SizeConfig.getHeightMultiplier() * 3, + margin: const EdgeInsets.symmetric(horizontal: 10), + ), + AppText( + "Room: ${itm.roomNo}", + color: itm.getCallType().color(), + letterSpacing: -1.5, + fontSize: SizeConfig.getWidthMultiplier() * 3.3, + fontWeight: FontWeight.w600, + fontHeight: 0.5, + ), + ], + ) + ], + ), + ); + }, + ), + ) + ], + ); +} diff --git a/lib/home/que_item_list.dart b/lib/home/que_item_list.dart deleted file mode 100644 index 07699a1..0000000 --- a/lib/home/que_item_list.dart +++ /dev/null @@ -1,27 +0,0 @@ -// import 'package:flutter/material.dart'; -// import 'package:queuing_system/core/config/size_config.dart'; -// import 'package:queuing_system/home/que_item/que_item.dart'; -// -// class QueItemList extends StatelessWidget { -// const QueItemList({Key key}) : super(key: key); -// -// @override -// Widget build(BuildContext context) { -// return SizedBox( -// child: Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// SizedBox(height: SizeConfig.getHeightMultiplier() *2.3,), -// const TicketItem(queNo: "OBG-T45", isInListLine: true, isNurseVisit: true, haveListOfPatient: false,), -// const TicketItem(queNo: "OBG-T45", isInListLine: true, isNurseVisit: true, haveListOfPatient: false,), -// const TicketItem(queNo: "OBG-T45", isInListLine: true, isNurseVisit: false, haveListOfPatient: false,), -// const TicketItem(queNo: "OBG-T45", isInListLine: true, isNurseVisit: true, haveListOfPatient: false,), -// const TicketItem(queNo: "OBG-T45", isInListLine: true, isNurseVisit: true, haveListOfPatient: false,), -// const TicketItem(queNo: "OBG-T45", isInListLine: true, isNurseVisit: false, haveListOfPatient: false,), -// const TicketItem(queNo: "OBG-T45", isInListLine: true, isNurseVisit: true, haveListOfPatient: false,), -// const TicketItem(queNo: "OBG-T45", isInListLine: true, isNurseVisit: false, haveListOfPatient: false,), -// -// ],), -// ); -// } -// } diff --git a/lib/main.dart b/lib/main.dart index 5caee61..c601b79 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -3,14 +3,14 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:queuing_system/core/api.dart'; +import 'package:queuing_system/home/app_provider.dart'; import 'package:wakelock/wakelock.dart'; -import 'core/base/project_view_model.dart'; + import 'core/config/size_config.dart'; import 'home/home_screen.dart'; // import 'home/home_screen_bkp.dart'; void main() { - //TODO: WE HAVE TO UPDATE THIS BEFORE GOING LIVE. HttpOverrides.global = MyHttpOverrides(); WidgetsFlutterBinding.ensureInitialized(); @@ -23,7 +23,7 @@ void main() { //TODO: WE NEED TO IMPLEMENT THE AVAILABILITY MONITORING OF THE SCREENS LIKE IF THEY ARE TURNED ON OR NOT!! class MyApp extends StatelessWidget { - const MyApp({Key key}) : super(key: key); + const MyApp({Key? key}) : super(key: key); // This widget is the root of your application. @override @@ -33,28 +33,23 @@ class MyApp extends StatelessWidget { return OrientationBuilder(builder: (context, orientation) { SizeConfig().init(constraints, orientation); return MultiProvider( - providers: [ - - ChangeNotifierProvider( - create: (context) => ProjectViewModel(), - ), - ], - child: Consumer( - builder: (context, projectProvider, child) => MaterialApp( - showSemanticsDebugger: false, - title: 'Doctors App', - theme: ThemeData( - primaryColor: Colors.grey, - fontFamily: 'Poppins', - dividerColor: Colors.grey[350], colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.grey).copyWith(background: const Color.fromRGBO(255, 255, 255, 1)), - ), - home:const MyHomePage() , - debugShowCheckedModeBanner: false, - )), - ); + providers: [ + ChangeNotifierProvider(create: (context) => AppProvider()), + ], + child: MaterialApp( + showSemanticsDebugger: false, + title: 'Doctors App', + theme: ThemeData( + primaryColor: Colors.grey, + fontFamily: 'Poppins', + dividerColor: Colors.grey[350], + colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.grey).copyWith(background: const Color.fromRGBO(255, 255, 255, 1)), + ), + home: const MyHomePage(), + debugShowCheckedModeBanner: false, + )); }); }, ); } } - diff --git a/lib/utils/call_by_voice.dart b/lib/utils/call_by_voice.dart index 0c5720d..dade985 100644 --- a/lib/utils/call_by_voice.dart +++ b/lib/utils/call_by_voice.dart @@ -1,4 +1,5 @@ -import 'package:flutter/cupertino.dart'; +import 'dart:developer'; + import 'package:flutter_tts/flutter_tts.dart'; class CallByVoice { @@ -7,7 +8,7 @@ class CallByVoice { final String ticketNo; final String postVoice; - CallByVoice({this.lang = 'en', @required this.ticketNo, @required this.preVoice, @required this.postVoice}); + CallByVoice({this.lang = 'en', required this.ticketNo, required this.preVoice, required this.postVoice}); final FlutterTts textToSpeech = FlutterTts(); @@ -16,10 +17,9 @@ class CallByVoice { double rate = 0.2; startCalling(bool isClinicNameAdded) async { - // print("langs: ${(await textToSpeech.setEngine("com.google.android.tts"))}"); - print("langs: ${(await textToSpeech.getVoices).toString()}"); - print("langs: ${(await textToSpeech.getLanguages).toString()}"); - print("langs: ${(await textToSpeech.getEngines).toString()}"); + log("langs: ${(await textToSpeech.getVoices).toString()}"); + log("langs: ${(await textToSpeech.getLanguages).toString()}"); + log("langs: ${(await textToSpeech.getEngines).toString()}"); String clinicName = ""; String patientAlpha = ""; diff --git a/lib/utils/call_type.dart b/lib/utils/call_type.dart index 0df1173..b2c2fc4 100644 --- a/lib/utils/call_type.dart +++ b/lib/utils/call_type.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:queuing_system/core/config/config.dart'; -import 'package:queuing_system/core/response_model/call_config.dart'; +import 'package:queuing_system/core/response_models/call_config.dart'; enum CallType { vitalSign, doctor, procedure, vaccination, nebulization, none } @@ -43,9 +43,7 @@ extension XCallType on CallType { } } - SvgPicture icon( - double height, - ) { + SvgPicture icon(double height) { if (this == CallType.vitalSign) { return SvgPicture.asset("assets/images/nurseicon.svg", height: height, color: color()); } else if (this == CallType.doctor) { diff --git a/lib/utils/signalR_utils.dart b/lib/utils/signalR_utils.dart index 9aa683d..5e87e9f 100644 --- a/lib/utils/signalR_utils.dart +++ b/lib/utils/signalR_utils.dart @@ -1,3 +1,4 @@ +import 'dart:developer'; import 'dart:io'; import 'package:flutter/material.dart'; @@ -23,13 +24,11 @@ class SignalRHelper { // String hubBaseURL = "https://vcallapi.hmg.com/PatientCallingHub?IPAddress=10.10.14.20"; // "https://VCallApi.hmg.com/WebRTCHub?source=mobile&username=2001273"; String msg = "Awaiting Patients Arrival"; - HubConnection connection; + HubConnection? connection; startSignalRConnection(String deviceIp, - {@required Function(dynamic) onUpdateAvailable, @required VoidCallback onConnect, @required Function(dynamic) onDisconnect, @required VoidCallback onConnecting}) async { - // Hardcoded IP For Testing - // deviceIp = "10.10.14.11"; - print("Connecting Signal R with: $deviceIp"); + {required Function(dynamic) onUpdateAvailable, required VoidCallback onConnect, required Function(dynamic) onDisconnect, required VoidCallback onConnecting}) async { + log("Connecting Signal R with: $deviceIp"); final url = hubBaseURL + "?IPAddress=$deviceIp"; // final url = hubBaseURL; @@ -39,47 +38,41 @@ class SignalRHelper { HttpConnectionOptions( client: IOClient(HttpClient()..badCertificateCallback = (x, y, z) => true), transport: HttpTransportType.serverSentEvents, - logging: (level, message) => { - print(message), - }, + logging: (level, message) => log(message), )) .build(); - connection.onclose(onDisconnect); - connection.onreconnecting((exception) => onConnecting()); - connection.onreconnected((connectionId) => onConnect()); + connection!.onclose(onDisconnect); + connection!.onreconnecting((exception) => onConnecting()); + connection!.onreconnected((connectionId) => onConnect()); - connection.on('addChatMessage', (message) { - onUpdateAvailable(message); - }); + connection!.on('addChatMessage', (message) => onUpdateAvailable(message)); - // try { - await connection.start(); - // } catch (e, s) { - // print("Here the error: ${e.toString()}"); - // } + await connection!.start(); } void sendMessage(List args) async { - await connection.invoke('SendMessage', args: args); //['Bob', 'Says hi!'] + await connection!.invoke('SendMessage', args: args); //['Bob', 'Says hi!'] } bool getConnectionState() { if (connection == null) return false; - if (connection.state == HubConnectionState.connected || connection.state == HubConnectionState.connecting) return true; - if (connection.state == HubConnectionState.disconnected || connection.state == HubConnectionState.disconnecting) return false; + log("connectionState: ${connection!.state}"); + if (connection!.state == HubConnectionState.connected || connection!.state == HubConnectionState.connecting) return true; + if (connection!.state == HubConnectionState.disconnected || connection!.state == HubConnectionState.disconnecting) return false; + return false; } - closeConnection(BuildContext context) async { - if (connection.state == HubConnectionState.connected || connection.state == HubConnectionState.connecting) { - await connection.stop(); + closeConnection() async { + if (connection!.state == HubConnectionState.connected || connection!.state == HubConnectionState.connecting) { + await connection!.stop(); } } startConnection(BuildContext context) async { - if (connection.state == HubConnectionState.connected || connection.state == HubConnectionState.connecting) { - connection.off('addChatMessage'); - await connection.start(); + if (connection!.state == HubConnectionState.connected || connection!.state == HubConnectionState.connecting) { + connection!.off('addChatMessage'); + await connection!.start(); } } } diff --git a/lib/utils/utils.dart b/lib/utils/utils.dart index cc01d0f..11ed84f 100644 --- a/lib/utils/utils.dart +++ b/lib/utils/utils.dart @@ -1,30 +1,11 @@ import 'package:connectivity/connectivity.dart'; -import 'package:queuing_system/core/base/locater.dart'; import 'package:queuing_system/core/config/size_config.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; - - class Utils { - - - static TextStyle textStyle(context) => - TextStyle(color: Theme.of(context).primaryColor); - - - static Future checkConnection() async { - ConnectivityResult connectivityResult = - await (Connectivity().checkConnectivity()); - if ((connectivityResult == ConnectivityResult.mobile) || - (connectivityResult == ConnectivityResult.wifi)) { - return true; - } else { - return false; - } + static getHeight() { + return SizeConfig.getHeightMultiplier() * 7; } - static generateContactAdminMsg([err = null]) { //TODO: Add translation String localMsg = 'Something wrong happened, please contact the admin'; @@ -34,150 +15,151 @@ class Utils { return localMsg; } - - 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) { - // locator().pushAndRemoveUntil( - // FadePage( - // page: UpdatePage( - // message: message, - // androidLink: androidLink, - // iosLink: iosLink, - // ), - // ), - // ); - - // Navigator.pushAndRemoveUntil( - // AppGlobal.CONTEX, - // FadePage( - // page: UpdatePage( - // message: message, - // androidLink: androidLink, - // iosLink: iosLink, - // ), - // ), - // (r) => false); - } - - - static InputDecoration textFieldSelectorDecoration( - String hintText, String selectedText, bool isDropDown, - {Icon suffixIcon, Color dropDownColor}) { - return InputDecoration( - focusedBorder: OutlineInputBorder( - borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), - borderRadius: BorderRadius.circular(8), - ), - enabledBorder: OutlineInputBorder( - borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), - borderRadius: BorderRadius.circular(8), - ), - disabledBorder: OutlineInputBorder( - borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), - borderRadius: BorderRadius.circular(8), - ), - hintText: selectedText != null ? selectedText : hintText, - suffixIcon: isDropDown - ? suffixIcon != null - ? suffixIcon - : Icon( - Icons.arrow_drop_down, - color: dropDownColor != null ? dropDownColor : Colors.black, - ) - : null, - hintStyle: TextStyle( - fontSize: 14, - color: Colors.grey.shade600, - ), - ); - } - - static BoxDecoration containerBorderDecoration( - Color containerColor, Color borderColor, - {double borderWidth = -1}) { - return BoxDecoration( - color: containerColor, - shape: BoxShape.rectangle, - borderRadius: BorderRadius.all(Radius.circular(8)), - border: Border.fromBorderSide(BorderSide( - color: borderColor, - width: borderWidth == -1 ? 2.0 : borderWidth, - )), - ); - } - - /// hides the keyboard if its already open - static hideKeyboard(BuildContext context) { - FocusScope.of(context).unfocus(); - } - - static String capitalize(str) { - if (str != "") { - return "${str[0].toUpperCase()}${str.substring(1).toLowerCase()}"; + static Future checkConnection() async { + ConnectivityResult connectivityResult = await (Connectivity().checkConnectivity()); + if ((connectivityResult == ConnectivityResult.mobile) || (connectivityResult == ConnectivityResult.wifi)) { + return true; } else { - return str; - } - } - - static bool isTextHtml(String text) { - var htmlRegex = RegExp("<(“[^”]*”|'[^’]*’|[^'”>])*>"); - return htmlRegex.hasMatch(text); - } - - static String timeFrom({Duration duration}) { - String twoDigits(int n) => n.toString().padLeft(2, "0"); - String twoDigitMinutes = twoDigits(duration.inMinutes.remainder(60)); - String twoDigitSeconds = twoDigits(duration.inSeconds.remainder(60)); - return "$twoDigitMinutes:$twoDigitSeconds"; - } - - - - - - static String convertToTitleCase(String text) { - if (text == null) { - return null; - } - - if (text.length <= 1) { - return text.toUpperCase(); + return false; } - - // 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(' '); - } - - static getHeight() { - return SizeConfig.getHeightMultiplier()*7; } +// static TextStyle textStyle(context) => TextStyle(color: Theme.of(context).primaryColor); +// + +// + +// +// 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) { +// // locator().pushAndRemoveUntil( +// // FadePage( +// // page: UpdatePage( +// // message: message, +// // androidLink: androidLink, +// // iosLink: iosLink, +// // ), +// // ), +// // ); +// +// // Navigator.pushAndRemoveUntil( +// // AppGlobal.CONTEX, +// // FadePage( +// // page: UpdatePage( +// // message: message, +// // androidLink: androidLink, +// // iosLink: iosLink, +// // ), +// // ), +// // (r) => false); +// } +// +// static InputDecoration textFieldSelectorDecoration(String hintText, String selectedText, bool isDropDown, {Icon suffixIcon, Color dropDownColor}) { +// return InputDecoration( +// focusedBorder: OutlineInputBorder( +// borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), +// borderRadius: BorderRadius.circular(8), +// ), +// enabledBorder: OutlineInputBorder( +// borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), +// borderRadius: BorderRadius.circular(8), +// ), +// disabledBorder: OutlineInputBorder( +// borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), +// borderRadius: BorderRadius.circular(8), +// ), +// hintText: selectedText != null ? selectedText : hintText, +// suffixIcon: isDropDown +// ? suffixIcon != null +// ? suffixIcon +// : Icon( +// Icons.arrow_drop_down, +// color: dropDownColor != null ? dropDownColor : Colors.black, +// ) +// : null, +// hintStyle: TextStyle( +// fontSize: 14, +// color: Colors.grey.shade600, +// ), +// ); +// } +// +// static BoxDecoration containerBorderDecoration(Color containerColor, Color borderColor, {double borderWidth = -1}) { +// return BoxDecoration( +// color: containerColor, +// shape: BoxShape.rectangle, +// borderRadius: BorderRadius.all(Radius.circular(8)), +// border: Border.fromBorderSide(BorderSide( +// color: borderColor, +// width: borderWidth == -1 ? 2.0 : borderWidth, +// )), +// ); +// } +// +// /// hides the keyboard if its already open +// static hideKeyboard(BuildContext context) { +// FocusScope.of(context).unfocus(); +// } +// +// static String capitalize(str) { +// if (str != "") { +// return "${str[0].toUpperCase()}${str.substring(1).toLowerCase()}"; +// } else { +// return str; +// } +// } +// +// static bool isTextHtml(String text) { +// var htmlRegex = RegExp("<(“[^”]*”|'[^’]*’|[^'”>])*>"); +// return htmlRegex.hasMatch(text); +// } +// +// static String timeFrom({Duration duration}) { +// String twoDigits(int n) => n.toString().padLeft(2, "0"); +// String twoDigitMinutes = twoDigits(duration.inMinutes.remainder(60)); +// String twoDigitSeconds = twoDigits(duration.inSeconds.remainder(60)); +// return "$twoDigitMinutes:$twoDigitSeconds"; +// } +// +// 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/widget/app_loader_widget.dart b/lib/widget/app_loader_widget.dart index 61e3125..e05300d 100644 --- a/lib/widget/app_loader_widget.dart +++ b/lib/widget/app_loader_widget.dart @@ -1,32 +1,32 @@ -import 'package:flutter/material.dart'; -import 'package:queuing_system/widget/loader/gif_loader_container.dart'; - -class AppLoaderWidget extends StatefulWidget { - AppLoaderWidget({Key key, this.title, this.containerColor}) : super(key: key); - - final String title; - final Color containerColor; - - @override - _AppLoaderWidgetState createState() => _AppLoaderWidgetState(); -} - -class _AppLoaderWidgetState extends State { - @override - Widget build(BuildContext context) { - return SizedBox( - height: MediaQuery.of(context).size.height, - child: Stack( - children: [ - Container( - color: widget.containerColor ?? Colors.grey.withOpacity(0.6), - ), - Container( - child: GifLoaderContainer(), - margin: EdgeInsets.only( - bottom: MediaQuery.of(context).size.height * 0.09)) - ], - ), - ); - } -} +// import 'package:flutter/material.dart'; +// import 'package:queuing_system/widget/loader/gif_loader_container.dart'; +// +// class AppLoaderWidget extends StatefulWidget { +// AppLoaderWidget({Key? key, this.title, this.containerColor}) : super(key: key); +// +// final String title; +// final Color containerColor; +// +// @override +// _AppLoaderWidgetState createState() => _AppLoaderWidgetState(); +// } +// +// class _AppLoaderWidgetState extends State { +// @override +// Widget build(BuildContext context) { +// return SizedBox( +// height: MediaQuery.of(context).size.height, +// child: Stack( +// children: [ +// Container( +// color: widget.containerColor ?? Colors.grey.withOpacity(0.6), +// ), +// Container( +// child: GifLoaderContainer(), +// margin: EdgeInsets.only( +// bottom: MediaQuery.of(context).size.height * 0.09)) +// ], +// ), +// ); +// } +// } diff --git a/lib/widget/data_display/app_texts_widget.dart b/lib/widget/data_display/app_texts_widget.dart index d4e88d1..b8f44a5 100644 --- a/lib/widget/data_display/app_texts_widget.dart +++ b/lib/widget/data_display/app_texts_widget.dart @@ -3,35 +3,36 @@ import 'package:queuing_system/core/config/size_config.dart'; class AppText extends StatefulWidget { final String text; - final String variant; + final String? variant; final Color color; - final FontWeight fontWeight; - final double fontSize; - final double fontHeight; + final FontWeight? fontWeight; + final double? fontSize; + final double? fontHeight; final String fontFamily; final int maxLength; final bool italic; - final double margin; + final double? margin; final double marginTop; final double marginRight; final double marginBottom; final double marginLeft; - final double letterSpacing; - final TextAlign textAlign; - final bool bold; - final bool regular; - final bool medium; - final int maxLines; + final double? letterSpacing; + final TextAlign? textAlign; + final bool? bold; + final bool? regular; + final bool? medium; + final int? maxLines; final bool readMore; - final String style; + final String? style; final bool allowExpand; final bool visibility; - final TextOverflow textOverflow; - final TextDecoration textDecoration; + final TextOverflow? textOverflow; + final TextDecoration? textDecoration; final bool isCopyable; const AppText( - this.text, {Key key, + this.text, { + Key? key, this.color = Colors.black, this.fontWeight, this.variant, @@ -95,13 +96,7 @@ class _AppTextState extends State { Widget build(BuildContext context) { return GestureDetector( child: Container( - margin: widget.margin != null - ? EdgeInsets.all(widget.margin) - : EdgeInsets.only( - top: widget.marginTop, - right: widget.marginRight, - bottom: widget.marginBottom, - left: widget.marginLeft), + margin: widget.margin != null ? EdgeInsets.all(widget.margin!) : EdgeInsets.only(top: widget.marginTop, right: widget.marginRight, bottom: widget.marginBottom, left: widget.marginLeft), child: Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.start, @@ -116,21 +111,16 @@ 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).colorScheme.background, + Theme.of(context).colorScheme.background.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: const EdgeInsets.only(top: 8.0, right: 8.0, bottom: 8.0), child: InkWell( @@ -140,7 +130,7 @@ class _AppTextState extends State { }); }, child: Text(hidden ? "Read More" : "Read less", - style: _getFontStyle().copyWith( + style: _getFontStyle()?.copyWith( color: Colors.white, fontWeight: FontWeight.w800, fontFamily: "Poppins", @@ -160,13 +150,7 @@ class _AppTextState extends State { textSelectionTheme: const TextSelectionThemeData(selectionColor: Colors.lightBlueAccent), ), 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) @@ -175,18 +159,12 @@ class _AppTextState extends State { // : null, maxLines: widget.maxLines, style: widget.style != null - ? _getFontStyle().copyWith( - fontStyle: widget.italic ? FontStyle.italic : null, - color: widget.color, - fontWeight: widget.fontWeight ?? _getFontWeight(), - height: widget.fontHeight) + ? _getFontStyle()?.copyWith(fontStyle: widget.italic ? FontStyle.italic : null, color: widget.color, fontWeight: widget.fontWeight ?? _getFontWeight(), height: widget.fontHeight) : TextStyle( fontStyle: widget.italic ? FontStyle.italic : null, - color: - widget.color ?? const Color(0xff000000), + color: widget.color ?? const Color(0xff000000), 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, @@ -195,32 +173,22 @@ 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, style: widget.style != null - ? _getFontStyle().copyWith( + ? _getFontStyle()?.copyWith( fontStyle: widget.italic ? FontStyle.italic : null, color: widget.color, fontWeight: widget.fontWeight ?? _getFontWeight(), - height: widget.fontHeight) + height: widget.fontHeight, + ) : TextStyle( fontStyle: widget.italic ? FontStyle.italic : null, color: 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, @@ -229,30 +197,30 @@ class _AppTextState extends State { } } - TextStyle _getFontStyle() { + TextStyle? _getFontStyle() { switch (widget.style) { case "headline2": - return Theme.of(context).textTheme.headline2; + return Theme.of(context).textTheme.displayMedium; case "headline3": - return Theme.of(context).textTheme.headline3; + return Theme.of(context).textTheme.displaySmall; case "headline4": - return Theme.of(context).textTheme.headline4; + return Theme.of(context).textTheme.headlineMedium; case "headline5": - return Theme.of(context).textTheme.headline5; + return Theme.of(context).textTheme.headlineSmall; case "headline6": - return Theme.of(context).textTheme.headline6; + return Theme.of(context).textTheme.titleLarge; case "bodyText2": - return Theme.of(context).textTheme.bodyText2; + return Theme.of(context).textTheme.bodyMedium; case "bodyText_15": - return Theme.of(context).textTheme.bodyText2.copyWith(fontSize: 15.0); + return Theme.of(context).textTheme.bodyMedium?.copyWith(fontSize: 15.0); case "bodyText1": - return Theme.of(context).textTheme.bodyText1; + return Theme.of(context).textTheme.bodyLarge; case "caption": - return Theme.of(context).textTheme.caption; + return Theme.of(context).textTheme.bodySmall; case "overline": - return Theme.of(context).textTheme.overline; + return Theme.of(context).textTheme.labelSmall; case "button": - return Theme.of(context).textTheme.button; + return Theme.of(context).textTheme.labelLarge; default: return const TextStyle(); } @@ -291,11 +259,11 @@ class _AppTextState extends State { case "date": return 24.0; default: - return SizeConfig.textMultiplier * 2.8; + return SizeConfig.textMultiplier! * 2.8; } } - FontWeight _getFontWeight() { + FontWeight? _getFontWeight() { if (widget.bold ?? false) { return FontWeight.w900; } else if (widget.regular ?? false) { diff --git a/lib/widget/errors/error_message.dart b/lib/widget/errors/error_message.dart index 450e7d6..57e248c 100644 --- a/lib/widget/errors/error_message.dart +++ b/lib/widget/errors/error_message.dart @@ -1,43 +1,36 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_svg/flutter_svg.dart'; -import 'package:queuing_system/widget/data_display/app_texts_widget.dart'; - - -class ErrorMessage extends StatelessWidget { - const ErrorMessage({ - Key key, - @required this.error, - }) : super(key: key); - - final String error; - - @override - Widget build(BuildContext context) { - return SingleChildScrollView( - child: Center( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - SizedBox( - height: 100, - ), - SvgPicture.asset('assets/images/svgs/no data.svg'), - Center( - child: Center( - child: Padding( - padding: const EdgeInsets.only( - top: 12, bottom: 12, right: 20, left: 30), - child: Center( - child: AppText( - error ?? '', - textAlign: TextAlign.center, - )), - ), - ), - ) - ], - ), - ), - ); - } -} +// import 'package:flutter/material.dart'; +// import 'package:flutter_svg/flutter_svg.dart'; +// import 'package:queuing_system/widget/data_display/app_texts_widget.dart'; +// +// class ErrorMessage extends StatelessWidget { +// const ErrorMessage({Key? key, this.error = ''}) : super(key: key); +// +// final String error; +// +// @override +// Widget build(BuildContext context) { +// return SingleChildScrollView( +// child: Center( +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.center, +// children: [ +// const SizedBox(height: 100), +// SvgPicture.asset('assets/images/svgs/no data.svg'), +// Center( +// child: Center( +// child: Padding( +// padding: const EdgeInsets.only(top: 12, bottom: 12, right: 20, left: 30), +// child: Center( +// child: AppText( +// error ?? '', +// textAlign: TextAlign.center, +// )), +// ), +// ), +// ) +// ], +// ), +// ), +// ); +// } +// } diff --git a/lib/widget/loader/gif_loader_container.dart b/lib/widget/loader/gif_loader_container.dart index e30b342..697034b 100644 --- a/lib/widget/loader/gif_loader_container.dart +++ b/lib/widget/loader/gif_loader_container.dart @@ -1,43 +1,43 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter_gifimage/flutter_gifimage.dart'; - -class GifLoaderContainer extends StatefulWidget { - @override - _GifLoaderContainerState createState() => _GifLoaderContainerState(); -} - -class _GifLoaderContainerState extends State - with TickerProviderStateMixin { - GifController controller1; - - @override - void initState() { - controller1 = GifController(vsync: this); - - WidgetsBinding.instance.addPostFrameCallback((_) { - controller1.repeat( - min: 0, max: 11, period: Duration(milliseconds: 750), reverse: true); - }); - super.initState(); - } - - @override - void dispose() { - controller1.dispose(); - super.dispose(); - } - - @override - Widget build(BuildContext context) { - return Center( - //progress-loading.gif - child: Container( - // margin: EdgeInsets.only(bottom: 40), - child: GifImage( - controller: controller1, - image: AssetImage( - "assets/images/progress-loading-red.gif"), //NetworkImage("http://img.mp.itc.cn/upload/20161107/5cad975eee9e4b45ae9d3c1238ccf91e.jpg"), - ), - )); - } -} +// import 'package:flutter/cupertino.dart'; +// import 'package:flutter_gifimage/flutter_gifimage.dart'; +// +// class GifLoaderContainer extends StatefulWidget { +// @override +// _GifLoaderContainerState createState() => _GifLoaderContainerState(); +// } +// +// class _GifLoaderContainerState extends State +// with TickerProviderStateMixin { +// GifController controller1; +// +// @override +// void initState() { +// controller1 = GifController(vsync: this); +// +// WidgetsBinding.instance.addPostFrameCallback((_) { +// controller1.repeat( +// min: 0, max: 11, period: Duration(milliseconds: 750), reverse: true); +// }); +// super.initState(); +// } +// +// @override +// void dispose() { +// controller1.dispose(); +// super.dispose(); +// } +// +// @override +// Widget build(BuildContext context) { +// return Center( +// //progress-loading.gif +// child: Container( +// // margin: EdgeInsets.only(bottom: 40), +// child: GifImage( +// controller: controller1, +// image: AssetImage( +// "assets/images/progress-loading-red.gif"), //NetworkImage("http://img.mp.itc.cn/upload/20161107/5cad975eee9e4b45ae9d3c1238ccf91e.jpg"), +// ), +// )); +// } +// } diff --git a/lib/widget/loader/gif_loader_dialog_utils.dart b/lib/widget/loader/gif_loader_dialog_utils.dart index 95be0df..97b35b8 100644 --- a/lib/widget/loader/gif_loader_dialog_utils.dart +++ b/lib/widget/loader/gif_loader_dialog_utils.dart @@ -1,11 +1,11 @@ -import 'package:flutter/material.dart'; -import 'gif_loader_container.dart'; -class GifLoaderDialogUtils { - static showMyDialog(BuildContext context) { - showDialog(context: context, builder: (ctx) => GifLoaderContainer()); - } - - static hideDialog(BuildContext context) { - if (Navigator.canPop(context)) Navigator.of(context).pop(); - } -} +// import 'package:flutter/material.dart'; +// import 'gif_loader_container.dart'; +// class GifLoaderDialogUtils { +// static showMyDialog(BuildContext context) { +// showDialog(context: context, builder: (ctx) => GifLoaderContainer()); +// } +// +// static hideDialog(BuildContext context) { +// if (Navigator.canPop(context)) Navigator.of(context).pop(); +// } +// } diff --git a/pubspec.lock b/pubspec.lock index 1611713..05279b0 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -13,10 +13,10 @@ packages: dependency: transitive description: name: audio_session - sha256: e4acc4e9eaa32436dfc5d7aed7f0a370f2d7bb27ee27de30d6c4f220c2a05c73 + sha256: "8a2bc5e30520e18f3fb0e366793d78057fb64cd5287862c76af0c8771f2a52ad" url: "https://pub.dev" source: hosted - version: "0.1.13" + version: "0.1.16" blinking_text: dependency: "direct main" description: @@ -41,14 +41,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.1" - charcode: - dependency: transitive - description: - name: charcode - sha256: fb98c0f6d12c920a02ee2d998da788bca066ca5f148492b7085ee23372b12306 - url: "https://pub.dev" - source: hosted - version: "1.3.1" clock: dependency: transitive description: @@ -101,18 +93,18 @@ packages: dependency: transitive description: name: crypto - sha256: cf75650c66c0316274e21d7c43d3dea246273af5955bd94e8184837cd577575c + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.3" equatable: dependency: transitive description: name: equatable - sha256: c6094fd1efad3046334a9c40bee022147e55c25401ccd89b94e373e3edadd375 + sha256: c2b87cb7756efdf69892005af546c56c0b5037f54d2a88269b4f347a505e3ca2 url: "https://pub.dev" source: hosted - version: "2.0.3" + version: "2.0.5" fake_async: dependency: transitive description: @@ -125,18 +117,10 @@ packages: dependency: transitive description: name: ffi - sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978 - url: "https://pub.dev" - source: hosted - version: "2.0.1" - file: - dependency: transitive - description: - name: file - sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + sha256: ed5337a5660c506388a9f012be0288fb38b49020ce2b45fe1f8b8323fe429f99 url: "https://pub.dev" source: hosted - version: "6.1.4" + version: "2.0.2" flutter: dependency: "direct main" description: flutter @@ -162,10 +146,10 @@ packages: dependency: "direct main" description: name: flutter_svg - sha256: c9bb2757b8a0bbf8e45f4069a90d2b9dbafc80b1a5e28d43e29088be533e6df4 + sha256: "6ff9fa12892ae074092de2fa6a9938fb21dbabfdaa2ff57dc697ff912fc8d4b2" url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "1.1.6" flutter_test: dependency: "direct dev" description: flutter @@ -175,10 +159,10 @@ packages: dependency: "direct main" description: name: flutter_tts - sha256: e91ad17793ad12cca9c3066accf99ceb353bf0355ad06b767176f178b5c428f6 + sha256: "23d47e1335c632228b80d9693e2494a834393fff5893b66e8ae494dcce4e9867" url: "https://pub.dev" source: hosted - version: "3.6.3" + version: "3.8.3" flutter_web_plugins: dependency: transitive description: flutter @@ -188,26 +172,26 @@ packages: dependency: "direct main" description: name: get_it - sha256: "290fde3a86072e4b37dbb03c07bec6126f0ecc28dad403c12ffe2e5a2d751ab7" + sha256: "529de303c739fca98cd7ece5fca500d8ff89649f1bb4b4e94fb20954abcd7468" url: "https://pub.dev" source: hosted - version: "7.2.0" + version: "7.6.0" http: dependency: "direct main" description: name: http - sha256: "2ed163531e071c2c6b7c659635112f24cb64ecbebf6af46b550d536c0b1aa112" + sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2" url: "https://pub.dev" source: hosted - version: "0.13.4" + version: "0.13.6" http_parser: dependency: transitive description: name: http_parser - sha256: e362d639ba3bc07d5a71faebb98cde68c05bfbcfbbb444b60b6f60bb67719185 + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "4.0.2" js: dependency: transitive description: @@ -220,26 +204,26 @@ packages: dependency: "direct main" description: name: just_audio - sha256: "7a5057a4d05c8f88ee968cec6fdfe1015577d5184e591d5ac15ab16d8f5ecb17" + sha256: "5ed0cd723e17dfd8cd4b0253726221e67f6546841ea4553635cf895061fc335b" url: "https://pub.dev" source: hosted - version: "0.9.31" + version: "0.9.35" just_audio_platform_interface: dependency: transitive description: name: just_audio_platform_interface - sha256: eff112d5138bea3ba544b6338b1e0537a32b5e1425e4d0dc38f732771cda7c84 + sha256: d8409da198bbc59426cd45d4c92fca522a2ec269b576ce29459d6d6fcaeb44df url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "4.2.1" just_audio_web: dependency: transitive description: name: just_audio_web - sha256: "89d8db6f19f3821bb6bf908c4bfb846079afb2ab575b783d781a6bf119e3abaf" + sha256: ff62f733f437b25a0ff590f0e295fa5441dcb465f1edbdb33b3dea264705bc13 url: "https://pub.dev" source: hosted - version: "0.4.7" + version: "0.4.8" lints: dependency: transitive description: @@ -252,10 +236,10 @@ packages: dependency: transitive description: name: logging - sha256: "293ae2d49fd79d4c04944c3a26dfd313382d5f52e821ec57119230ae16031ad4" + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.2.0" matcher: dependency: transitive description: @@ -300,114 +284,98 @@ packages: dependency: transitive description: name: path_drawing - sha256: a19347362f85a45aadf6bdfa3c04f18ff6676c445375eecd6251f9e09b9db551 + sha256: bbb1934c0cbb03091af082a6389ca2080345291ef07a5fa6d6e078ba8682f977 url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.0.1" path_parsing: dependency: transitive description: name: path_parsing - sha256: "9508ebdf1c3ac3a68ad5fb15edab8b026382999f18f77352349e56fbd74183ac" + sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.0.1" path_provider: dependency: transitive description: name: path_provider - sha256: "04890b994ee89bfa80bf3080bfec40d5a92c5c7a785ebb02c13084a099d2b6f9" + sha256: a1aa8aaa2542a6bc57e381f132af822420216c80d4781f7aa085ca3229208aaa url: "https://pub.dev" source: hosted - version: "2.0.13" + version: "2.1.1" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: "019f18c9c10ae370b08dce1f3e3b73bc9f58e7f087bb5e921f06529438ac0ae7" + sha256: "6b8b19bd80da4f11ce91b2d1fb931f3006911477cec227cce23d3253d80df3f1" url: "https://pub.dev" source: hosted - version: "2.0.24" + version: "2.2.0" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: "026b97a6c29da75181a37aae2eba9227f5fe13cb2838c6b975ce209328b8ab4e" + sha256: "19314d595120f82aca0ba62787d58dde2cc6b5df7d2f0daf72489e38d1b57f2d" url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.3.1" path_provider_linux: dependency: transitive description: name: path_provider_linux - sha256: "2ae08f2216225427e64ad224a24354221c2c7907e448e6e0e8b57b1eb9f10ad1" + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 url: "https://pub.dev" source: hosted - version: "2.1.10" + version: "2.2.1" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - sha256: "57585299a729335f1298b43245842678cb9f43a6310351b18fb577d6e33165ec" + sha256: "94b1e0dd80970c1ce43d5d4e050a9918fce4f4a775e6142424c30a29a363265c" url: "https://pub.dev" source: hosted - version: "2.0.6" + version: "2.1.1" path_provider_windows: dependency: transitive description: name: path_provider_windows - sha256: f53720498d5a543f9607db4b0e997c4b5438884de25b0f73098cc2671a51b130 + sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" url: "https://pub.dev" source: hosted - version: "2.1.5" + version: "2.2.1" petitparser: dependency: transitive description: name: petitparser - sha256: "1a914995d4ef10c94ff183528c120d35ed43b5eaa8713fc6766a9be4570782e2" + sha256: "49392a45ced973e8d94a85fdb21293fbb40ba805fc49f2965101ae748a3683b4" url: "https://pub.dev" source: hosted - version: "4.4.0" + version: "5.1.0" platform: dependency: transitive description: name: platform - sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" + sha256: ae68c7bfcd7383af3629daafb32fb4e8681c7154428da4febcff06200585f102 url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.2" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - sha256: "075f927ebbab4262ace8d0b283929ac5410c0ac4e7fc123c76429564facfb757" + sha256: da3fdfeccc4d4ff2da8f8c556704c08f912542c5fb3cf2233ed75372384a034d url: "https://pub.dev" source: hosted - version: "2.1.2" - process: - dependency: transitive - description: - name: process - sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" - url: "https://pub.dev" - source: hosted - version: "4.2.4" + version: "2.1.6" provider: dependency: "direct main" description: name: provider - sha256: "7896193cf752c40ba7f7732a95264319a787871e5d628225357f5c909182bc06" + sha256: cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f url: "https://pub.dev" source: hosted - version: "6.0.2" - quiver: - dependency: transitive - description: - name: quiver - sha256: "616b691d1c8f5c53b7b39ce3542f6a25308d7900bf689d0210e72a644a10387e" - url: "https://pub.dev" - source: hosted - version: "3.0.1+1" + version: "6.0.5" rxdart: dependency: transitive description: @@ -437,6 +405,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.9.1" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" sse_client: dependency: transitive description: @@ -489,26 +465,26 @@ packages: dependency: transitive description: name: tuple - sha256: fe3ae4f0dca3f9aac0888e2e0d117b642ce283a82d7017b54136290c0a3b0dd3 + sha256: a97ce2013f240b2f3807bcbaf218765b6f301c3eff91092bcfa23a039e7dd151 url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.0.2" typed_data: dependency: transitive description: name: typed_data - sha256: "53bdf7e979cfbf3e28987552fd72f637e63f3c8724c9e56d9246942dc2fa36ee" + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.3.2" uuid: dependency: transitive description: name: uuid - sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + sha256: e03928880bdbcbf496fb415573f5ab7b1ea99b9b04f669c01104d085893c3134 url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "4.0.0" vector_math: dependency: transitive description: @@ -561,34 +537,34 @@ packages: dependency: transitive description: name: web_socket_channel - sha256: "0c2ada1b1aeb2ad031ca81872add6be049b8cb479262c6ad3c4b0f9c24eaab2f" + sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.4.0" win32: dependency: transitive description: name: win32 - sha256: c9ebe7ee4ab0c2194e65d3a07d8c54c5d00bb001b76081c4a04cdb8448b59e46 + sha256: a6f0236dbda0f63aa9a25ad1ff9a9d8a4eaaa5012da0dc59d21afdb1dc361ca4 url: "https://pub.dev" source: hosted - version: "3.1.3" + version: "3.1.4" xdg_directories: dependency: transitive description: name: xdg_directories - sha256: ee1505df1426458f7f60aac270645098d318a8b4766d85fde75f76f2e21807d1 + sha256: "589ada45ba9e39405c198fe34eb0f607cddb2108527e658136120892beac46d2" url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.0.3" xml: dependency: transitive description: name: xml - sha256: baa23bcba1ba4ce4b22c0c7a1d9c861e7015cb5169512676da0b85138e72840c + sha256: "979ee37d622dec6365e2efa4d906c37470995871fe9ae080d967e192d88286b5" url: "https://pub.dev" source: hosted - version: "5.3.1" + version: "6.2.2" sdks: - dart: ">=2.18.0 <3.0.0" - flutter: ">=3.0.0" + dart: ">=2.19.0 <3.0.0" + flutter: ">=3.7.0" diff --git a/pubspec.yaml b/pubspec.yaml index a21c7a6..73fc1be 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -18,7 +18,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 4.3.5+1 environment: - sdk: ">=2.7.0 <3.0.0" + sdk: ">=2.12.0 <3.0.0" # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions