Merge branch 'development' into 'master'

Development

See merge request Cloud_Solution/doctor_app_flutter!135
merge-requests/137/merge
Mohammad Aljammal 6 years ago
commit b268738f89

@ -6,7 +6,7 @@ const Map<String, Map<String, String>> localizedValues = {
'lanArabic': {'en': 'العربية', 'ar': 'العربية'}, 'lanArabic': {'en': 'العربية', 'ar': 'العربية'},
'doctorReply': {'en': 'Doctor Reply', 'ar': 'رد الطبيب'}, 'doctorReply': {'en': 'Doctor Reply', 'ar': 'رد الطبيب'},
'time': {'en': 'Time', 'ar': 'الوقت'}, 'time': {'en': 'Time', 'ar': 'الوقت'},
'fileNo': {'en': 'File No', 'ar': 'رقم الملف'}, 'fileNo': {'en': 'File No:', 'ar': 'رقم الملف:'},
'mobileNo': {'en': 'Mobile No', 'ar': 'رقم الموبايل'}, 'mobileNo': {'en': 'Mobile No', 'ar': 'رقم الموبايل'},
'messagesScreenToolbarTitle': {'en': 'Messages', 'ar': 'الرسائل'}, 'messagesScreenToolbarTitle': {'en': 'Messages', 'ar': 'الرسائل'},
'mySchedule': {'en': 'My Schedule', 'ar': 'جدولي'}, 'mySchedule': {'en': 'My Schedule', 'ar': 'جدولي'},
@ -14,7 +14,7 @@ const Map<String, Map<String, String>> localizedValues = {
'en': 'You don\'t have any Schedule', 'en': 'You don\'t have any Schedule',
'ar': 'ليس لديك أي جدول زمني' 'ar': 'ليس لديك أي جدول زمني'
}, },
'verify': {'en': 'Verify', 'ar': 'تحقق'}, 'verify': {'en': 'VERIFY', 'ar': 'تحقق'},
'referralDoctor': {'en': 'Referral Doctor', 'ar': 'الطبيب المُحول إليه'}, 'referralDoctor': {'en': 'Referral Doctor', 'ar': 'الطبيب المُحول إليه'},
'referringClinic': {'en': 'Referring Clinic', 'ar': 'العيادة المُحول إليها'}, 'referringClinic': {'en': 'Referring Clinic', 'ar': 'العيادة المُحول إليها'},
'frequency': {'en': 'Frequency', 'ar': 'نوع التحويلا'}, 'frequency': {'en': 'Frequency', 'ar': 'نوع التحويلا'},
@ -51,7 +51,7 @@ const Map<String, Map<String, String>> localizedValues = {
'patientID': {'en': 'Patient ID', 'ar': 'رقم المريض'}, 'patientID': {'en': 'Patient ID', 'ar': 'رقم المريض'},
'patientFile': {'en': 'Patient File', 'ar': 'ملف المريض'}, 'patientFile': {'en': 'Patient File', 'ar': 'ملف المريض'},
'familyMedicine': {'en': 'Family Medicine Clinic', 'ar': 'عيادة طب الأسرة'}, 'familyMedicine': {'en': 'Family Medicine Clinic', 'ar': 'عيادة طب الأسرة'},
'search': {'en': 'Search', 'ar': 'بحث'}, 'search': {'en': 'Search', 'ar': 'بحث '},
'onlyArrivedPatient': { 'onlyArrivedPatient': {
'en': 'Only Arrived Patient', 'en': 'Only Arrived Patient',
'ar': 'المريض الذي حضر للموعد' 'ar': 'المريض الذي حضر للموعد'
@ -60,7 +60,7 @@ const Map<String, Map<String, String>> localizedValues = {
'en': 'Search Medicine Name Here', 'en': 'Search Medicine Name Here',
'ar': 'ابحث عن الدواء هنا' 'ar': 'ابحث عن الدواء هنا'
}, },
'youCanFind': {'en': 'You Can Find', 'ar': 'تستطيع ان تجد '}, 'youCanFind': {'en': 'You Can Find', 'ar': 'تستطيع ان تجد '},
'itemsInSearch': {'en': 'items in search', 'ar': 'عناصر في البحث'}, 'itemsInSearch': {'en': 'items in search', 'ar': 'عناصر في البحث'},
'qrReader': {'en': 'QR Reader', 'ar': 'قارىء رمز الQR'}, 'qrReader': {'en': 'QR Reader', 'ar': 'قارىء رمز الQR'},
'startScanning': {'en': 'Start Scanning', 'ar': 'بدء المسح'}, 'startScanning': {'en': 'Start Scanning', 'ar': 'بدء المسح'},
@ -137,6 +137,7 @@ const Map<String, Map<String, String>> localizedValues = {
'sms': {'en': 'SMS', 'ar': 'رسالة قصيرة'}, 'sms': {'en': 'SMS', 'ar': 'رسالة قصيرة'},
'fingerprint': {'en': 'Fingerprint', 'ar': 'بصمة'}, 'fingerprint': {'en': 'Fingerprint', 'ar': 'بصمة'},
'faceId': {'en': 'Face ID', 'ar': 'معرف الوجه'}, 'faceId': {'en': 'Face ID', 'ar': 'معرف الوجه'},
'whatsAppBy': {'en': 'by WhatsApp', 'ar': 'عن طريق واتس اب'},
'whatsApp': {'en': 'WhatsApp', 'ar': 'واتس اب'}, 'whatsApp': {'en': 'WhatsApp', 'ar': 'واتس اب'},
'pleaseChoose': { 'pleaseChoose': {
'en': 'Please choose one of the Following option to verify', 'en': 'Please choose one of the Following option to verify',
@ -157,4 +158,57 @@ const Map<String, Map<String, String>> localizedValues = {
'en': 'Please enter the code', 'en': 'Please enter the code',
'ar': 'الرجاء ادخال الرمز' 'ar': 'الرجاء ادخال الرمز'
}, },
'youDon\'tHaveAnyPatient': {
'en': 'You don\'t have any patient',
'ar': 'ليس لديك اي مرضى'
},
'age': {'en': 'Age', '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': 'تواتر الحالة:'},
'clinicalDetailsAndRemarks': {
'en': 'Clinical Details and Remarks',
'ar': 'التفاصيل السرسرية والملاحظات'
},
'remarks': {'en': 'Remarks', 'ar': 'ملاحظات'},
'pleaseFill': {
'en': 'Please fill all fields..!',
'ar': 'الرجاء ملأ جميع الحقول..!'
},
'replay2': {'en': 'Replay', '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': ' الطلبات'},
'searchOrders': {'en': 'Search Orders', 'ar': ' بحث عن الطلبات'},
'prescriptionDetails': {'en': 'Prescription Details', 'ar': 'تفاصبل الوصفة'},
'prescriptionInfo': {'en': 'Prescription Info', 'ar': 'معلومات الوصفة'},
'errorNoOrders': {
'en': 'You don\'t have any Orders',
'ar': 'لا يوجد لديك اي طلبات'
},
}; };

@ -13,8 +13,16 @@ const PATIENT_TYPE = const [
]; ];
const LOCATIONS = const [ const LOCATIONS = const [
{"text": "In Sudia Arabia", "val": "1"}, {
{"text": "Out Sudia Arabia", "val": "2"}, "text": "In Saudi Arabia",
"text-ar": "داخل المملكة العربية السعودية",
"val": "1"
},
{
"text": "Out Saudi Arabia",
"text-ar": "خارج المملكة العربية السعودية",
"val": "2"
},
]; ];
enum vitalSignDetails { enum vitalSignDetails {

@ -20,57 +20,58 @@ const GET_DOC_PROFILES = 'Doctors.svc/REST/GetDocProfiles';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
enum APP_STATUS { LOADING, UNAUTHENTICATED, AUTHENTICATED } enum APP_STATUS { LOADING, UNAUTHENTICATED, AUTHENTICATED }
class AuthProvider with ChangeNotifier { class AuthProvider with ChangeNotifier {
List <ClinicModel>doctorsClinicList=[]; List<ClinicModel> doctorsClinicList = [];
bool isLogin= false; String selectedClinicName;
bool isLogin = false;
bool isLoading = true; bool isLoading = true;
AuthProvider(){ AuthProvider() {
getUserAuthentication(); getUserAuthentication();
} }
void getUserAuthentication() async{ void getUserAuthentication() async {
Map profile = await sharedPref.getObj(DOCTOR_PROFILE); Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
if(profile != null) if (profile != null) {
{ isLoading = false;
isLoading = false; isLogin = true;
isLogin = true; } else {
} else { isLoading = false;
isLoading = false; isLogin = false;
isLogin = false;
} }
notifyListeners(); notifyListeners();
} }
APP_STATUS get stutas { APP_STATUS get stutas {
if (isLoading) { if (isLoading) {
return APP_STATUS.LOADING; return APP_STATUS.LOADING;
} else{ } else {
if ( this.isLogin) { if (this.isLogin) {
return APP_STATUS.AUTHENTICATED; return APP_STATUS.AUTHENTICATED;
} else { } else {
return APP_STATUS.UNAUTHENTICATED; return APP_STATUS.UNAUTHENTICATED;
} }
} }
} }
Future<dynamic> login(UserModel userInfo) async { Future<dynamic> login(UserModel userInfo) async {
try { try {
dynamic localRes; dynamic localRes;
await BaseAppClient.post(LOGIN_URL, await BaseAppClient.post(LOGIN_URL,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error; throw error;
}, body: { }, body: {
"UserID": userInfo.UserID, "UserID": userInfo.UserID,
"Password": userInfo.Password, "Password": userInfo.Password,
"ProjectID": userInfo.ProjectID, "ProjectID": userInfo.ProjectID,
"LanguageID": userInfo.LanguageID, "LanguageID": userInfo.LanguageID,
"IPAdress": userInfo.IPAdress, "IPAdress": userInfo.IPAdress,
"VersionID": userInfo.VersionID, "VersionID": userInfo.VersionID,
"Channel": userInfo.Channel, "Channel": userInfo.Channel,
"SessionID": userInfo.SessionID "SessionID": userInfo.SessionID
}); });
return Future.value(localRes); return Future.value(localRes);
} catch (error) { } catch (error) {
@ -85,10 +86,10 @@ class AuthProvider with ChangeNotifier {
await BaseAppClient.post(INSERT_DEVICE_IMEI, await BaseAppClient.post(INSERT_DEVICE_IMEI,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error; throw error;
}, body: imei); }, body: imei);
return Future.value(localRes); return Future.value(localRes);
} catch (error) { } catch (error) {
print(error); print(error);
@ -101,10 +102,10 @@ class AuthProvider with ChangeNotifier {
dynamic localRes; dynamic localRes;
await BaseAppClient.post(SELECT_DEVICE_IMEI, await BaseAppClient.post(SELECT_DEVICE_IMEI,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error; throw error;
}, body: imei); }, body: imei);
return Future.value(localRes); return Future.value(localRes);
} catch (error) { } catch (error) {
print(error); print(error);
@ -112,16 +113,15 @@ class AuthProvider with ChangeNotifier {
} }
} }
Future sendActivationCodeByOtpNotificationType( Future sendActivationCodeByOtpNotificationType(activationCodeModel) async {
activationCodeModel) async {
try { try {
var localRes; var localRes;
await BaseAppClient.post(SEND_ACTIVATION_CODE_BY_OTP_NOTIFICATION_TYPE, await BaseAppClient.post(SEND_ACTIVATION_CODE_BY_OTP_NOTIFICATION_TYPE,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error; throw error;
}, body: activationCodeModel); }, body: activationCodeModel);
return Future.value(localRes); return Future.value(localRes);
} catch (error) { } catch (error) {
print(error); print(error);
@ -134,15 +134,16 @@ class AuthProvider with ChangeNotifier {
dynamic localRes; dynamic localRes;
await BaseAppClient.post(MEMBER_CHECK_ACTIVATION_CODE_NEW, await BaseAppClient.post(MEMBER_CHECK_ACTIVATION_CODE_NEW,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
selectedClinicName =
response['List_DoctorsClinic'].forEach((v) { ClinicModel.fromJson(response['List_DoctorsClinic'][0]).clinicName;
doctorsClinicList.add(new ClinicModel.fromJson(v)); notifyListeners();
}); response['List_DoctorsClinic'].forEach((v) {
doctorsClinicList.add(new ClinicModel.fromJson(v));
}, onFailure: (String error, int statusCode) { });
throw error; }, onFailure: (String error, int statusCode) {
}, body: activationCodeModel); throw error;
}, body: activationCodeModel);
return Future.value(localRes); return Future.value(localRes);
} catch (error) { } catch (error) {
print(error); print(error);
@ -162,16 +163,17 @@ class AuthProvider with ChangeNotifier {
dynamic localRes; dynamic localRes;
await BaseAppClient.post(GET_DOC_PROFILES, await BaseAppClient.post(GET_DOC_PROFILES,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { //ClinicDescription
throw error; selectedClinicName = response['DoctorProfileList'][0]['ClinicDescription'];
}, body: docInfo); notifyListeners();
}, onFailure: (String error, int statusCode) {
throw error;
}, body: docInfo);
return Future.value(localRes); return Future.value(localRes);
} catch (error) { } catch (error) {
print(error); print(error);
throw error; throw error;
} }
} }
} }

@ -8,6 +8,7 @@ import 'package:doctor_app_flutter/providers/auth_provider.dart';
import 'package:doctor_app_flutter/providers/doctor_reply_provider.dart'; import 'package:doctor_app_flutter/providers/doctor_reply_provider.dart';
import 'package:doctor_app_flutter/providers/hospital_provider.dart'; import 'package:doctor_app_flutter/providers/hospital_provider.dart';
import 'package:doctor_app_flutter/providers/medicine_provider.dart'; import 'package:doctor_app_flutter/providers/medicine_provider.dart';
import 'package:doctor_app_flutter/providers/project_provider.dart';
import 'package:doctor_app_flutter/providers/referral_patient_provider.dart'; import 'package:doctor_app_flutter/providers/referral_patient_provider.dart';
import 'package:doctor_app_flutter/providers/referred_patient_provider.dart'; import 'package:doctor_app_flutter/providers/referred_patient_provider.dart';
import 'package:doctor_app_flutter/screens/medicine/medicine_search_screen.dart'; import 'package:doctor_app_flutter/screens/medicine/medicine_search_screen.dart';
@ -46,11 +47,13 @@ class _DashboardScreenState extends State<DashboardScreen> {
HospitalProvider hospitalProvider; HospitalProvider hospitalProvider;
AuthProvider authProvider; AuthProvider authProvider;
bool isLoading = false; bool isLoading = false;
ProjectProvider projectsProvider;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
hospitalProvider = Provider.of(context); hospitalProvider = Provider.of(context);
authProvider = Provider.of(context); authProvider = Provider.of(context);
projectsProvider = Provider.of(context);
print(authProvider.doctorsClinicList); print(authProvider.doctorsClinicList);
FocusScopeNode currentFocus = FocusScope.of(context); FocusScopeNode currentFocus = FocusScope.of(context);
if (!currentFocus.hasPrimaryFocus) { if (!currentFocus.hasPrimaryFocus) {
@ -74,7 +77,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
Container( Container(
margin: EdgeInsets.only(left: 10, top: 10), margin: EdgeInsets.only(left: 10, top: 10),
child: AppText( child: AppText(
TranslationBase.of(context).familyMedicine, authProvider.selectedClinicName != null?authProvider.selectedClinicName:'',
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.5, fontSize: SizeConfig.textMultiplier * 2.5,
), ),
@ -101,7 +104,9 @@ class _DashboardScreenState extends State<DashboardScreen> {
TranslationBase.of(context).todayStatistics, TranslationBase.of(context).todayStatistics,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
alignment: Alignment.centerLeft, alignment: projectsProvider.isArabic
? Alignment.topRight
: Alignment.topLeft,
), ),
Expanded( Expanded(
flex: 3, flex: 3,
@ -149,10 +154,11 @@ class _DashboardScreenState extends State<DashboardScreen> {
CrossAxisAlignment.stretch, CrossAxisAlignment.stretch,
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: DashboardItemTexts( child: DashboardItemTexts(
TranslationBase.of(context).arrived, TranslationBase.of(context).arrived,
"23", "23",
)), ),
),
Expanded( Expanded(
child: DashboardItemTexts( child: DashboardItemTexts(
TranslationBase.of(context) TranslationBase.of(context)
@ -227,7 +233,9 @@ class _DashboardScreenState extends State<DashboardScreen> {
Expanded( Expanded(
flex: 2, flex: 2,
child: new DashboardItemIconText( child: new DashboardItemIconText(
DoctorApp.in_patient_white, "23", "In-Patient", DoctorApp.in_patient_white,
"23",
TranslationBase.of(context).outPatients,
showBorder: true, showBorder: true,
backgroundColor: Colors.red[900], backgroundColor: Colors.red[900],
iconColor: Colors.white), iconColor: Colors.white),
@ -238,7 +246,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
//widget.iconURL + 'operations.svg', //widget.iconURL + 'operations.svg',
DoctorApp.operations, DoctorApp.operations,
"23", "23",
TranslationBase.of(context).operations, TranslationBase.of(context).inPatient,
showBorder: true, showBorder: true,
backgroundColor: Colors.red[900], backgroundColor: Colors.red[900],
)), )),

@ -23,36 +23,38 @@ import 'package:provider/provider.dart';
*@desc: Doctor Reply Screen display data from GtMyPatientsQuestions service *@desc: Doctor Reply Screen display data from GtMyPatientsQuestions service
*/ */
class DoctorReplyScreen extends StatelessWidget { class DoctorReplyScreen extends StatelessWidget {
DoctorReplyProvider _doctorReplyProvider; DoctorReplyProvider _doctorReplyProvider;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
_doctorReplyProvider = Provider.of(context); _doctorReplyProvider = Provider.of(context);
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).doctorReply, appBarTitle: TranslationBase.of(context).replay2,
body:_doctorReplyProvider.isLoading? DrAppCircularProgressIndeicator(): body: _doctorReplyProvider.isLoading
_doctorReplyProvider.isError? Center( ? DrAppCircularProgressIndeicator()
child: Text( : _doctorReplyProvider.isError
_doctorReplyProvider.error, ? Center(
style: TextStyle(color: Theme.of(context).errorColor), child: Text(
), _doctorReplyProvider.error,
): style: TextStyle(color: Theme.of(context).errorColor),
Container( ),
padding: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 0), )
child: ListView( : Container(
children: [ padding: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 0),
Column( child: ListView(
crossAxisAlignment: CrossAxisAlignment.start, children: [
mainAxisAlignment: MainAxisAlignment.spaceBetween, Column(
children: _doctorReplyProvider.listDoctorWorkingHoursTable.map((reply) { crossAxisAlignment: CrossAxisAlignment.start,
return DoctorReplyWidget( reply: reply); mainAxisAlignment: MainAxisAlignment.spaceBetween,
}).toList(), children: _doctorReplyProvider
) .listDoctorWorkingHoursTable
], .map((reply) {
), return DoctorReplyWidget(reply: reply);
), }).toList(),
)
],
),
),
); );
} }
} }

@ -13,6 +13,7 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:maps_launcher/maps_launcher.dart'; import 'package:maps_launcher/maps_launcher.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
DrAppSharedPreferances sharedPref = DrAppSharedPreferances(); DrAppSharedPreferances sharedPref = DrAppSharedPreferances();
@ -50,173 +51,185 @@ class _PharmaciesListState extends State<PharmaciesListScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: "Pharmacies List", appBarTitle: TranslationBase.of(context).pharmaciesList,
body: Container( body: Container(
height: SizeConfig.screenHeight, height: SizeConfig.screenHeight,
child: ListView( child: ListView(
shrinkWrap: true, shrinkWrap: true,
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
physics: const AlwaysScrollableScrollPhysics(), physics: const AlwaysScrollableScrollPhysics(),
children: <Widget>[ children: <Widget>[
RoundedContainer( RoundedContainer(
child: !_medicineProvider.isFinished child: !_medicineProvider.isFinished
? DrAppCircularProgressIndeicator() ? DrAppCircularProgressIndeicator()
: _medicineProvider.hasError : _medicineProvider.hasError
? Center( ? Center(
child: Text( child: Text(
_medicineProvider.errorMsg, _medicineProvider.errorMsg,
style: style: TextStyle(
TextStyle(color: Theme.of(context).errorColor), color: Theme.of(context).errorColor),
), ),
) )
: StreamBuilder<Object>( : StreamBuilder<Object>(
stream: null, stream: null,
builder: (context, snapshot) { builder: (context, snapshot) {
return Row( return Row(
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
flex: 1, flex: 1,
child: ClipRRect( child: ClipRRect(
borderRadius: borderRadius: BorderRadius.all(
BorderRadius.all(Radius.circular(7)), Radius.circular(7)),
child: Image.memory( child: Image.memory(
dataFromBase64String(widget.url), dataFromBase64String(widget.url),
height: SizeConfig.imageSizeMultiplier * 21, height:
width: SizeConfig.imageSizeMultiplier * 20, SizeConfig.imageSizeMultiplier *
fit: BoxFit.cover, 21,
), width:
), SizeConfig.imageSizeMultiplier *
), 20,
Expanded( fit: BoxFit.cover,
flex: 3, ),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.stretch,
children: <Widget>[
AppText(
"Description",
marginLeft: 10,
marginTop: 0,
marginRight: 10,
marginBottom: 2,
fontWeight: FontWeight.bold,
),
AppText(
_data[0]["ItemDescription"],
marginLeft: 10,
marginTop: 0,
marginRight: 10,
marginBottom: 10,
),
AppText(
"Price",
marginLeft: 10,
marginTop: 0,
marginRight: 10,
marginBottom: 2,
fontWeight: FontWeight.bold,
), ),
AppText( ),
_data[0]["SellingPrice"].toString(), Expanded(
marginLeft: 10, flex: 3,
marginTop: 0, child: Column(
marginRight: 10, mainAxisAlignment:
marginBottom: 10, MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.stretch,
children: <Widget>[
AppText(
TranslationBase.of(context)
.description,
marginLeft: 10,
marginTop: 0,
marginRight: 10,
marginBottom: 2,
fontWeight: FontWeight.bold,
),
AppText(
_data[0]["ItemDescription"],
marginLeft: 10,
marginTop: 0,
marginRight: 10,
marginBottom: 10,
),
AppText(
TranslationBase.of(context).price,
marginLeft: 10,
marginTop: 0,
marginRight: 10,
marginBottom: 2,
fontWeight: FontWeight.bold,
),
AppText(
_data[0]["SellingPrice"]
.toString(),
marginLeft: 10,
marginTop: 0,
marginRight: 10,
marginBottom: 10,
),
],
), ),
], )
],
);
})),
Container(
margin: EdgeInsets.only(
top: SizeConfig.widthMultiplier * 2,
bottom: SizeConfig.widthMultiplier * 2,
right: SizeConfig.widthMultiplier * 4,
left: SizeConfig.widthMultiplier * 4,
),
child: Align(
alignment: Alignment.centerLeft,
child: AppText(
TranslationBase.of(context).youCanFindItIn,
fontWeight: FontWeight.bold,
))),
Expanded(
child: Container(
width: SizeConfig.screenWidth * 0.99,
child: ListView.builder(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemCount: _data == null ? 0 : _data.length,
itemBuilder: (BuildContext context, int index) {
return RoundedContainer(
child: Row(
children: <Widget>[
Expanded(
flex: 1,
child: ClipRRect(
borderRadius:
BorderRadius.all(Radius.circular(7)),
child: Image.network(
_data[index]["ProjectImageURL"],
height:
SizeConfig.imageSizeMultiplier * 15,
width:
SizeConfig.imageSizeMultiplier * 15,
fit: BoxFit.cover,
), ),
) ),
],
);
})),
Container(
margin: EdgeInsets.only(top:SizeConfig.widthMultiplier * 2,
bottom: SizeConfig.widthMultiplier * 2,
right: SizeConfig.widthMultiplier * 4,
left: SizeConfig.widthMultiplier * 4,),
child: Align(
alignment: Alignment.centerLeft,
child: AppText(
"You can Find it in",
fontWeight: FontWeight.bold,
))),
Expanded(
child: Container(
width: SizeConfig.screenWidth * 0.99,
child: ListView.builder(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics() ,
itemCount: _data == null ? 0 : _data.length,
itemBuilder: (BuildContext context, int index) {
return RoundedContainer(
child: Row(
children: <Widget>[
Expanded(
flex: 1,
child: ClipRRect(
borderRadius:
BorderRadius.all(Radius.circular(7)),
child: Image.network(
_data[index]["ProjectImageURL"],
height: SizeConfig.imageSizeMultiplier * 15,
width: SizeConfig.imageSizeMultiplier * 15,
fit: BoxFit.cover,
), ),
), Expanded(
), flex: 4,
Expanded( child: AppText(
flex: 4, _data[index]["LocationDescription"],
child: AppText( margin: 10,
_data[index]["LocationDescription"],
margin: 10,
),
),
Expanded(
flex: 2,
child: Wrap(
direction: Axis.horizontal,
alignment: WrapAlignment.end,
crossAxisAlignment: WrapCrossAlignment.end,
children: <Widget>[
Padding(
padding: EdgeInsets.all(5),
child: InkWell(
child: Icon(
Icons.call,
color: Colors.red,
),
onTap: () => launch(
"tel://" + _data[index]["PhoneNumber"]),
),
), ),
Padding( ),
padding: EdgeInsets.all(5), Expanded(
child: InkWell( flex: 2,
child: Icon( child: Wrap(
Icons.pin_drop, direction: Axis.horizontal,
color: Colors.red, alignment: WrapAlignment.end,
crossAxisAlignment: WrapCrossAlignment.end,
children: <Widget>[
Padding(
padding: EdgeInsets.all(5),
child: InkWell(
child: Icon(
Icons.call,
color: Colors.red,
),
onTap: () => launch("tel://" +
_data[index]["PhoneNumber"]),
),
), ),
onTap: () { Padding(
MapsLauncher.launchCoordinates( padding: EdgeInsets.all(5),
double.parse( child: InkWell(
_data[index]["Latitude"]), child: Icon(
double.parse( Icons.pin_drop,
_data[index]["Longitude"]), color: Colors.red,
_data[index]["LocationDescription"]); ),
}, onTap: () {
), MapsLauncher.launchCoordinates(
double.parse(
_data[index]["Latitude"]),
double.parse(
_data[index]["Longitude"]),
_data[index]
["LocationDescription"]);
},
),
),
],
), ),
], ),
), ],
), ),
], );
), }),
); ),
}), )
), ]),
)
]),
)); ));
} }

@ -9,6 +9,7 @@ import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.d
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
class OutPatientPrescriptionDetailsScreen extends StatefulWidget { class OutPatientPrescriptionDetailsScreen extends StatefulWidget {
final PrescriptionResModel prescriptionResModel; final PrescriptionResModel prescriptionResModel;
@ -45,7 +46,7 @@ class _OutPatientPrescriptionDetailsScreenState
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: 'Prescription Details', appBarTitle: TranslationBase.of(context).prescriptionDetails,
body: patientsProvider.isLoading body: patientsProvider.isLoading
? DrAppCircularProgressIndeicator() ? DrAppCircularProgressIndeicator()
: patientsProvider.isError : patientsProvider.isError
@ -63,5 +64,3 @@ class _OutPatientPrescriptionDetailsScreenState
); );
} }
} }

@ -40,6 +40,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
String error = ''; String error = '';
ProjectProvider projectsProvider; ProjectProvider projectsProvider;
String itemText = ''; String itemText = '';
String itemText2 = '';
final GlobalKey<FormState> _formKey = GlobalKey<FormState>(); final GlobalKey<FormState> _formKey = GlobalKey<FormState>();
bool _autoValidate = false; bool _autoValidate = false;
@ -379,12 +380,19 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
return Row( return Row(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: <Widget>[ children: <Widget>[
AppText( !projectsProvider.isArabic
item['text'], ? AppText(
fontSize: item['text'],
SizeConfig.textMultiplier * fontSize: SizeConfig
2.1, .textMultiplier *
), 2.1,
)
: AppText(
item['text-ar'],
fontSize: SizeConfig
.textMultiplier *
2.1,
)
], ],
); );
}).toList(); }).toList();
@ -395,9 +403,12 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
}) })
}, },
items: LOCATIONS.map((item) { items: LOCATIONS.map((item) {
!projectsProvider.isArabic
? itemText2 = item['text']
: itemText2 = item['text-ar'];
return DropdownMenuItem( return DropdownMenuItem(
child: Text( child: Text(
'${item['text']}', itemText2,
textAlign: TextAlign.end, textAlign: TextAlign.end,
), ),
value: item['val'], value: item['val'],

@ -29,6 +29,7 @@ import 'package:hexcolor/hexcolor.dart';
import '../../widgets/shared/app_scaffold_widget.dart'; import '../../widgets/shared/app_scaffold_widget.dart';
import '../../widgets/shared/card_with_bg_widget.dart'; import '../../widgets/shared/card_with_bg_widget.dart';
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
class PatientsScreen extends StatefulWidget { class PatientsScreen extends StatefulWidget {
@override @override
@ -52,7 +53,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
final String assetName = 'assets/image.svg'; final String assetName = 'assets/image.svg';
// List<String> _locations = ['Today', 'Old Date', 'YESTERDAY']; // List<String> _locations = ['Today', 'Old Date', 'YESTERDAY'];
List<String> _locations = ['All','Today', 'Tomorrow', 'Next Week']; List<String> _locations = ['All', 'Today', 'Tomorrow', 'Next Week'];
int _activeLocation = 0; int _activeLocation = 0;
bool _isInit = true; bool _isInit = true;
@ -267,22 +268,22 @@ class _PatientsScreenState extends State<PatientsScreen> {
if ((currentTime.year == checkedTime.year) && if ((currentTime.year == checkedTime.year) &&
(currentTime.month == checkedTime.month) && (currentTime.month == checkedTime.month) &&
(currentTime.day == checkedTime.day)) { (currentTime.day == checkedTime.day)) {
return "Today"; return TranslationBase.of(context).today;
} else if ((currentTime.year == checkedTime.year) && } else if ((currentTime.year == checkedTime.year) &&
(currentTime.month == checkedTime.month)) { (currentTime.month == checkedTime.month)) {
if ((currentTime.day - checkedTime.day) == 1) { if ((currentTime.day - checkedTime.day) == 1) {
return "YESTERDAY"; return TranslationBase.of(context).yesterday;
} else if ((currentTime.day - checkedTime.day) == -1) { } else if ((currentTime.day - checkedTime.day) == -1) {
return "Tomorrow"; return TranslationBase.of(context).tomorrow;
} }
if ((currentTime.day - checkedTime.day) <= -2) { if ((currentTime.day - checkedTime.day) <= -2) {
return "Next Week"; return TranslationBase.of(context).nextWeek;
} else { } else {
return "All"; return TranslationBase.of(context).all;
} }
} }
return "All"; return TranslationBase.of(context).all;
} }
/* /*
@ -304,7 +305,8 @@ class _PatientsScreenState extends State<PatientsScreen> {
: _isError : _isError
? DrAppEmbeddedError(error: error) ? DrAppEmbeddedError(error: error)
: litems == null : litems == null
? DrAppEmbeddedError(error: 'You don\'t have any patient') ? DrAppEmbeddedError(
error: TranslationBase.of(context).youDontHaveAnyPatient)
: Container( : Container(
child: ListView( child: ListView(
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
@ -347,7 +349,9 @@ class _PatientsScreenState extends State<PatientsScreen> {
this.searchData(str); this.searchData(str);
}, },
decoration: buildInputDecoration( decoration: buildInputDecoration(
context, 'Search '), context,
TranslationBase.of(context)
.search),
), ),
), ),
SizedBox( SizedBox(
@ -383,28 +387,49 @@ class _PatientsScreenState extends State<PatientsScreen> {
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment MainAxisAlignment
.start, .start,
children: <Widget>[ children: <
Widget>[
Container( Container(
decoration: BoxDecoration( decoration:
BoxDecoration(
gradient: LinearGradient( gradient: LinearGradient(
begin: Alignment(-1, -1), begin: Alignment(
end: Alignment(1, 1), -1,
-1),
end: Alignment(
1,
1),
colors: [ colors: [
Colors.grey[100], Colors.grey[100],
Colors.grey[200], Colors.grey[200],
]), ]),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Color.fromRGBO(0, 0, 0, 0.08), color: Color.fromRGBO(
offset: Offset(0.0, 5.0), 0,
blurRadius: 16.0) 0,
0,
0.08),
offset: Offset(0.0,
5.0),
blurRadius:
16.0)
], ],
borderRadius: BorderRadius.all(Radius.circular(50.0)), borderRadius:
BorderRadius.all(
Radius.circular(50.0)),
), ),
width: 80, width: 80,
height: 80, height: 80,
child: Icon(item.genderDescription == "Male" ? DoctorApp.male : DoctorApp.femaleicon,size: 80,)), child: Icon(
item.genderDescription ==
"Male"
? DoctorApp
.male
: DoctorApp
.femaleicon,
size: 80,
)),
], ],
), ),
SizedBox( SizedBox(
@ -434,7 +459,9 @@ class _PatientsScreenState extends State<PatientsScreen> {
height: 8, height: 8,
), ),
AppText( AppText(
"File Number:" + TranslationBase.of(
context)
.fileNo +
item.patientId item.patientId
.toString(), .toString(),
fontSize: 2.0 * fontSize: 2.0 *
@ -452,7 +479,9 @@ class _PatientsScreenState extends State<PatientsScreen> {
// height: 8, // height: 8,
// ), // ),
AppText( AppText(
"Age:" + TranslationBase.of(
context)
.age +
item.age item.age
.toString(), .toString(),
fontSize: 2.0 * fontSize: 2.0 *

@ -85,7 +85,8 @@ class _InsuranceApprovalsState extends State<InsuranceApprovalsScreen> {
? DrAppEmbeddedError(error: patientsProv.error) ? DrAppEmbeddedError(error: patientsProv.error)
: patientsProv.insuranceApporvalsList == null : patientsProv.insuranceApporvalsList == null
? DrAppEmbeddedError( ? DrAppEmbeddedError(
error: 'You don\'t have any Insurance Approvals') error:
TranslationBase.of(context).errorNoInsuranceApprovals)
: Column( : Column(
children: <Widget>[ children: <Widget>[
Container( Container(
@ -97,7 +98,9 @@ class _InsuranceApprovalsState extends State<InsuranceApprovalsScreen> {
this.searchData(str); this.searchData(str);
}, },
decoration: buildInputDecoration( decoration: buildInputDecoration(
context, 'Search Insurance Approvals'), context,
TranslationBase.of(context)
.searchInsuranceApprovals),
), ),
), ),
Expanded( Expanded(
@ -231,7 +234,8 @@ class _InsuranceApprovalsState extends State<InsuranceApprovalsScreen> {
marginBottom: 2, marginBottom: 2,
), ),
AppText( AppText(
"Approval No:", TranslationBase.of(context)
.approvalNo,
color: Colors.white, color: Colors.white,
fontSize: 16, fontSize: 16,
marginTop: 2, marginTop: 2,
@ -249,7 +253,9 @@ class _InsuranceApprovalsState extends State<InsuranceApprovalsScreen> {
.start, .start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
"PRODUCER NAME", TranslationBase.of(
context)
.producerName,
fontSize: 10, fontSize: 10,
color: color:
Colors.white, Colors.white,
@ -291,7 +297,9 @@ class _InsuranceApprovalsState extends State<InsuranceApprovalsScreen> {
.start, .start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
"STATUS", TranslationBase.of(
context)
.status,
fontSize: 10, fontSize: 10,
color: color:
Colors.white, Colors.white,
@ -329,7 +337,9 @@ class _InsuranceApprovalsState extends State<InsuranceApprovalsScreen> {
.start, .start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
"RECEIPT ON", TranslationBase.of(
context)
.receiptOn,
fontSize: 10, fontSize: 10,
color: color:
Colors.white, Colors.white,
@ -372,7 +382,9 @@ class _InsuranceApprovalsState extends State<InsuranceApprovalsScreen> {
.start, .start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
"EXPIRY DATE", TranslationBase.of(
context)
.expiryDate,
fontSize: 10, fontSize: 10,
color: color:
Colors.white, Colors.white,

@ -14,13 +14,14 @@ import '../../../util/dr_app_shared_pref.dart';
import '../../../widgets/shared/app_scaffold_widget.dart'; import '../../../widgets/shared/app_scaffold_widget.dart';
import '../../../widgets/shared/app_texts_widget.dart'; import '../../../widgets/shared/app_texts_widget.dart';
import '../../../widgets/shared/dr_app_circular_progress_Indeicator.dart'; import '../../../widgets/shared/dr_app_circular_progress_Indeicator.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
/* /*
*@author: ibrahim albitar *@author: ibrahim albitar
*@Date:21/5/2020 *@Date:21/5/2020
*@param: *@param:
*@return: *@return:
*@desc: *@desc:
*/ */
@ -37,10 +38,10 @@ class _PatientsOrdersState extends State<PatientsOrdersScreen> {
final _controller = TextEditingController(); final _controller = TextEditingController();
var _isInit = true; var _isInit = true;
/* /*
*@author: ibrahim al bitar *@author: ibrahim al bitar
*@Date:21/5/2020 *@Date:21/5/2020
*@param: *@param:
*@return: *@return:
*@desc: *@desc:
*/ */
@ -75,14 +76,14 @@ class _PatientsOrdersState extends State<PatientsOrdersScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: "Orders", appBarTitle: TranslationBase.of(context).orders,
body: patientsProv.isLoading body: patientsProv.isLoading
? DrAppCircularProgressIndeicator() ? DrAppCircularProgressIndeicator()
: patientsProv.isError : patientsProv.isError
? DrAppEmbeddedError(error: patientsProv.error) ? DrAppEmbeddedError(error: patientsProv.error)
: notesList == null : notesList == null
? DrAppEmbeddedError( ? DrAppEmbeddedError(
error: 'You don\'t have any Orders') error: TranslationBase.of(context).errorNoOrders)
: Column( : Column(
children: <Widget>[ children: <Widget>[
Container( Container(
@ -93,8 +94,8 @@ class _PatientsOrdersState extends State<PatientsOrdersScreen> {
onChanged: (String str) { onChanged: (String str) {
this.searchData(str); this.searchData(str);
}, },
decoration: decoration: buildInputDecoration(context,
buildInputDecoration(context, 'Search Orders'), TranslationBase.of(context).searchOrders),
), ),
), ),
Expanded( Expanded(
@ -116,7 +117,8 @@ class _PatientsOrdersState extends State<PatientsOrdersScreen> {
ExpansionTile( ExpansionTile(
title: Container( title: Container(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
notesList[index] notesList[index]
@ -138,12 +140,12 @@ class _PatientsOrdersState extends State<PatientsOrdersScreen> {
), ),
children: <Widget>[ children: <Widget>[
Divider( Divider(
color: Colors.black, color: Colors.black,
height: 20, height: 20,
thickness: 1, thickness: 1,
indent: 0, indent: 0,
endIndent: 0, endIndent: 0,
), ),
AppText( AppText(
notesList[index]["Notes"], notesList[index]["Notes"],
margin: 5, margin: 5,

@ -7,6 +7,7 @@ import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
class InpatientPrescriptionDetailsScreen extends StatefulWidget { class InpatientPrescriptionDetailsScreen extends StatefulWidget {
@override @override
@ -40,7 +41,7 @@ class _InpatientPrescriptionDetailsScreenState
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: 'Prescription info', appBarTitle: TranslationBase.of(context).prescriptionInfo,
body: CardWithBgWidgetNew( body: CardWithBgWidgetNew(
widget: Container( widget: Container(
child: ListView( child: ListView(

@ -3,6 +3,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
class RadiologyReportScreen extends StatelessWidget { class RadiologyReportScreen extends StatelessWidget {
final String reportData; final String reportData;
@ -12,26 +13,22 @@ class RadiologyReportScreen extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: "Radiology Report", appBarTitle: TranslationBase.of(context).radiologyReport,
body: Container( body: Container(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
margin: EdgeInsets.all(10), margin: EdgeInsets.all(10),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: borderRadius: BorderRadius.all(Radius.circular(10)),
BorderRadius.all(Radius.circular(10)),
color: Colors.white, color: Colors.white,
border: Border( border: Border(
bottom: BorderSide( bottom: BorderSide(color: Colors.grey, width: 0.5),
color: Colors.grey, width: 0.5), top: BorderSide(color: Colors.grey, width: 0.5),
top: BorderSide( left: BorderSide(color: Colors.grey, width: 0.5),
color: Colors.grey, width: 0.5), right: BorderSide(color: Colors.grey, width: 0.5),
left: BorderSide(
color: Colors.grey, width: 0.5),
right: BorderSide(
color: Colors.grey, width: 0.5),
), ),
), ),
child: AppText(reportData, child: AppText(
reportData,
fontSize: 2.5 * SizeConfig.textMultiplier, fontSize: 2.5 * SizeConfig.textMultiplier,
), ),
), ),

@ -16,6 +16,7 @@ import '../../../widgets/shared/app_scaffold_widget.dart';
import '../../../widgets/shared/app_texts_widget.dart'; import '../../../widgets/shared/app_texts_widget.dart';
import '../../../widgets/shared/dr_app_circular_progress_Indeicator.dart'; import '../../../widgets/shared/dr_app_circular_progress_Indeicator.dart';
import '../../../util/extenstions.dart'; import '../../../util/extenstions.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
@ -48,8 +49,7 @@ class _ReferPatientState extends State<ReferPatientScreen> {
String _selectedDoctor; String _selectedDoctor;
String _selectedReferralFrequancy; String _selectedReferralFrequancy;
List<String> _priorities = ['Very Urgent', 'Urgent', 'Routine']; int _activePriority = 1;
int _activePriority = 2;
FocusNode myFocusNode; FocusNode myFocusNode;
@ -69,7 +69,7 @@ class _ReferPatientState extends State<ReferPatientScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: "Refer Patient", appBarTitle: TranslationBase.of(context).myReferralPatient,
body: patientsProv.isLoading body: patientsProv.isLoading
? DrAppCircularProgressIndeicator() ? DrAppCircularProgressIndeicator()
: patientsProv.isError : patientsProv.isError
@ -82,7 +82,7 @@ class _ReferPatientState extends State<ReferPatientScreen> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
"Clinic", TranslationBase.of(context).clinic,
fontSize: 18, fontSize: 18,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
marginLeft: 15, marginLeft: 15,
@ -166,7 +166,7 @@ class _ReferPatientState extends State<ReferPatientScreen> {
), ),
//--------------------------------------------------------------------// //--------------------------------------------------------------------//
AppText( AppText(
"Doctor", TranslationBase.of(context).doctor,
fontSize: 18, fontSize: 18,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
marginLeft: 15, marginLeft: 15,
@ -246,7 +246,7 @@ class _ReferPatientState extends State<ReferPatientScreen> {
), ),
), //-----------------------------/// ), //-----------------------------///
AppText( AppText(
"Ext#", TranslationBase.of(context).ext,
fontSize: 18, fontSize: 18,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
marginLeft: 15, marginLeft: 15,
@ -255,7 +255,7 @@ class _ReferPatientState extends State<ReferPatientScreen> {
Padding( Padding(
padding: const EdgeInsets.all(10.0), padding: const EdgeInsets.all(10.0),
child: AppTextFormField( child: AppTextFormField(
hintText: "Ext#", hintText: TranslationBase.of(context).ext,
controller: _extController, controller: _extController,
inputFormatter: ONLY_NUMBERS, inputFormatter: ONLY_NUMBERS,
textInputType: TextInputType.number, textInputType: TextInputType.number,
@ -263,7 +263,7 @@ class _ReferPatientState extends State<ReferPatientScreen> {
), ),
), ),
AppText( AppText(
"Priority", TranslationBase.of(context).priority,
fontSize: 18, fontSize: 18,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
marginLeft: 15, marginLeft: 15,
@ -273,14 +273,15 @@ class _ReferPatientState extends State<ReferPatientScreen> {
priorityBar(context), priorityBar(context),
AppText( AppText(
"Replay Before: " + getPriority(), TranslationBase.of(context).referralFrequency +
getPriority(),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
marginLeft: 15, marginLeft: 15,
marginTop: 15, marginTop: 15,
), ),
AppText( AppText(
"Referral Frequency", TranslationBase.of(context).referralFrequency,
fontSize: 18, fontSize: 18,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
marginLeft: 15, marginLeft: 15,
@ -338,7 +339,7 @@ class _ReferPatientState extends State<ReferPatientScreen> {
_selectedReferralFrequancy)); _selectedReferralFrequancy));
freqId = freqInfo['ParameterCode'] freqId = freqInfo['ParameterCode']
.toString(); .toString();
myFocusNode.requestFocus(); myFocusNode.requestFocus();
}) })
}, },
items: patientsProv items: patientsProv
@ -359,7 +360,7 @@ class _ReferPatientState extends State<ReferPatientScreen> {
), ),
), ),
AppText( AppText(
"Clinical Details and Remarks", TranslationBase.of(context).clinicDetailsandRemarks,
fontSize: 18, fontSize: 18,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
marginLeft: 15, marginLeft: 15,
@ -368,7 +369,7 @@ class _ReferPatientState extends State<ReferPatientScreen> {
Padding( Padding(
padding: const EdgeInsets.all(10.0), padding: const EdgeInsets.all(10.0),
child: AppTextFormField( child: AppTextFormField(
hintText: "Remarks", hintText: TranslationBase.of(context).remarks,
focusNode: myFocusNode, focusNode: myFocusNode,
controller: _remarksController, controller: _remarksController,
inputFormatter: ONLY_LETTERS, inputFormatter: ONLY_LETTERS,
@ -381,7 +382,7 @@ class _ReferPatientState extends State<ReferPatientScreen> {
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
AppText( AppText(
"Please fill all fields..!", TranslationBase.of(context).pleaseFill,
color: Colors.red, color: Colors.red,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
margin: 10, margin: 10,
@ -389,7 +390,7 @@ class _ReferPatientState extends State<ReferPatientScreen> {
isValid == null ? false : !isValid, isValid == null ? false : !isValid,
), ),
AppButton( AppButton(
title: "Send", title: TranslationBase.of(context).send,
color: Color(PRIMARY_COLOR), color: Color(PRIMARY_COLOR),
onPressed: () => {referToDoctor(context)}, onPressed: () => {referToDoctor(context)},
) )
@ -402,6 +403,11 @@ class _ReferPatientState extends State<ReferPatientScreen> {
} }
Widget priorityBar(BuildContext _context) { Widget priorityBar(BuildContext _context) {
List<String> _priorities = [
TranslationBase.of(context).veryUrgent,
TranslationBase.of(context).urgent,
TranslationBase.of(context).routine,
];
return Container( return Container(
height: MediaQuery.of(context).size.height * 0.065, height: MediaQuery.of(context).size.height * 0.065,
width: SizeConfig.screenWidth * 0.9, width: SizeConfig.screenWidth * 0.9,

@ -95,7 +95,8 @@ class _VitalSignDetailsScreenState extends State<VitalSignDetailsScreen> {
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
BODY_MEASUREMENTS, BODY_MEASUREMENTS,
arguments: { arguments: {
'title': 'Body Measurements', 'title': TranslationBase.of(context)
.bodyMeasurements,
'key': 'key':
vitalSignDetails.bodyMeasurements vitalSignDetails.bodyMeasurements
}); });
@ -118,7 +119,8 @@ class _VitalSignDetailsScreenState extends State<VitalSignDetailsScreen> {
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
BODY_MEASUREMENTS, BODY_MEASUREMENTS,
arguments: { arguments: {
'title': 'Temperature', 'title': TranslationBase.of(context)
.temperature,
'key': vitalSignDetails.temperature, 'key': vitalSignDetails.temperature,
}); });
}, },
@ -144,7 +146,8 @@ class _VitalSignDetailsScreenState extends State<VitalSignDetailsScreen> {
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
BODY_MEASUREMENTS, BODY_MEASUREMENTS,
arguments: { arguments: {
'title': 'pulse', 'title':
TranslationBase.of(context).pulse,
'key': vitalSignDetails.pulse 'key': vitalSignDetails.pulse
}); });
}, },
@ -163,7 +166,8 @@ class _VitalSignDetailsScreenState extends State<VitalSignDetailsScreen> {
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
BODY_MEASUREMENTS, BODY_MEASUREMENTS,
arguments: { arguments: {
'title': 'pespiration', 'title': TranslationBase.of(context)
.respiration,
'key': vitalSignDetails.pespiration 'key': vitalSignDetails.pespiration
}); });
}, },
@ -187,7 +191,8 @@ class _VitalSignDetailsScreenState extends State<VitalSignDetailsScreen> {
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
BODY_MEASUREMENTS, BODY_MEASUREMENTS,
arguments: { arguments: {
'title': 'Blood Pressure', 'title': TranslationBase.of(context)
.bloodPressure,
'key': vitalSignDetails.bloodPressure 'key': vitalSignDetails.bloodPressure
}); });
}, },
@ -207,7 +212,8 @@ class _VitalSignDetailsScreenState extends State<VitalSignDetailsScreen> {
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
BODY_MEASUREMENTS, BODY_MEASUREMENTS,
arguments: { arguments: {
'title': 'Oxygenation', 'title': TranslationBase.of(context)
.oxygenation,
'key': vitalSignDetails.oxygenation 'key': vitalSignDetails.oxygenation
}); });
}, },
@ -231,7 +237,8 @@ class _VitalSignDetailsScreenState extends State<VitalSignDetailsScreen> {
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
BODY_MEASUREMENTS, BODY_MEASUREMENTS,
arguments: { arguments: {
'title': 'Pain Scale', 'title': TranslationBase.of(context)
.painScale,
'key': vitalSignDetails.painScale 'key': vitalSignDetails.painScale
}); });
}, },

@ -68,7 +68,7 @@ class TranslationBase {
String get radiology => localizedValues['radiology'][locale.languageCode]; String get radiology => localizedValues['radiology'][locale.languageCode];
String get referral => localizedValues['referral'][locale.languageCode]; String get referral => localizedValues['referral'][locale.languageCode];
String get inPatient => localizedValues['inPatient'][locale.languageCode]; String get inPatient => localizedValues['inPatient'][locale.languageCode];
String get operations => localizedValues['inPatient'][locale.languageCode]; String get operations => localizedValues['operations'][locale.languageCode];
String get patientServices => String get patientServices =>
localizedValues['patientServices'][locale.languageCode]; localizedValues['patientServices'][locale.languageCode];
String get searchMedicine => String get searchMedicine =>
@ -164,6 +164,7 @@ class TranslationBase {
String get fingerprint => localizedValues['fingerprint'][locale.languageCode]; String get fingerprint => localizedValues['fingerprint'][locale.languageCode];
String get faceId => localizedValues['faceId'][locale.languageCode]; String get faceId => localizedValues['faceId'][locale.languageCode];
String get whatsApp => localizedValues['whatsApp'][locale.languageCode]; String get whatsApp => localizedValues['whatsApp'][locale.languageCode];
String get whatsAppBy => localizedValues['whatsAppBy'][locale.languageCode];
String get pleaseChoose => String get pleaseChoose =>
localizedValues['pleaseChoose'][locale.languageCode]; localizedValues['pleaseChoose'][locale.languageCode];
String get choose => localizedValues['choose'][locale.languageCode]; String get choose => localizedValues['choose'][locale.languageCode];
@ -179,6 +180,56 @@ class TranslationBase {
String get smsBy => localizedValues['smsBy'][locale.languageCode]; String get smsBy => localizedValues['smsBy'][locale.languageCode];
String get pleaseEnterTheCode => String get pleaseEnterTheCode =>
localizedValues['pleaseEnterTheCode'][locale.languageCode]; localizedValues['pleaseEnterTheCode'][locale.languageCode];
String get youDontHaveAnyPatient =>
localizedValues['youDon\'tHaveAnyPatient'][locale.languageCode];
String get age => localizedValues['age'][locale.languageCode];
String get today => localizedValues['today'][locale.languageCode];
String get tomorrow => localizedValues['tomorrow'][locale.languageCode];
String get all => localizedValues['all'][locale.languageCode];
String get nextWeek => localizedValues['nextWeek'][locale.languageCode];
String get yesterday => localizedValues['yesterday'][locale.languageCode];
String get errorNoInsuranceApprovals =>
localizedValues['errorNoInsuranceApprovals'][locale.languageCode];
String get searchInsuranceApprovals =>
localizedValues['searchInsuranceApprovals'][locale.languageCode];
String get status => localizedValues['status'][locale.languageCode];
String get expiryDate => localizedValues['expiryDate'][locale.languageCode];
String get producerName =>
localizedValues['producerName'][locale.languageCode];
String get receiptOn => localizedValues['receiptOn'][locale.languageCode];
String get approvalNo => localizedValues['approvalNo'][locale.languageCode];
String get doctor => localizedValues['doctor'][locale.languageCode];
String get ext => localizedValues['ext'][locale.languageCode];
String get veryUrgent => localizedValues['veryUrgent'][locale.languageCode];
String get urgent => localizedValues['urgent'][locale.languageCode];
String get routine => localizedValues['routine'][locale.languageCode];
String get send => localizedValues['send'][locale.languageCode];
String get referralFrequency =>
localizedValues['referralFrequency'][locale.languageCode];
String get clinicalDetailsAndRemarks =>
localizedValues['clinicalDetailsAndRemarks'][locale.languageCode];
String get remarks => localizedValues['remarks'][locale.languageCode];
String get pleaseFill => localizedValues['pleaseFill'][locale.languageCode];
String get replay2 => localizedValues['replay2'][locale.languageCode];
String get outPatient => localizedValues['outPatient'][locale.languageCode];
String get logout => localizedValues['logout'][locale.languageCode];
String get pharmaciesList =>
localizedValues['pharmaciesList'][locale.languageCode];
String get price => localizedValues['price'][locale.languageCode];
String get youCanFindItIn =>
localizedValues['youCanFindItIn'][locale.languageCode];
String get radiologyReport =>
localizedValues['radiologyReport'][locale.languageCode];
String get orders => localizedValues['orders'][locale.languageCode];
String get searchOrders =>
localizedValues['searchOrders'][locale.languageCode];
String get prescriptionDetails =>
localizedValues['prescriptionDetails'][locale.languageCode];
String get prescriptionInfo =>
localizedValues['prescriptionInfo'][locale.languageCode];
String get errorNoOrders =>
localizedValues['errorNoOrders'][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -300,8 +300,8 @@ class _LoginFormState extends State<LoginForm> {
try { try {
platformImei = platformImei =
await ImeiPlugin.getImei(shouldShowRequestPermissionRationale: false); await ImeiPlugin.getImei(shouldShowRequestPermissionRationale: false);
idunique = await ImeiPlugin.getId(); idunique = await ImeiPlugin.getImei();
} on PlatformException { } catch(e) {
platformImei = 'Failed to get platform version.'; platformImei = 'Failed to get platform version.';
} }

@ -206,7 +206,7 @@ class _VerifyAccountState extends State<VerifyAccount> {
height: 50, height: 50,
child: Center( child: Center(
child: Text( child: Text(
'Verfiy'.toUpperCase(), TranslationBase.of(context).verify,
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontSize: fontSize:
@ -293,7 +293,7 @@ class _VerifyAccountState extends State<VerifyAccount> {
medthodName = TranslationBase.of(context).smsBy; medthodName = TranslationBase.of(context).smsBy;
break; break;
case 2: case 2:
medthodName = TranslationBase.of(context).whatsApp; medthodName = TranslationBase.of(context).whatsAppBy;
break; break;
default: default:
} }

@ -1,3 +1,6 @@
import 'package:doctor_app_flutter/providers/project_provider.dart';
import 'package:provider/provider.dart';
import '../shared/rounded_container_widget.dart'; import '../shared/rounded_container_widget.dart';
import '../shared/app_texts_widget.dart'; import '../shared/app_texts_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -17,18 +20,23 @@ class DashboardItemTexts extends StatefulWidget {
{this.backgroundColor = Colors.white, {this.backgroundColor = Colors.white,
this.showBorder = false, this.showBorder = false,
this.borderColor = Colors.white}); this.borderColor = Colors.white});
@override @override
_DashboardItemTextsState createState() => _DashboardItemTextsState(); _DashboardItemTextsState createState() => _DashboardItemTextsState();
} }
class _DashboardItemTextsState extends State<DashboardItemTexts> { class _DashboardItemTextsState extends State<DashboardItemTexts> {
ProjectProvider projectsProvider;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectsProvider = Provider.of(context);
return new RoundedContainer( return new RoundedContainer(
child: Stack( child: Stack(
children: <Widget>[ children: <Widget>[
Align( Align(
alignment: FractionalOffset.topLeft, alignment: projectsProvider.isArabic
? FractionalOffset.topRight
: FractionalOffset.topLeft,
child: Container( child: Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
child: AppText( child: AppText(
@ -37,7 +45,9 @@ class _DashboardItemTextsState extends State<DashboardItemTexts> {
), ),
)), )),
Align( Align(
alignment: FractionalOffset.bottomRight, alignment: projectsProvider.isArabic
? FractionalOffset.bottomLeft
: FractionalOffset.bottomRight,
child: Container( child: Container(
margin: EdgeInsets.all(10), margin: EdgeInsets.all(10),
child: AppText( child: AppText(

@ -72,7 +72,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
key: key, key: key,
patient: patient, patient: patient,
route: REFER_PATIENT, route: REFER_PATIENT,
name: 'Refer Patient', name: TranslationBase.of(context).myReferralPatient,
icon: 'note.png')), icon: 'note.png')),
Visibility( Visibility(
visible: selectedPatientType != 0 && selectedPatientType != 5, visible: selectedPatientType != 0 && selectedPatientType != 5,
@ -80,7 +80,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
key: key, key: key,
patient: patient, patient: patient,
route: PATIENT_ORDERS, route: PATIENT_ORDERS,
name: 'Orders', name: TranslationBase.of(context).orders,
icon: 'radiology-1.png')), icon: 'radiology-1.png')),
]); ]);
} }

@ -13,6 +13,7 @@ import '../../widgets/shared/drawer_item_widget.dart';
import '../../widgets/shared/rounded_container_widget.dart'; import '../../widgets/shared/rounded_container_widget.dart';
import 'app_texts_widget.dart'; import 'app_texts_widget.dart';
import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
@ -100,7 +101,7 @@ class _AppDrawerState extends State<AppDrawer> {
borderRadius: BorderRadius.circular(18.0), borderRadius: BorderRadius.circular(18.0),
side: BorderSide(color: Colors.red)), side: BorderSide(color: Colors.red)),
child: AppText( child: AppText(
'Logout', TranslationBase.of(context).logout,
color: Colors.white, color: Colors.white,
), ),
onPressed: () async { onPressed: () async {
@ -122,14 +123,16 @@ class _AppDrawerState extends State<AppDrawer> {
), ),
), ),
InkWell( InkWell(
child: DrawerItem("Settings", Icons.settings), child: DrawerItem(
TranslationBase.of(context).settings, Icons.settings),
onTap: () { onTap: () {
Navigator.pop(context); Navigator.pop(context);
Navigator.of(context).pushNamed(SETTINGS); Navigator.of(context).pushNamed(SETTINGS);
}, },
), ),
InkWell( InkWell(
child: DrawerItem("QR Reader", DoctorApp.qr_code), child: DrawerItem(
TranslationBase.of(context).qrReader, DoctorApp.qr_code),
onTap: () { onTap: () {
Navigator.pop(context); Navigator.pop(context);
Navigator.of(context).pushNamed(QR_READER); Navigator.of(context).pushNamed(QR_READER);

@ -3,6 +3,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'bottom_navigation_item.dart'; import 'bottom_navigation_item.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
class BottomNavBar extends StatefulWidget { class BottomNavBar extends StatefulWidget {
final ValueChanged<int> changeIndex; final ValueChanged<int> changeIndex;
@ -41,7 +42,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
changeIndex: _changeIndex, changeIndex: _changeIndex,
index: _index, index: _index,
currentIndex: 0, currentIndex: 0,
name: 'HOME', name: TranslationBase.of(context).home,
), ),
BottomNavigationItem( BottomNavigationItem(
icon: DoctorApp.message_icon, icon: DoctorApp.message_icon,
@ -49,7 +50,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
changeIndex: _changeIndex, changeIndex: _changeIndex,
index: _index, index: _index,
currentIndex: 1, currentIndex: 1,
name: 'REPLAY', name: TranslationBase.of(context).replay2,
), ),
BottomNavigationItem( BottomNavigationItem(
icon: DoctorApp.schedule_icon, icon: DoctorApp.schedule_icon,
@ -57,7 +58,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
changeIndex: _changeIndex, changeIndex: _changeIndex,
index: _index, index: _index,
currentIndex: 2, currentIndex: 2,
name: 'SCHEDULE', name: TranslationBase.of(context).mySchedule,
), ),
BottomNavigationItem( BottomNavigationItem(
icon: DoctorApp.menu_icon, icon: DoctorApp.menu_icon,
@ -65,7 +66,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
changeIndex: _changeIndex, changeIndex: _changeIndex,
index: _index, index: _index,
currentIndex: 3, currentIndex: 3,
name: 'SERVICES', name: TranslationBase.of(context).services,
) )
], ],
), ),

Loading…
Cancel
Save