Merge branch 'development' into 'master'

Development

See merge request Cloud_Solution/doctor_app_flutter!124
merge-requests/126/head
Mohammad Aljammal 6 years ago
commit d31515d441

@ -41,7 +41,7 @@ class BaseAppClient {
body['DoctorID'] = doctorProfile?.doctorID; body['DoctorID'] = doctorProfile?.doctorID;
body['EditedBy'] = doctorProfile?.doctorID; body['EditedBy'] = doctorProfile?.doctorID;
body['ProjectID'] = doctorProfile?.projectID; body['ProjectID'] = doctorProfile?.projectID;
// if (!body.containsKey('ClinicID')) if (body['ClinicID'] == null)
body['ClinicID'] = doctorProfile?.clinicID; body['ClinicID'] = doctorProfile?.clinicID;
} }
body['TokenID'] = token ?? ''; body['TokenID'] = token ?? '';

@ -56,4 +56,61 @@ const Map<String, Map<String, String>> localizedValues = {
'en': 'Only Arrived Patient', 'en': 'Only Arrived Patient',
'ar': 'المريض الذي حضر للموعد' 'ar': 'المريض الذي حضر للموعد'
}, },
'searchMedicineNameHere': {
'en': 'Search Medicine Name Here',
'ar': 'ابحث عن الدواء هنا'
},
'youCanFind': {'en': 'You Can Find', 'ar': 'تستطيع ان تجد '},
'itemsInSearch': {'en': 'items in search', 'ar': 'عناصر في البحث'},
'qrReader': {'en': 'QR Reader', 'ar': 'قارىء رمز الQR'},
'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 Sign', 'ar': 'المؤشرات الحيوية'},
'labOrder': {'en': 'Lab Order', 'ar': 'نتائج التحاليل'},
'prescription': {'en': 'Prescription', 'ar': 'الوصفات'},
'insuranceApprovals': {'en': 'Insurance 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': 'Replay', 'ar': 'تاكيد'},
'progressNote': {'en': 'Progress 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': 'النطاق'},
}; };

@ -1,11 +1,15 @@
const PATIENT_TYPE = const [ const PATIENT_TYPE = const [
{"text": "outPatiant", "val": "0"}, {"text": "outPatiant", "text_ar": "المريض الخارجي", "val": "0"},
{"text": "InPatiant", "val": "1"}, {"text": "InPatiant", "text_ar": "المريض المنوم", "val": "1"},
{"text": "Discharge", "val": "2"}, {"text": "Discharge", "text_ar": "المريض المعافى", "val": "2"},
{"text": "Referrd", "val": "3"}, {"text": "Referrd", "text_ar": "المريض المحول الي", "val": "3"},
{"text": "Referral Discharge", "val": "4"}, {
{"text": "Tomorrow Patient", "val": "5"}, "text": "Referral Discharge",
{"text": "Referral", "val": "6"}, "text_ar": "المريض المحال المعافى",
"val": "4"
},
{"text": "Tomorrow Patient", "text_ar": "مريض الغد", "val": "5"},
{"text": "Referral", "text_ar": "المريض المحول مني", "val": "6"},
]; ];
const LOCATIONS = const [ const LOCATIONS = const [

@ -0,0 +1,183 @@
/*
*@author: Amjad Amireh
*@Date:15/6/2020
*@param:
*@return:
*@desc: Find list of pending patients Model
*/
import 'dart:convert';
ListPendingPatientListModel listPendingPatientListModelFromJson(String str) => ListPendingPatientListModel.fromJson(json.decode(str));
String listPendingPatientListModelToJson(ListPendingPatientListModel data) => json.encode(data.toJson());
class ListPendingPatientListModel {
ListPendingPatientListModel({
this.acceptedBy,
this.acceptedOn,
this.age,
this.appointmentNo,
this.arrivalTime,
this.arrivalTimeD,
this.callStatus,
this.clientRequestId,
this.clinicName,
this.consoltationEnd,
this.consultationNotes,
this.createdOn,
this.dateOfBirth,
this.deviceToken,
this.deviceType,
this.doctorName,
this.editOn,
this.gender,
this.isFollowUp,
this.isFromVida,
this.isLoginB,
this.isOutKsa,
this.isRejected,
this.language,
this.latitude,
this.longitude,
this.mobileNumber,
this.openSession,
this.openTokenId,
this.patientId,
this.patientName,
this.patientStatus,
this.preferredLanguage,
this.projectId,
this.scoring,
this.serviceId,
this.tokenId,
this.vcId,
this.voipToken,
});
dynamic acceptedBy;
dynamic acceptedOn;
int age;
dynamic appointmentNo;
String arrivalTime;
String arrivalTimeD;
int callStatus;
String clientRequestId;
String clinicName;
dynamic consoltationEnd;
dynamic consultationNotes;
dynamic createdOn;
DateTime dateOfBirth;
String deviceToken;
String deviceType;
dynamic doctorName;
String editOn;
String gender;
bool isFollowUp;
dynamic isFromVida;
int isLoginB;
bool isOutKsa;
int isRejected;
String language;
double latitude;
double longitude;
String mobileNumber;
dynamic openSession;
dynamic openTokenId;
String patientId;
String patientName;
int patientStatus;
String preferredLanguage;
int projectId;
int scoring;
int serviceId;
dynamic tokenId;
int vcId;
String voipToken;
factory ListPendingPatientListModel.fromJson(Map<String, dynamic> json) => ListPendingPatientListModel(
acceptedBy: json["AcceptedBy"],
acceptedOn: json["AcceptedOn"],
age: json["Age"],
appointmentNo: json["AppointmentNo"],
arrivalTime: json["ArrivalTime"],
arrivalTimeD: json["ArrivalTimeD"],
callStatus: json["CallStatus"],
clientRequestId: json["ClientRequestID"],
clinicName: json["ClinicName"],
consoltationEnd: json["ConsoltationEnd"],
consultationNotes: json["ConsultationNotes"],
createdOn: json["CreatedOn"],
dateOfBirth: DateTime.parse(json["DateOfBirth"]),
deviceToken: json["DeviceToken"],
deviceType: json["DeviceType"],
doctorName: json["DoctorName"],
editOn: json["EditOn"],
gender: json["Gender"],
isFollowUp: json["IsFollowUP"],
isFromVida: json["IsFromVida"],
isLoginB: json["IsLoginB"],
isOutKsa: json["IsOutKSA"],
isRejected: json["IsRejected"],
language: json["Language"],
latitude: json["Latitude"].toDouble(),
longitude: json["Longitude"].toDouble(),
mobileNumber: json["MobileNumber"],
openSession: json["OpenSession"],
openTokenId: json["OpenTokenID"],
patientId: json["PatientID"],
patientName: json["PatientName"],
patientStatus: json["PatientStatus"],
preferredLanguage: json["PreferredLanguage"],
projectId: json["ProjectID"],
scoring: json["Scoring"],
serviceId: json["ServiceID"],
tokenId: json["TokenID"],
vcId: json["VC_ID"],
voipToken: json["VoipToken"],
);
Map<String, dynamic> toJson() => {
"AcceptedBy": acceptedBy,
"AcceptedOn": acceptedOn,
"Age": age,
"AppointmentNo": appointmentNo,
"ArrivalTime": arrivalTime,
"ArrivalTimeD": arrivalTimeD,
"CallStatus": callStatus,
"ClientRequestID": clientRequestId,
"ClinicName": clinicName,
"ConsoltationEnd": consoltationEnd,
"ConsultationNotes": consultationNotes,
"CreatedOn": createdOn,
"DateOfBirth": "${dateOfBirth.year.toString().padLeft(4, '0')}-${dateOfBirth.month.toString().padLeft(2, '0')}-${dateOfBirth.day.toString().padLeft(2, '0')}",
"DeviceToken": deviceToken,
"DeviceType": deviceType,
"DoctorName": doctorName,
"EditOn": editOn,
"Gender": gender,
"IsFollowUP": isFollowUp,
"IsFromVida": isFromVida,
"IsLoginB": isLoginB,
"IsOutKSA": isOutKsa,
"IsRejected": isRejected,
"Language": language,
"Latitude": latitude,
"Longitude": longitude,
"MobileNumber": mobileNumber,
"OpenSession": openSession,
"OpenTokenID": openTokenId,
"PatientID": patientId,
"PatientName": patientName,
"PatientStatus": patientStatus,
"PreferredLanguage": preferredLanguage,
"ProjectID": projectId,
"Scoring": scoring,
"ServiceID": serviceId,
"TokenID": tokenId,
"VC_ID": vcId,
"VoipToken": voipToken,
};
}
// To parse this JSON data, do
//
// final listPendingPatientListModel = listPendingPatientListModelFromJson(jsonString);

@ -1,4 +1,5 @@
import 'package:doctor_app_flutter/client/base_app_client.dart'; import 'package:doctor_app_flutter/client/base_app_client.dart';
import 'package:doctor_app_flutter/models/clinic_model.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -21,7 +22,7 @@ enum APP_STATUS { LOADING, UNAUTHENTICATED, AUTHENTICATED }
class AuthProvider with ChangeNotifier { class AuthProvider with ChangeNotifier {
List <ClinicModel>doctorsClinicList=[];
bool isLogin= false; bool isLogin= false;
bool isLoading = true; bool isLoading = true;
AuthProvider(){ AuthProvider(){
@ -134,6 +135,11 @@ class AuthProvider with ChangeNotifier {
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;
response['List_DoctorsClinic'].forEach((v) {
doctorsClinicList.add(new ClinicModel.fromJson(v));
});
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error; throw error;
}, body: activationCodeModel); }, body: activationCodeModel);

@ -15,6 +15,7 @@ import 'package:doctor_app_flutter/widgets/shared/card_with_bg_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';
import '../routes.dart'; import '../routes.dart';
@ -55,7 +56,7 @@ class _QrReaderScreenState extends State<QrReaderScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: "QR Reader", appBarTitle: TranslationBase.of(context).qrReader,
body: Center( body: Center(
child: Container( child: Container(
margin: EdgeInsets.only(top: SizeConfig.realScreenHeight / 7), margin: EdgeInsets.only(top: SizeConfig.realScreenHeight / 7),
@ -64,7 +65,7 @@ class _QrReaderScreenState extends State<QrReaderScreen> {
child: ListView( child: ListView(
children: [ children: [
AppText( AppText(
'Start Scanning', TranslationBase.of(context).startScanning,
fontSize: 18, fontSize: 18,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
textAlign: TextAlign.center, textAlign: TextAlign.center,
@ -72,12 +73,10 @@ class _QrReaderScreenState extends State<QrReaderScreen> {
SizedBox( SizedBox(
height: 7, height: 7,
), ),
AppText( AppText(TranslationBase.of(context).scanQrCode,
'scan Qr code to retrieve patient profile',
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
textAlign: TextAlign.center textAlign: TextAlign.center),
),
SizedBox( SizedBox(
height: 15, height: 15,
), ),
@ -92,24 +91,31 @@ class _QrReaderScreenState extends State<QrReaderScreen> {
onTap: () { onTap: () {
_scanQrAndGetPatient(context); _scanQrAndGetPatient(context);
}, },
title: 'Scan Qr', title: TranslationBase.of(context).scanQr,
loading: isLoading, loading: isLoading,
icon: Image.asset('assets/images/qr_code_white.png'), icon: Image.asset('assets/images/qr_code_white.png'),
), ),
isError ? Container( isError
margin: EdgeInsets.only(top: 8), ? Container(
decoration: BoxDecoration( margin: EdgeInsets.only(top: 8),
borderRadius: BorderRadius.circular(6.0), decoration: BoxDecoration(
color: Theme.of(context).errorColor.withOpacity(0.06), borderRadius: BorderRadius.circular(6.0),
), color: Theme.of(context).errorColor.withOpacity(0.06),
padding: EdgeInsets.symmetric(vertical: 8.0, horizontal: 12.0), ),
child: Row( padding: EdgeInsets.symmetric(
children: <Widget>[ vertical: 8.0, horizontal: 12.0),
Expanded(child: AppText(error ?? "Something went wrong.", color: Theme.of(context).errorColor)), child: Row(
], children: <Widget>[
), Expanded(
):Container(), child: AppText(
error ??
TranslationBase.of(context)
.errorMessage,
color: Theme.of(context).errorColor)),
],
),
)
: Container(),
], ],
), ),
), ),
@ -118,7 +124,6 @@ class _QrReaderScreenState extends State<QrReaderScreen> {
); );
} }
_scanQrAndGetPatient(BuildContext context) async { _scanQrAndGetPatient(BuildContext context) async {
/// When give qr we will change this method to get data /// When give qr we will change this method to get data
/// var result = await BarcodeScanner.scan(); /// var result = await BarcodeScanner.scan();
@ -151,7 +156,8 @@ class _QrReaderScreenState extends State<QrReaderScreen> {
case "0": case "0":
if (response['List_MyOutPatient'] != null) { if (response['List_MyOutPatient'] != null) {
setState(() { setState(() {
patientList = ModelResponse.fromJson(response['List_MyOutPatient']).list; patientList =
ModelResponse.fromJson(response['List_MyOutPatient']).list;
isLoading = false; isLoading = false;
}); });
Navigator.of(context).pushNamed(PATIENTS_PROFILE, arguments: { Navigator.of(context).pushNamed(PATIENTS_PROFILE, arguments: {
@ -168,7 +174,8 @@ class _QrReaderScreenState extends State<QrReaderScreen> {
case "1": case "1":
if (response['List_MyInPatient'] != null) { if (response['List_MyInPatient'] != null) {
setState(() { setState(() {
patientList = ModelResponse.fromJson(response['List_MyInPatient']).list; patientList =
ModelResponse.fromJson(response['List_MyInPatient']).list;
isLoading = false; isLoading = false;
error = ""; error = "";
}); });
@ -189,10 +196,10 @@ class _QrReaderScreenState extends State<QrReaderScreen> {
isLoading = false; isLoading = false;
isError = true; isError = true;
}); });
DrAppToastMsg.showErrorToast(response['ErrorEndUserMessage'] ?? response['ErrorMessage']); DrAppToastMsg.showErrorToast(
response['ErrorEndUserMessage'] ?? response['ErrorMessage']);
} }
}).catchError((error){ }).catchError((error) {
setState(() { setState(() {
isLoading = false; isLoading = false;
}); });

@ -9,6 +9,7 @@ class ChangePasswordScreen extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
isShowAppBar: false,
body: SafeArea( body: SafeArea(
child: ListView(children: <Widget>[ child: ListView(children: <Widget>[
Container( Container(

@ -12,8 +12,8 @@ import '../../widgets/auth/login_form.dart';
import '../../widgets/shared/app_scaffold_widget.dart'; import '../../widgets/shared/app_scaffold_widget.dart';
import '../../widgets/shared/dr_app_circular_progress_Indeicator.dart'; import '../../widgets/shared/dr_app_circular_progress_Indeicator.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
class Loginsreen extends StatefulWidget { class Loginsreen extends StatefulWidget {
@override @override
_LoginsreenState createState() => _LoginsreenState(); _LoginsreenState createState() => _LoginsreenState();
@ -56,10 +56,10 @@ class _LoginsreenState extends State<Loginsreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
getSharedPref(); getSharedPref();
return AppScaffold( return AppScaffold(
isLoading: _isLoading, isLoading: _isLoading,
isShowAppBar: false,
body: SafeArea( body: SafeArea(
child: ListView(children: <Widget>[ child: ListView(children: <Widget>[
FutureBuilder( FutureBuilder(
@ -80,24 +80,24 @@ class _LoginsreenState extends State<Loginsreen> {
children: <Widget>[ children: <Widget>[
(platformImei == null) (platformImei == null)
? Column( ? Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AuthHeader(loginType.knownUser), AuthHeader(loginType.knownUser),
LoginForm( LoginForm(
changeLoadingStata: changeLoadingStata:
changeLoadingStata, changeLoadingStata,
), ),
], ],
) )
: Column( : Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AuthHeader(loginType.unknownUser), AuthHeader(loginType.unknownUser),
KnownUserLogin(), KnownUserLogin(),
], ],
), ),
])); ]));
} }
} }

@ -38,6 +38,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
isLoading: _isLoading, isLoading: _isLoading,
isShowAppBar: false,
body: ListView(children: <Widget>[ body: ListView(children: <Widget>[
Container( Container(
margin: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 0), margin: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 0),

@ -30,6 +30,7 @@ class _VerifyAccountScreenState extends State<VerifyAccountScreen> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
isLoading: _isLoading, isLoading: _isLoading,
isShowAppBar: false,
body: SafeArea( body: SafeArea(
child: ListView(children: <Widget>[ child: ListView(children: <Widget>[
Container( Container(

@ -1,28 +1,36 @@
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/models/clinic_model.dart';
import 'package:doctor_app_flutter/models/doctor_profile_model.dart';
import 'package:doctor_app_flutter/models/profile_req_Model.dart';
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/medicine_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/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/QR_reader_screen.dart';
import 'package:doctor_app_flutter/screens/medicine/medicine_search_screen.dart'; import 'package:doctor_app_flutter/screens/medicine/medicine_search_screen.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:provider/provider.dart'; import 'package:flutter/cupertino.dart';
import '../routes.dart';
import '../widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:percent_indicator/circular_percent_indicator.dart'; import 'package:percent_indicator/circular_percent_indicator.dart';
import 'package:provider/provider.dart';
import '../presentation/doctor_app_icons.dart'; import '../routes.dart';
import '../widgets/dashboard/dashboard_item_icons_texts.dart'; import '../widgets/dashboard/dashboard_item_icons_texts.dart';
import '../widgets/dashboard/dashboard_item_texts_widget.dart'; import '../widgets/dashboard/dashboard_item_texts_widget.dart';
import '../widgets/shared/app_texts_widget.dart';
import '../widgets/shared/rounded_container_widget.dart'; import '../widgets/shared/rounded_container_widget.dart';
import 'doctor/doctor_reply_screen.dart'; import 'doctor/doctor_reply_screen.dart';
import 'doctor/my_referral_patient_screen.dart'; import 'doctor/my_referral_patient_screen.dart';
import 'doctor/my_referred_patient_screen.dart'; import 'doctor/my_referred_patient_screen.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
Helpers helpers = Helpers();
class DashboardScreen extends StatefulWidget { class DashboardScreen extends StatefulWidget {
DashboardScreen({Key key, this.title}) : super(key: key); DashboardScreen({Key key, this.title}) : super(key: key);
@ -33,19 +41,23 @@ class DashboardScreen extends StatefulWidget {
} }
class _DashboardScreenState extends State<DashboardScreen> { class _DashboardScreenState extends State<DashboardScreen> {
HospitalProvider projectsProvider; HospitalProvider hospitalProvider;
AuthProvider authProvider;
bool isLoading = false;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
hospitalProvider = Provider.of(context);
authProvider = Provider.of(context);
print(authProvider.doctorsClinicList);
FocusScopeNode currentFocus = FocusScope.of(context); FocusScopeNode currentFocus = FocusScope.of(context);
if (!currentFocus.hasPrimaryFocus) { if (!currentFocus.hasPrimaryFocus) {
currentFocus.unfocus(); currentFocus.unfocus();
} }
projectsProvider = Provider.of(context);
return SafeArea( return SafeArea(
bottom: true, bottom: true,
child: Scaffold( child: AppScaffold(
isShowAppBar: false,
isLoading: isLoading,
body: SingleChildScrollView( body: SingleChildScrollView(
child: SizedBox( child: SizedBox(
height: MediaQuery.of(context).size.height * 1.09, height: MediaQuery.of(context).size.height * 1.09,
@ -65,12 +77,20 @@ class _DashboardScreenState extends State<DashboardScreen> {
), ),
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
), ),
Container( InkWell(
margin: EdgeInsets.only(left: 10, top: 10, right: 10), onTap: () {
child: Icon( showCupertinoPicker(
Icons.settings, context: context,
size: SizeConfig.textMultiplier * 2.5, actionList: authProvider.doctorsClinicList);
)) },
child: Container(
margin:
EdgeInsets.only(left: 10, top: 10, right: 10),
child: Icon(
Icons.settings,
size: SizeConfig.textMultiplier * 2.5,
)),
)
]), ]),
Container( Container(
margin: EdgeInsets.only(left: 10, top: 5), margin: EdgeInsets.only(left: 10, top: 5),
@ -399,7 +419,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
child: DashboardItemIconText( child: DashboardItemIconText(
widget.iconURL + 'qr-code.svg', widget.iconURL + 'qr-code.svg',
"", "",
"QR Reader", TranslationBase.of(context).qrReader,
showBorder: true, showBorder: true,
backgroundColor: Colors.white, backgroundColor: Colors.white,
valueFontColor: Colors.black, valueFontColor: Colors.black,
@ -413,17 +433,103 @@ class _DashboardScreenState extends State<DashboardScreen> {
)), )),
], ],
), ),
//)
// ,
//constraints: new BoxConstraints(),
), ),
), ),
), ),
); );
}
// Container( showCupertinoPicker(
{context, List<ClinicModel> actionList, decKey, onSelectFun}) {
showModalBottomSheet(
isDismissible: false,
isScrollControlled: true,
context: context,
builder: (BuildContext builder) {
return Container(
// height: 500,
height: SizeConfig.realScreenHeight * 0.4,
color: Color(0xfff7f7f7),
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Container(
color: Color(0xfff7f7f7),
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
CupertinoButton(
child: Text(
'Cancel'.toUpperCase(),
// style: TextStyle(context)
),
onPressed: () {
Navigator.pop(context);
},
),
CupertinoButton(
child: Text(
'Done'.toUpperCase(),
// style: textStyle(context),
),
onPressed: () {
Navigator.pop(context);
// onSelectFun(cupertinoPickerIndex);
},
)
],
),
),
Container(
height: SizeConfig.realScreenHeight * 0.3,
color: Color(0xfff7f7f7),
child: Column(
children: actionList
.map((e) => Container(
child: InkWell(
onTap: () =>
changeClinic(e.clinicID, context),
child: Text(
e.clinicName,
style: TextStyle(fontSize: 15),
)),
))
.toList(),
))
],
),
);
});
}
changeClinic(clinicId, BuildContext context) async {
Navigator.pop(context);
changeIsLoading(true);
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
DoctorProfileModel doctorProfile = new DoctorProfileModel.fromJson(profile);
ProfileReqModel docInfo = new ProfileReqModel(
doctorID: doctorProfile.doctorID,
clinicID: clinicId,
license: true,
projectID: doctorProfile.projectID,
tokenID: '',
languageID: 2);
// authProvider.getDocProfiles(docInfo)
authProvider.getDocProfiles(docInfo.toJson()).then((res) async {
changeIsLoading(false);
sharedPref.setObj(DOCTOR_PROFILE, res['DoctorProfileList'][0]);
}).catchError((err) {
changeIsLoading(false);
helpers.showErrorToast(err);
});
}
// ); changeIsLoading(bool val) {
setState(() {
this.isLoading = val;
});
} }
} }

@ -1,11 +1,11 @@
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class MessagesScreen extends StatelessWidget { class MessagesScreen extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return AppScaffold(
isShowAppBar: false,
body: Center( body: Center(
child: Text('Messages heeer'), child: Text('Messages heeer'),
), ),

@ -17,7 +17,7 @@ class MyReferralPatient extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
referralPatientProvider = Provider.of(context); referralPatientProvider = Provider.of(context);
return AppScaffold( return AppScaffold(
appBarTitle: 'My Referral Patient', appBarTitle: TranslationBase.of(context).myReferralPatient,
body: referralPatientProvider.isLoading body: referralPatientProvider.isLoading
? DrAppCircularProgressIndeicator() ? DrAppCircularProgressIndeicator()
: referralPatientProvider.isError : referralPatientProvider.isError
@ -43,11 +43,12 @@ class MyReferralPatient extends StatelessWidget {
children: <Widget>[ children: <Widget>[
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( Container(
child: Column( child: Column(
children: referralPatientProvider.listMyReferralPatientModel.map((item) { children: referralPatientProvider
.listMyReferralPatientModel
.map((item) {
return MyReferralPatientWidget( return MyReferralPatientWidget(
myReferralPatientModel: item, myReferralPatientModel: item,
); );

@ -9,58 +9,59 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../../widgets/shared/app_scaffold_widget.dart'; import '../../widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
class MyReferredPatient extends StatelessWidget { class MyReferredPatient extends StatelessWidget {
MyReferredPatientProvider referredPatientProvider; MyReferredPatientProvider referredPatientProvider;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
referredPatientProvider = Provider.of(context); referredPatientProvider = Provider.of(context);
return AppScaffold( return AppScaffold(
appBarTitle: 'My Referred Patient', appBarTitle: TranslationBase.of(context).myReferredPatient,
body: referredPatientProvider.isLoading body: referredPatientProvider.isLoading
? DrAppCircularProgressIndeicator() ? DrAppCircularProgressIndeicator()
: referredPatientProvider.isError : referredPatientProvider.isError
? Center( ? Center(
child: AppText( child: AppText(
referredPatientProvider.error, referredPatientProvider.error,
color: Theme.of(context).errorColor, color: Theme.of(context).errorColor,
),
)
: referredPatientProvider.listMyReferredPatientModel.length == 0
? Center(
child: AppText(
TranslationBase.of(context).errorNoSchedule,
color: Theme.of(context).errorColor,
),
)
: Container(
padding: EdgeInsetsDirectional.fromSTEB(20, 0, 20, 0),
child: ListView(
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 10,
),
Container(
child: Column(
//children: referredPatientProvider.listMyReferralPatientModel.map((item) {
children: referredPatientProvider.listMyReferredPatientModel.map((item) {
return MyReferredPatientWidget(
myReferredPatientModel: item,
);
}).toList(),
), ),
), )
], : referredPatientProvider.listMyReferredPatientModel.length == 0
), ? Center(
], child: AppText(
), TranslationBase.of(context).errorNoSchedule,
), color: Theme.of(context).errorColor,
),
)
: Container(
padding: EdgeInsetsDirectional.fromSTEB(20, 0, 20, 0),
child: ListView(
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 10,
),
Container(
child: Column(
//children: referredPatientProvider.listMyReferralPatientModel.map((item) {
children: referredPatientProvider
.listMyReferredPatientModel
.map((item) {
return MyReferredPatientWidget(
myReferredPatientModel: item,
);
}).toList(),
),
),
],
),
],
),
),
); );
} }
} }

@ -1,6 +1,7 @@
import 'package:doctor_app_flutter/providers/schedule_provider.dart'; import 'package:doctor_app_flutter/providers/schedule_provider.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/doctor/my_schedule_widget.dart'; import 'package:doctor_app_flutter/widgets/doctor/my_schedule_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart'; import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -13,7 +14,8 @@ class MyScheduleScreen extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
scheduleProvider = Provider.of(context); scheduleProvider = Provider.of(context);
return Scaffold( return AppScaffold(
isShowAppBar: false,
body: scheduleProvider.isLoading body: scheduleProvider.isLoading
? DrAppCircularProgressIndeicator() ? DrAppCircularProgressIndeicator()
: scheduleProvider.isError : scheduleProvider.isError

@ -4,7 +4,8 @@ import 'package:flutter/material.dart';
class ServicesScreen extends StatelessWidget { class ServicesScreen extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return AppScaffold(
isShowAppBar: false,
body: Center( body: Center(
child: Text('Services heeer'), child: Text('Services heeer'),
), ),

@ -14,6 +14,7 @@ import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indei
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../../util/extenstions.dart'; import '../../util/extenstions.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
DrAppSharedPreferances sharedPref = DrAppSharedPreferances(); DrAppSharedPreferances sharedPref = DrAppSharedPreferances();
@ -46,22 +47,21 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: "Search Medicine", appBarTitle: TranslationBase.of(context).searchMedicine,
body: Column( body: Column(
children: <Widget>[ children: <Widget>[
Padding( Padding(
padding: EdgeInsets.only( padding: EdgeInsets.only(
bottom: SizeConfig.heightMultiplier * 1, bottom: SizeConfig.heightMultiplier * 1,
right: SizeConfig.heightMultiplier * 2, right: SizeConfig.heightMultiplier * 2,
left: SizeConfig.heightMultiplier * 2, left: SizeConfig.heightMultiplier * 2,
top: SizeConfig.heightMultiplier * 3), top: SizeConfig.heightMultiplier * 3),
child: AppTextFormField( child: AppTextFormField(
hintText: 'Search Medicine Name Here..', hintText: TranslationBase.of(context).searchMedicineNameHere,
controller: myController, controller: myController,
onSaved: (value) {}, onSaved: (value) {},
inputFormatter: ONLY_LETTERS), inputFormatter: ONLY_LETTERS),
), ),
Container( Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
bottom: SizeConfig.heightMultiplier * 1, bottom: SizeConfig.heightMultiplier * 1,
@ -72,7 +72,7 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
alignment: WrapAlignment.center, alignment: WrapAlignment.center,
children: <Widget>[ children: <Widget>[
AppButton( AppButton(
title: "Search", title: TranslationBase.of(context).search,
color: Color(PRIMARY_COLOR), color: Color(PRIMARY_COLOR),
onPressed: () { onPressed: () {
searchMedicine(context); searchMedicine(context);
@ -87,9 +87,9 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
"You find " + TranslationBase.of(context).youCanFind +
(data == null ? "0" : data.length.toString()) + (data == null ? "0" : data.length.toString()) +
" items in search", TranslationBase.of(context).itemsInSearch,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
margin: 5, margin: 5,
), ),
@ -127,7 +127,9 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
ChangeNotifierProvider( ChangeNotifierProvider(
create: (_) => MedicineProvider(), create: (_) => MedicineProvider(),
child: PharmaciesListScreen( child: PharmaciesListScreen(
itemID: data[index]["ItemID"], url: data[index]["ProductImageBase64"]), itemID: data[index]["ItemID"],
url: data[index]
["ProductImageBase64"]),
), ),
), ),
); );

@ -51,166 +51,173 @@ class _PharmaciesListState extends State<PharmaciesListScreen> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: "Pharmacies List", appBarTitle: "Pharmacies List",
body: Column(children: <Widget>[ body: Container(
RoundedContainer( height: SizeConfig.screenHeight,
child: !_medicineProvider.isFinished child: ListView(
? DrAppCircularProgressIndeicator() shrinkWrap: true,
: _medicineProvider.hasError scrollDirection: Axis.vertical,
? Center( physics: const AlwaysScrollableScrollPhysics(),
child: Text( children: <Widget>[
_medicineProvider.errorMsg, RoundedContainer(
style: child: !_medicineProvider.isFinished
TextStyle(color: Theme.of(context).errorColor), ? DrAppCircularProgressIndeicator()
), : _medicineProvider.hasError
) ? Center(
: StreamBuilder<Object>( child: Text(
stream: null, _medicineProvider.errorMsg,
builder: (context, snapshot) { style:
return Row( TextStyle(color: Theme.of(context).errorColor),
children: <Widget>[ ),
Expanded( )
flex: 1, : StreamBuilder<Object>(
child: ClipRRect( stream: null,
borderRadius: builder: (context, snapshot) {
BorderRadius.all(Radius.circular(7)), return Row(
child: Image.memory( children: <Widget>[
dataFromBase64String(widget.url), Expanded(
height: SizeConfig.imageSizeMultiplier * 21, flex: 1,
width: SizeConfig.imageSizeMultiplier * 20, child: ClipRRect(
fit: BoxFit.cover, borderRadius:
BorderRadius.all(Radius.circular(7)),
child: Image.memory(
dataFromBase64String(widget.url),
height: SizeConfig.imageSizeMultiplier * 21,
width: SizeConfig.imageSizeMultiplier * 20,
fit: BoxFit.cover,
),
), ),
), ),
Expanded(
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(),
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(
"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: 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(),
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(
"You can Find it in",
fontWeight: FontWeight.bold,
))),
Expanded(
child: Container(
width: SizeConfig.screenWidth * 0.99,
child: ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
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(
Expanded( flex: 4,
flex: 4, child: AppText(
child: AppText( _data[index]["LocationDescription"],
_data[index]["LocationDescription"], margin: 10,
margin: 10, ),
), ),
), Expanded(
Expanded( flex: 2,
flex: 2, child: Wrap(
child: Wrap( direction: Axis.horizontal,
direction: Axis.horizontal, alignment: WrapAlignment.end,
alignment: WrapAlignment.end, crossAxisAlignment: WrapCrossAlignment.end,
crossAxisAlignment: WrapCrossAlignment.end, children: <Widget>[
children: <Widget>[ Padding(
Padding( padding: EdgeInsets.all(5),
padding: EdgeInsets.all(5), child: InkWell(
child: InkWell( child: Icon(
child: Icon( Icons.call,
Icons.call, color: Colors.red,
color: Colors.red, ),
onTap: () => launch(
"tel://" + _data[index]["PhoneNumber"]),
), ),
onTap: () => launch(
"tel://" + _data[index]["PhoneNumber"]),
), ),
), Padding(
Padding( padding: EdgeInsets.all(5),
padding: EdgeInsets.all(5), child: InkWell(
child: InkWell( child: Icon(
child: Icon( Icons.pin_drop,
Icons.pin_drop, color: Colors.red,
color: Colors.red, ),
onTap: () {
MapsLauncher.launchCoordinates(
double.parse(
_data[index]["Latitude"]),
double.parse(
_data[index]["Longitude"]),
_data[index]["LocationDescription"]);
},
), ),
onTap: () {
MapsLauncher.launchCoordinates(
double.parse(
_data[index]["Latitude"]),
double.parse(
_data[index]["Longitude"]),
_data[index]["LocationDescription"]);
},
), ),
), ],
], ),
), ),
), ],
], ),
), );
); }),
}), ),
), )
) ]),
])); ));
} }
Future<bool> pharmaciesList() async { Future<bool> pharmaciesList() async {

@ -1,5 +1,6 @@
import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/models/patient/patient_model.dart'; import 'package:doctor_app_flutter/models/patient/patient_model.dart';
import 'package:doctor_app_flutter/providers/project_provider.dart';
import 'package:doctor_app_flutter/routes.dart'; import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/helpers.dart';
@ -19,6 +20,7 @@ import '../../widgets/patients/dynamic_elements.dart';
import '../../config/config.dart'; import '../../config/config.dart';
import '../../models/doctor_profile_model.dart'; import '../../models/doctor_profile_model.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:provider/provider.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
Helpers helpers = Helpers(); Helpers helpers = Helpers();
@ -36,6 +38,8 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
String _selectedType = '1'; String _selectedType = '1';
String _selectedLocation = '1'; String _selectedLocation = '1';
String error = ''; String error = '';
ProjectProvider projectsProvider;
String itemText = '';
final GlobalKey<FormState> _formKey = GlobalKey<FormState>(); final GlobalKey<FormState> _formKey = GlobalKey<FormState>();
bool _autoValidate = false; bool _autoValidate = false;
@ -98,7 +102,8 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
}); });
} }
} catch (err) { } catch (err) {
handelCatchErrorCase(err); error = err;
// handelCatchErrorCase(err);
} }
} }
@ -112,6 +117,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectsProvider = Provider.of(context);
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).searchPatient, appBarTitle: TranslationBase.of(context).searchPatient,
body: ListView( body: ListView(
@ -174,12 +180,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();
@ -192,9 +205,12 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
}) })
}, },
items: PATIENT_TYPE.map((item) { items: PATIENT_TYPE.map((item) {
!projectsProvider.isArabic
? itemText = item['text']
: itemText = item['text_ar'];
return DropdownMenuItem( return DropdownMenuItem(
child: Text( child: Text(
'${item['text']}', itemText,
textAlign: TextAlign.end, textAlign: TextAlign.end,
), ),
value: item['val'], value: item['val'],

@ -22,6 +22,7 @@ import 'package:doctor_app_flutter/widgets/shared/profile_image_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:doctor_app_flutter/presentation/doctor_app_icons.dart';
import '../../config/size_config.dart'; import '../../config/size_config.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
@ -106,7 +107,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
setState(() { setState(() {
_isError = true; _isError = true;
_isLoading = false; _isLoading = false;
this.error = helpers.generateContactAdminMsg(error); this.error = error;
}); });
}); });
} }
@ -383,23 +384,29 @@ class _PatientsScreenState extends State<PatientsScreen> {
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment MainAxisAlignment
.start, .start,
children: children: <Widget>[
item.genderDescription == Container(
"Male" decoration: BoxDecoration(
? [ gradient: LinearGradient(
SvgPicture.asset( begin: Alignment(-1, -1),
url + avatarMale, end: Alignment(1, 1),
height: 80.0, colors: [
width: 80.0, Colors.grey[100],
semanticsLabel: 'Male Logo') Colors.grey[200],
] ]),
: [ boxShadow: [
SvgPicture.asset( BoxShadow(
url + avatarFemale, color: Color.fromRGBO(0, 0, 0, 0.08),
height: 80.0, offset: Offset(0.0, 5.0),
width: 80.0, blurRadius: 16.0)
semanticsLabel: 'Female Logo') ],
], borderRadius: BorderRadius.all(Radius.circular(50.0)),
),
width: 80,
height: 80,
child: Icon(item.genderDescription == "Male" ? DoctorApp.male : DoctorApp.femaleicon,size: 80,)),
],
), ),
SizedBox( SizedBox(
width: 10, width: 10,

@ -15,6 +15,7 @@ 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();
@ -77,7 +78,7 @@ class _InsuranceApprovalsState extends State<InsuranceApprovalsScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: "Insurance Approvals", appBarTitle: TranslationBase.of(context).insuranceApprovals,
body: patientsProv.isLoading body: patientsProv.isLoading
? DrAppCircularProgressIndeicator() ? DrAppCircularProgressIndeicator()
: patientsProv.isError : patientsProv.isError
@ -128,9 +129,12 @@ class _InsuranceApprovalsState extends State<InsuranceApprovalsScreen> {
: approvalsList[index][ : approvalsList[index][
"ApprovalStatusDescption"] "ApprovalStatusDescption"]
.toString() .toString()
.contains("Cancelled") .contains(
? DoctorApp.reject_icon "Cancelled")
: DoctorApp.pending_icon, ? DoctorApp
.reject_icon
: DoctorApp
.pending_icon,
color: approvalsList[index][ color: approvalsList[index][
"ApprovalStatusDescption"] "ApprovalStatusDescption"]
.toString() .toString()
@ -139,13 +143,18 @@ class _InsuranceApprovalsState extends State<InsuranceApprovalsScreen> {
: approvalsList[index][ : approvalsList[index][
"ApprovalStatusDescption"] "ApprovalStatusDescption"]
.toString() .toString()
.contains("Cancelled") .contains(
"Cancelled")
? Colors.red ? Colors.red
: Colors.yellow, : Colors.yellow,
), ),
AppText(approvalsList[index]["ApprovalStatusDescption"], AppText(
fontSize: SizeConfig.textMultiplier * 1.5, approvalsList[index][
color: approvalsList[index][ "ApprovalStatusDescption"],
fontSize: SizeConfig
.textMultiplier *
1.5,
color: approvalsList[index][
"ApprovalStatusDescption"] "ApprovalStatusDescption"]
.toString() .toString()
.contains("Approved") .contains("Approved")
@ -153,9 +162,11 @@ class _InsuranceApprovalsState extends State<InsuranceApprovalsScreen> {
: approvalsList[index][ : approvalsList[index][
"ApprovalStatusDescption"] "ApprovalStatusDescption"]
.toString() .toString()
.contains("Cancelled") .contains(
"Cancelled")
? Colors.red ? Colors.red
: Colors.yellow,) : Colors.yellow,
)
], ],
), ),
Expanded( Expanded(
@ -204,31 +215,30 @@ class _InsuranceApprovalsState extends State<InsuranceApprovalsScreen> {
backgroundColor: backgroundColor:
Color(PRIMARY_COLOR), Color(PRIMARY_COLOR),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
approvalsList[index] approvalsList[index]
["ApprovalNo"] ["ApprovalNo"]
.toString(), .toString(),
color: Colors.white, color: Colors.white,
fontSize: 19, fontSize: 19,
fontWeight: fontWeight: FontWeight.bold,
FontWeight.bold, marginTop: 10,
marginTop: 10, marginLeft: 10,
marginLeft: 10, marginRight: 10,
marginRight: 10, marginBottom: 2,
marginBottom: 2, ),
), AppText(
"Approval No:",
AppText( color: Colors.white,
"Approval No:", fontSize: 16,
color: Colors.white, marginTop: 2,
fontSize: 16, marginLeft: 10,
marginTop: 2, marginBottom: 15,
marginLeft: 10, marginRight: 10,
marginBottom: 15, ),
marginRight: 10,
),
Row( Row(
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
@ -241,24 +251,34 @@ class _InsuranceApprovalsState extends State<InsuranceApprovalsScreen> {
AppText( AppText(
"PRODUCER NAME", "PRODUCER NAME",
fontSize: 10, fontSize: 10,
color: Colors.white, color:
Colors.white,
marginLeft: SizeConfig marginLeft: SizeConfig
.widthMultiplier * .widthMultiplier *
3, 3,
), ),
AppText(checkList(approvalsList[index]["ApporvalDetails"])? AppText(
approvalsList[index] checkList(approvalsList[
index]
[ [
"ApporvalDetails"][0] "ApporvalDetails"])
[ ? approvalsList[
"ProcedureName"] : "", index]
[
"ApporvalDetails"][0]
[
"ProcedureName"]
: "",
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.bold, fontWeight:
FontWeight
.bold,
marginLeft: SizeConfig marginLeft: SizeConfig
.widthMultiplier * .widthMultiplier *
3, 3,
marginTop: 3, marginTop: 3,
color: Colors.white, color:
Colors.white,
), ),
], ],
), ),
@ -273,22 +293,26 @@ class _InsuranceApprovalsState extends State<InsuranceApprovalsScreen> {
AppText( AppText(
"STATUS", "STATUS",
fontSize: 10, fontSize: 10,
color: Colors.white, color:
Colors.white,
marginLeft: SizeConfig marginLeft: SizeConfig
.widthMultiplier * .widthMultiplier *
9, 9,
), ),
AppText( AppText(
approvalsList[index] approvalsList[
[ index][
"ApprovalStatusDescption"], "ApprovalStatusDescption"],
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.bold, fontWeight:
FontWeight
.bold,
marginLeft: SizeConfig marginLeft: SizeConfig
.widthMultiplier * .widthMultiplier *
9, 9,
marginTop: 3, marginTop: 3,
color: Colors.white, color:
Colors.white,
), ),
], ],
), ),
@ -307,7 +331,8 @@ class _InsuranceApprovalsState extends State<InsuranceApprovalsScreen> {
AppText( AppText(
"RECEIPT ON", "RECEIPT ON",
fontSize: 10, fontSize: 10,
color: Colors.white, color:
Colors.white,
marginLeft: SizeConfig marginLeft: SizeConfig
.widthMultiplier * .widthMultiplier *
3, 3,
@ -316,16 +341,25 @@ class _InsuranceApprovalsState extends State<InsuranceApprovalsScreen> {
1.5, 1.5,
), ),
AppText( AppText(
convertDateFormat( approvalsList[index] convertDateFormat(
["ReceiptOn"]), approvalsList[
index]
[
"ReceiptOn"]),
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.bold, fontWeight:
FontWeight
.bold,
marginLeft: SizeConfig marginLeft: SizeConfig
.widthMultiplier * .widthMultiplier *
3, 3,
marginTop: 3, marginTop: 3,
marginBottom: SizeConfig.heightMultiplier*2, marginBottom:
color: Colors.white, SizeConfig
.heightMultiplier *
2,
color:
Colors.white,
), ),
], ],
), ),
@ -340,7 +374,8 @@ class _InsuranceApprovalsState extends State<InsuranceApprovalsScreen> {
AppText( AppText(
"EXPIRY DATE", "EXPIRY DATE",
fontSize: 10, fontSize: 10,
color: Colors.white, color:
Colors.white,
marginTop: SizeConfig marginTop: SizeConfig
.heightMultiplier * .heightMultiplier *
1.5, 1.5,
@ -351,16 +386,23 @@ class _InsuranceApprovalsState extends State<InsuranceApprovalsScreen> {
AppText( AppText(
convertDateFormat( convertDateFormat(
approvalsList[ approvalsList[
index][ index]
[
"ExpiryDate"]), "ExpiryDate"]),
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.bold, fontWeight:
FontWeight
.bold,
marginLeft: SizeConfig marginLeft: SizeConfig
.widthMultiplier * .widthMultiplier *
9, 9,
marginTop: 3, marginTop: 3,
marginBottom: SizeConfig.heightMultiplier*2, marginBottom:
color: Colors.white, SizeConfig
.heightMultiplier *
2,
color:
Colors.white,
), ),
], ],
), ),
@ -434,7 +476,8 @@ class _InsuranceApprovalsState extends State<InsuranceApprovalsScreen> {
return newDate.toString(); return newDate.toString();
} }
bool checkList(List list){
bool checkList(List list) {
return list.length > 0 ? true : false; return list.length > 0 ? true : false;
} }
} }

@ -18,6 +18,7 @@ import '../../../../widgets/shared/card_with_bg_widget.dart';
import '../../../../widgets/shared/dr_app_circular_progress_Indeicator.dart'; import '../../../../widgets/shared/dr_app_circular_progress_Indeicator.dart';
import '../../../../widgets/shared/profile_image_widget.dart'; import '../../../../widgets/shared/profile_image_widget.dart';
import 'lab_result_secreen.dart'; import 'lab_result_secreen.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
@ -72,13 +73,14 @@ class _LabOrdersScreenState extends State<LabOrdersScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: "Lab Orders", appBarTitle: TranslationBase.of(context).labOrders,
body: patientsProv.isLoading body: patientsProv.isLoading
? DrAppCircularProgressIndeicator() ? DrAppCircularProgressIndeicator()
: patientsProv.isError : patientsProv.isError
? DrAppEmbeddedError(error: patientsProv.error) ? DrAppEmbeddedError(error: patientsProv.error)
: patientsProv.patientLabResultOrdersList.length == 0 : patientsProv.patientLabResultOrdersList.length == 0
? DrAppEmbeddedError(error: 'You don\'t have any Orders') ? DrAppEmbeddedError(
error: TranslationBase.of(context).errorNoLabOrders)
: Container( : Container(
margin: EdgeInsets.fromLTRB( margin: EdgeInsets.fromLTRB(
SizeConfig.realScreenWidth * 0.05, SizeConfig.realScreenWidth * 0.05,

@ -12,6 +12,7 @@ import 'package:eva_icons_flutter/eva_icons_flutter.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 LabResult extends StatefulWidget { class LabResult extends StatefulWidget {
final LabOrdersResModel labOrders; final LabOrdersResModel labOrders;
@ -40,13 +41,14 @@ class _LabResultState extends State<LabResult> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: "Lab Orders", appBarTitle: TranslationBase.of(context).labOrders,
body: patientsProv.isLoading body: patientsProv.isLoading
? DrAppCircularProgressIndeicator() ? DrAppCircularProgressIndeicator()
: patientsProv.isError : patientsProv.isError
? DrAppEmbeddedError(error: patientsProv.error) ? DrAppEmbeddedError(error: patientsProv.error)
: patientsProv.labResultList.length == 0 : patientsProv.labResultList.length == 0
? DrAppEmbeddedError(error: 'You don\'t have any Orders') ? DrAppEmbeddedError(
error: TranslationBase.of(context).errorNoLabOrders)
: Container( : Container(
margin: EdgeInsets.fromLTRB( margin: EdgeInsets.fromLTRB(
SizeConfig.realScreenWidth * 0.05, SizeConfig.realScreenWidth * 0.05,
@ -57,25 +59,25 @@ class _LabResultState extends State<LabResult> {
children: <Widget>[ children: <Widget>[
CardWithBgWidgetNew( CardWithBgWidgetNew(
widget: Row( widget: Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.start,
MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
' Invoice No :', TranslationBase.of(context).invoiceNo,
fontSize: fontSize: 2 * SizeConfig.textMultiplier,
2 * SizeConfig.textMultiplier,
color: Colors.grey[800], color: Colors.grey[800],
), ),
AppText( AppText(
' ${widget.labOrders.invoiceNo}', ' ${widget.labOrders.invoiceNo}',
fontSize: fontSize: 2 * SizeConfig.textMultiplier,
2 * SizeConfig.textMultiplier,
color: Colors.grey[800], color: Colors.grey[800],
), ),
], ],
), ),
), ),
CardWithBgWidgetNew(widget: LabResultWidget(labResult: patientsProv.labResultList,)) CardWithBgWidgetNew(
widget: LabResultWidget(
labResult: patientsProv.labResultList,
))
], ],
), ),
), ),

@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import '../../../widgets/patients/profile/patient_profile_widget.dart'; import '../../../widgets/patients/profile/patient_profile_widget.dart';
import '../../../widgets/shared/app_scaffold_widget.dart'; import '../../../widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
class PatientProfileScreen extends StatelessWidget { class PatientProfileScreen extends StatelessWidget {
const PatientProfileScreen({Key key}) : super(key: key); const PatientProfileScreen({Key key}) : super(key: key);
@ -9,7 +10,7 @@ class PatientProfileScreen extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: 'Patient Profile', appBarTitle: TranslationBase.of(context).patientProfile,
body: PatientProfileWidget(), body: PatientProfileWidget(),
); );
} }

@ -17,6 +17,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 '../../../../widgets/shared/errors/dr_app_embedded_error.dart'; import '../../../../widgets/shared/errors/dr_app_embedded_error.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
@ -83,7 +84,7 @@ class _PrescriptionScreenState extends State<PrescriptionScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: "Prescriptions", appBarTitle: TranslationBase.of(context).prescription,
body: patientsProv.isLoading body: patientsProv.isLoading
? DrAppCircularProgressIndeicator() ? DrAppCircularProgressIndeicator()
: patientsProv.isError : patientsProv.isError

@ -14,6 +14,7 @@ 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();
@ -75,14 +76,14 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: "Progress Note", appBarTitle: TranslationBase.of(context).progressNote,
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 Progress Note') error: TranslationBase.of(context).errorNoProgressNote)
: Column( : Column(
children: <Widget>[ children: <Widget>[
Container( Container(
@ -93,8 +94,8 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
onChanged: (String str) { onChanged: (String str) {
this.searchData(str); this.searchData(str);
}, },
decoration: decoration: buildInputDecoration(context,
buildInputDecoration(context, 'Search Note'), TranslationBase.of(context).searchNote),
), ),
), ),
Expanded( Expanded(
@ -116,7 +117,8 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
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 _ProgressNoteState extends State<ProgressNoteScreen> {
), ),
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,
@ -182,7 +184,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
if (strExist) { if (strExist) {
filteredNotesList = null; filteredNotesList = null;
filteredNotesList = patientsProv.patientProgressNoteList filteredNotesList = patientsProv.patientProgressNoteList
.where((note) => .where((note) =>
note["DoctorName"].toString().contains(str.toUpperCase())) note["DoctorName"].toString().contains(str.toUpperCase()))
.toList(); .toList();

@ -15,6 +15,7 @@ import '../../../../widgets/shared/app_texts_widget.dart';
import '../../../../widgets/shared/card_with_bg_widget.dart'; import '../../../../widgets/shared/card_with_bg_widget.dart';
import '../../../../widgets/shared/dr_app_circular_progress_Indeicator.dart'; import '../../../../widgets/shared/dr_app_circular_progress_Indeicator.dart';
import '../../../../widgets/shared/profile_image_widget.dart'; import '../../../../widgets/shared/profile_image_widget.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
@ -75,116 +76,124 @@ class _RadiologyScreenState extends State<RadiologyScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: "Radiology", appBarTitle: TranslationBase.of(context).radiology,
body: patientsProv.isLoading body: patientsProv.isLoading
? DrAppCircularProgressIndeicator() ? DrAppCircularProgressIndeicator()
: patientsProv.isError : patientsProv.isError
? DrAppEmbeddedError(error: patientsProv.error) ? DrAppEmbeddedError(error: patientsProv.error)
: patientsProv.patientRadiologyList.length == 0 : patientsProv.patientRadiologyList.length == 0
? DrAppEmbeddedError(error: 'You don\'t have any Vital Sign') ? DrAppEmbeddedError(
: Container( error: TranslationBase.of(context).errorNoVitalSign)
margin: EdgeInsets.fromLTRB( : Container(
SizeConfig.realScreenWidth * 0.05, margin: EdgeInsets.fromLTRB(
0, SizeConfig.realScreenWidth * 0.05,
SizeConfig.realScreenWidth * 0.05, 0,
0), SizeConfig.realScreenWidth * 0.05,
child: Container( 0),
margin: EdgeInsets.symmetric(vertical: 10), child: Container(
decoration: BoxDecoration( margin: EdgeInsets.symmetric(vertical: 10),
color: Colors.white, decoration: BoxDecoration(
borderRadius: BorderRadius.all( color: Colors.white,
Radius.circular(20.0), borderRadius: BorderRadius.all(
), Radius.circular(20.0),
), ),
child: ListView.builder( ),
itemCount: patientsProv.patientRadiologyList.length, child: ListView.builder(
itemBuilder: (BuildContext context, int index) { itemCount: patientsProv.patientRadiologyList.length,
return InkWell( itemBuilder: (BuildContext context, int index) {
onTap: () { return InkWell(
Navigator.push( onTap: () {
context, Navigator.push(
MaterialPageRoute(builder: (context) => RadiologyReportScreen(reportData: patientsProv.patientRadiologyList[index].reportData,)),); context,
}, MaterialPageRoute(
child: Container( builder: (context) =>
padding: EdgeInsets.all(10), RadiologyReportScreen(
margin: EdgeInsets.all(10), reportData: patientsProv
decoration: BoxDecoration( .patientRadiologyList[index]
borderRadius: .reportData,
BorderRadius.all(Radius.circular(10)), )),
border: Border( );
bottom: BorderSide( },
color: Colors.grey, width: 0.5), child: Container(
top: BorderSide( padding: EdgeInsets.all(10),
color: Colors.grey, width: 0.5), margin: EdgeInsets.all(10),
left: BorderSide( decoration: BoxDecoration(
color: Colors.grey, width: 0.5), borderRadius:
right: BorderSide( BorderRadius.all(Radius.circular(10)),
color: Colors.grey, width: 0.5), border: Border(
), bottom: BorderSide(
), color: Colors.grey, width: 0.5),
child: Column( top: BorderSide(
crossAxisAlignment: color: Colors.grey, width: 0.5),
CrossAxisAlignment.start, left: BorderSide(
children: <Widget>[ color: Colors.grey, width: 0.5),
Row( right: BorderSide(
children: <Widget>[ color: Colors.grey, width: 0.5),
LargeAvatar(
url: patientsProv
.patientRadiologyList[index]
.doctorImageURL,
),
Expanded(
child: Padding(
padding:
const EdgeInsets.fromLTRB(
8, 0, 0, 0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
AppText(
'${patientsProv.patientRadiologyList[index].doctorName}',
fontSize: 2.5 *
SizeConfig
.textMultiplier,
fontWeight:
FontWeight.bold),
SizedBox(
height: 8,
),
AppText(
'Invoice No:${patientsProv.patientRadiologyList[index].invoiceNo}',
fontSize: 2 *
SizeConfig
.textMultiplier,
),
SizedBox(
height: 8,
),
AppText(
' ${patientsProv.patientRadiologyList[index].clinicName}',
fontSize: 2 *
SizeConfig
.textMultiplier,
color: Theme.of(context)
.primaryColor,
),
SizedBox(
height: 8,
), ),
], ),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Row(
children: <Widget>[
LargeAvatar(
url: patientsProv
.patientRadiologyList[index]
.doctorImageURL,
),
Expanded(
child: Padding(
padding:
const EdgeInsets.fromLTRB(
8, 0, 0, 0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
AppText(
'${patientsProv.patientRadiologyList[index].doctorName}',
fontSize: 2.5 *
SizeConfig
.textMultiplier,
fontWeight:
FontWeight.bold),
SizedBox(
height: 8,
),
AppText(
'Invoice No:${patientsProv.patientRadiologyList[index].invoiceNo}',
fontSize: 2 *
SizeConfig
.textMultiplier,
),
SizedBox(
height: 8,
),
AppText(
' ${patientsProv.patientRadiologyList[index].clinicName}',
fontSize: 2 *
SizeConfig
.textMultiplier,
color: Theme.of(context)
.primaryColor,
),
SizedBox(
height: 8,
),
],
),
),
)
],
),
],
),
), ),
), );
) }),
], ),
),
],
), ),
),
);
}),
),
),
); );
} }
} }

@ -14,6 +14,7 @@ import '../../../../routes.dart';
import '../../../../screens/patients/profile/vital_sign/vital_sign_item.dart'; import '../../../../screens/patients/profile/vital_sign/vital_sign_item.dart';
import '../../../../util/dr_app_shared_pref.dart'; import '../../../../util/dr_app_shared_pref.dart';
import '../../../../widgets/shared/app_scaffold_widget.dart'; import '../../../../widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
@ -30,9 +31,9 @@ class _VitalSignDetailsScreenState extends State<VitalSignDetailsScreen> {
PatientsProvider patientsProv; PatientsProvider patientsProv;
var _isInit = true; var _isInit = true;
/* /*
*@author: Elham Rababah *@author: Elham Rababah
*@Date:28/4/2020 *@Date:28/4/2020
*@param: context *@param: context
*@return: *@return:
*@desc: getVitalSignList Function *@desc: getVitalSignList Function
@ -76,7 +77,7 @@ class _VitalSignDetailsScreenState extends State<VitalSignDetailsScreen> {
final routeArgs = ModalRoute.of(context).settings.arguments as Map; final routeArgs = ModalRoute.of(context).settings.arguments as Map;
vitalSing = routeArgs['vitalSing']; vitalSing = routeArgs['vitalSing'];
return AppScaffold( return AppScaffold(
appBarTitle: "vital Sing", appBarTitle: TranslationBase.of(context).vitalSign,
body: patientsProv.isLoading body: patientsProv.isLoading
? DrAppCircularProgressIndeicator() ? DrAppCircularProgressIndeicator()
: patientsProv.isError : patientsProv.isError
@ -101,9 +102,13 @@ class _VitalSignDetailsScreenState extends State<VitalSignDetailsScreen> {
}, },
child: Container( child: Container(
child: VitalSignItem( child: VitalSignItem(
des: 'Body Measurements', des: TranslationBase.of(context)
.bodyMeasurements,
url: url + 'heartbeat.png', url: url + 'heartbeat.png',
lastVal: patientsProv.patientVitalSignOrderdSubList[0].heightCm.toString(), lastVal: patientsProv
.patientVitalSignOrderdSubList[0]
.heightCm
.toString(),
unit: 'Cm', unit: 'Cm',
), ),
), ),
@ -115,16 +120,18 @@ class _VitalSignDetailsScreenState extends State<VitalSignDetailsScreen> {
arguments: { arguments: {
'title': 'Temperature', 'title': 'Temperature',
'key': vitalSignDetails.temperature, 'key': vitalSignDetails.temperature,
}); });
}, },
child: Container( child: Container(
child: VitalSignItem( child: VitalSignItem(
des: 'Temperature', des: TranslationBase.of(context)
.temperature,
url: url + 'heartbeat.png', url: url + 'heartbeat.png',
lastVal: patientsProv.patientVitalSignOrderdSubList[0].temperatureCelcius.toString(), lastVal: patientsProv
.patientVitalSignOrderdSubList[0]
.temperatureCelcius
.toString(),
unit: 'C', unit: 'C',
), ),
), ),
), ),
@ -142,10 +149,13 @@ class _VitalSignDetailsScreenState extends State<VitalSignDetailsScreen> {
}); });
}, },
child: VitalSignItem( child: VitalSignItem(
des: 'Pulse', des: TranslationBase.of(context).pulse,
url: url + 'heartbeat.png', url: url + 'heartbeat.png',
lastVal: patientsProv.patientVitalSignOrderdSubList[0].pulseBeatPerMinute.toString(), lastVal: patientsProv
unit: 'M', .patientVitalSignOrderdSubList[0]
.pulseBeatPerMinute
.toString(),
unit: 'M',
), ),
), ),
InkWell( InkWell(
@ -158,11 +168,14 @@ class _VitalSignDetailsScreenState extends State<VitalSignDetailsScreen> {
}); });
}, },
child: VitalSignItem( child: VitalSignItem(
des: 'Respiration', des:
TranslationBase.of(context).respiration,
url: url + 'heartbeat.png', url: url + 'heartbeat.png',
lastVal: patientsProv
lastVal: patientsProv.patientVitalSignOrderdSubList[0].respirationBeatPerMinute.toString(), .patientVitalSignOrderdSubList[0]
unit: 'M', .respirationBeatPerMinute
.toString(),
unit: 'M',
), ),
), ),
], ],
@ -179,10 +192,14 @@ class _VitalSignDetailsScreenState extends State<VitalSignDetailsScreen> {
}); });
}, },
child: VitalSignItem( child: VitalSignItem(
des: 'Blood Pressure', des: TranslationBase.of(context)
.bloodPressure,
url: url + 'heartbeat.png', url: url + 'heartbeat.png',
lastVal: patientsProv.patientVitalSignOrderdSubList[0].bloodPressure.toString(), lastVal: patientsProv
unit: '', .patientVitalSignOrderdSubList[0]
.bloodPressure
.toString(),
unit: '',
), ),
), ),
InkWell( InkWell(
@ -195,10 +212,13 @@ class _VitalSignDetailsScreenState extends State<VitalSignDetailsScreen> {
}); });
}, },
child: VitalSignItem( child: VitalSignItem(
des: 'Oxygenation', des:
TranslationBase.of(context).oxygenation,
url: url + 'heartbeat.png', url: url + 'heartbeat.png',
lastVal: patientsProv.patientVitalSignOrderdSubList[0].fIO2.toString(), lastVal: patientsProv
unit: '', .patientVitalSignOrderdSubList[0].fIO2
.toString(),
unit: '',
), ),
), ),
], ],
@ -216,7 +236,7 @@ class _VitalSignDetailsScreenState extends State<VitalSignDetailsScreen> {
}); });
}, },
child: VitalSignItem( child: VitalSignItem(
des: 'Pain Scale', des: TranslationBase.of(context).painScale,
url: url + 'heartbeat.png', url: url + 'heartbeat.png',
), ),
), ),

@ -1,7 +1,4 @@
import 'package:doctor_app_flutter/models/doctor_profile_model.dart'; import 'package:doctor_app_flutter/models/doctor_profile_model.dart';
import 'package:doctor_app_flutter/widgets/shared/app_drawer_widget.dart';
//////////////
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../config/size_config.dart'; import '../config/size_config.dart';
@ -9,12 +6,13 @@ import '../widgets/shared/app_scaffold_widget.dart';
import '../widgets/shared/drawer_item_widget.dart'; import '../widgets/shared/drawer_item_widget.dart';
import '../widgets/shared/profile_image_widget.dart'; import '../widgets/shared/profile_image_widget.dart';
import '../widgets/shared/rounded_container_widget.dart'; import '../widgets/shared/rounded_container_widget.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
class ProfileScreen extends StatefulWidget { class ProfileScreen extends StatefulWidget {
ProfileScreen({Key key, this.title,this.doctorProfileall}) : super(key: key); ProfileScreen({Key key, this.title, this.doctorProfileall}) : super(key: key);
final String title; final String title;
DoctorProfileModel doctorProfileall ; DoctorProfileModel doctorProfileall;
@override @override
_ProfileScreenState createState() => _ProfileScreenState(); _ProfileScreenState createState() => _ProfileScreenState();
@ -22,28 +20,35 @@ class ProfileScreen extends StatefulWidget {
class _ProfileScreenState extends State<ProfileScreen> { class _ProfileScreenState extends State<ProfileScreen> {
//************************** //**************************
DoctorProfileModel doctorProfile ; DoctorProfileModel doctorProfile;
//AppDrawer dr; //AppDrawer dr;
//****************** //******************
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
Map arg = ModalRoute.of(context).settings.arguments
Map arg=ModalRoute.of(context).settings.arguments as Map;//ModalRoute.of(context).settings.arguments; as Map; //ModalRoute.of(context).settings.arguments;
doctorProfile = arg['doctorProfileall']; doctorProfile = arg['doctorProfileall'];
print("******************"); print("******************");
//print(doctorProfile.doctorName); //print(doctorProfile.doctorName);
print("******************"); print("******************");
return AppScaffold( return AppScaffold(
appBarTitle: 'Profile', appBarTitle: TranslationBase.of(context).profile,
body: ListView(padding: EdgeInsets.zero, children: <Widget>[ body: ListView(padding: EdgeInsets.zero, children: <Widget>[
Container( Container(
height: SizeConfig.heightMultiplier * 30, height: MediaQuery.of(context).size.height *
child: DrawerHeader( 0.35, //SizeConfig.heightMultiplier * 35,
child: ProfileImageWidget(
url:doctorProfile.doctorImageURL, child: Container(
//"https://p.kindpng.com/picc/s/404-4042774_profile-photo-circle-circle-profile-picture-png-transparent.png", child: DrawerHeader(
name: doctorProfile.doctorName,//"Dr. Chris evans", child: Container(
des: doctorProfile.clinicDescription//"Director of medical records", child: ProfileImageWidget(
url: doctorProfile.doctorImageURL,
//"https://p.kindpng.com/picc/s/404-4042774_profile-photo-circle-circle-profile-picture-png-transparent.png",
name: doctorProfile.doctorName, //"Dr. Chris evans",
des: doctorProfile
.clinicDescription //"Director of medical records",
),
),
), ),
), ),
), ),
@ -51,30 +56,30 @@ class _ProfileScreenState extends State<ProfileScreen> {
child: ListView( child: ListView(
children: <Widget>[ children: <Widget>[
DrawerItem( DrawerItem(
"Gender" TranslationBase.of(context).gender,
,
Icons.person_pin, Icons.person_pin,
color: Colors.black, color: Colors.black,
subTitle: doctorProfile.genderDescription//"Male" subTitle: doctorProfile.genderDescription //"Male"
, ,
), ),
DrawerItem(TranslationBase.of(context).clinic, Icons.build,
color: Colors.black,
subTitle:
doctorProfile.clinicDescription //"Neurology Clinic",
),
DrawerItem( DrawerItem(
"Clinic", TranslationBase.of(context).hospital,
Icons.build,
color: Colors.black,
subTitle: doctorProfile.clinicDescription//"Neurology Clinic",
),
DrawerItem(
"Hospital",
Icons.local_hospital, Icons.local_hospital,
color: Colors.black, color: Colors.black,
subTitle: doctorProfile.projectName,//"Al-Takkassussi", subTitle: doctorProfile.projectName, //"Al-Takkassussi",
), ),
DrawerItem( DrawerItem(
"Speciality", TranslationBase.of(context).speciality,
Icons.crop_square, Icons.crop_square,
color: Colors.black, color: Colors.black,
subTitle: doctorProfile.doctorRate==0 ?"being bad":"being great", subTitle: doctorProfile.doctorRate == 0
? "being bad"
: "being great",
), ),
], ],
), ),
@ -84,4 +89,3 @@ class _ProfileScreenState extends State<ProfileScreen> {
])); ]));
} }
} }

@ -86,6 +86,61 @@ class TranslationBase {
String get search => localizedValues['search'][locale.languageCode]; String get search => localizedValues['search'][locale.languageCode];
String get onlyArrivedPatient => String get onlyArrivedPatient =>
localizedValues['onlyArrivedPatient'][locale.languageCode]; localizedValues['onlyArrivedPatient'][locale.languageCode];
String get searchMedicineNameHere =>
localizedValues['searchMedicineNameHere'][locale.languageCode];
String get youCanFind => localizedValues['youCanFind'][locale.languageCode];
String get itemsInSearch =>
localizedValues['itemsInSearch'][locale.languageCode];
String get qrReader => localizedValues['qrReader'][locale.languageCode];
String get startScanning =>
localizedValues['startScanning'][locale.languageCode];
String get scanQrCode => localizedValues['scanQrCode'][locale.languageCode];
String get scanQr => localizedValues['scanQr'][locale.languageCode];
String get profile => localizedValues['profile'][locale.languageCode];
String get gender => localizedValues['gender'][locale.languageCode];
String get clinic => localizedValues['clinic'][locale.languageCode];
String get hospital => localizedValues['hospital'][locale.languageCode];
String get speciality => localizedValues['speciality'][locale.languageCode];
String get errorMessage =>
localizedValues['errorMessage'][locale.languageCode];
String get patientProfile =>
localizedValues['patientProfile'][locale.languageCode];
String get vitalSign => localizedValues['vitalSign'][locale.languageCode];
String get labOrder => localizedValues['labOrder'][locale.languageCode];
String get prescription =>
localizedValues['prescription'][locale.languageCode];
String get insuranceApprovals =>
localizedValues['insuranceApprovals'][locale.languageCode];
String get bodyMeasurements =>
localizedValues['bodyMeasurements'][locale.languageCode];
String get temperature => localizedValues['temperature'][locale.languageCode];
String get pulse => localizedValues['pulse'][locale.languageCode];
String get respiration => localizedValues['respiration'][locale.languageCode];
String get bloodPressure =>
localizedValues['bloodPressure'][locale.languageCode];
String get oxygenation => localizedValues['oxygenation'][locale.languageCode];
String get painScale => localizedValues['painScale'][locale.languageCode];
String get errorNoVitalSign =>
localizedValues['errorNoVitalSign'][locale.languageCode];
String get labOrders => localizedValues['labOrders'][locale.languageCode];
String get errorNoLabOrders =>
localizedValues['errorNoLabOrders'][locale.languageCode];
String get answerThePatient =>
localizedValues['answerThePatient'][locale.languageCode];
String get pleaseEnterAnswer =>
localizedValues['pleaseEnterAnswer'][locale.languageCode];
String get replay => localizedValues['replay'][locale.languageCode];
String get progressNote =>
localizedValues['progressNote'][locale.languageCode];
String get searchNote => localizedValues['searchNote'][locale.languageCode];
String get errorNoProgressNote =>
localizedValues['errorNoProgressNote'][locale.languageCode];
String get invoiceNo => localizedValues['invoiceNo:'][locale.languageCode];
String get generalResult =>
localizedValues['generalResult'][locale.languageCode];
String get description => localizedValues['description'][locale.languageCode];
String get value => localizedValues['value'][locale.languageCode];
String get range => localizedValues['range'][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -50,17 +50,18 @@ class _LoginFormState extends State<LoginForm> {
Channel: 9, Channel: 9,
SessionID: "i1UJwCTSqt"); SessionID: "i1UJwCTSqt");
AuthProvider authProv;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
initPlatformState(); initPlatformState();
} }
@override @override
void didChangeDependencies() { void didChangeDependencies() {
super.didChangeDependencies(); super.didChangeDependencies();
authProv = Provider.of<AuthProvider>(context);
if (_isInit) { if (_isInit) {
if (projectsList.length == 0) { if (projectsList.length == 0) {
getProjectsList(); getProjectsList();
@ -72,10 +73,6 @@ class _LoginFormState extends State<LoginForm> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
AuthProvider authProv = Provider.of<AuthProvider>(context);
return Form( return Form(
key: loginFormKey, key: loginFormKey,
child: Container( child: Container(

@ -349,7 +349,6 @@ class _VerifyAccountState extends State<VerifyAccount> {
"IsLoginForDoctorApp": true, "IsLoginForDoctorApp": true,
"IsSilentLogIN": false "IsSilentLogIN": false
}; };
changeLoadingStata(true);
authProv.memberCheckActivationCodeNew(model).then((res) { authProv.memberCheckActivationCodeNew(model).then((res) {
// changeLoadingStata(false); // changeLoadingStata(false);
@ -359,13 +358,9 @@ class _VerifyAccountState extends State<VerifyAccount> {
loginProcessCompleted( loginProcessCompleted(
res['List_DoctorProfile'][0], changeLoadingStata); res['List_DoctorProfile'][0], changeLoadingStata);
} else { } else {
_asyncSimpleDialog(context, res['List_DoctorsClinic'], 'ClinicName', ClinicModel clinic =
'Please Select Clinic') ClinicModel.fromJson(res['List_DoctorsClinic'][0]);
.then((clinicInfo) { getDocProfiles(clinic, changeLoadingStata);
ClinicModel clinic = ClinicModel.fromJson(clinicInfo);
print(clinicInfo);
getDocProfiles(clinic, changeLoadingStata);
});
} }
} else { } else {
changeLoadingStata(false); changeLoadingStata(false);
@ -373,12 +368,8 @@ class _VerifyAccountState extends State<VerifyAccount> {
} }
}).catchError((err) { }).catchError((err) {
changeLoadingStata(false); changeLoadingStata(false);
helpers.showErrorToast(err);
print('$err');
helpers.showErrorToast();
}); });
} else {
// changeLoadingStata(false);
} }
} }
@ -435,18 +426,14 @@ class _VerifyAccountState extends State<VerifyAccount> {
languageID: 2); languageID: 2);
authProv.getDocProfiles(docInfo.toJson()).then((res) { authProv.getDocProfiles(docInfo.toJson()).then((res) {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
print("DoctorProfileList ${res['DoctorProfileList'][0]}");
loginProcessCompleted(res['DoctorProfileList'][0], changeLoadingStata); loginProcessCompleted(res['DoctorProfileList'][0], changeLoadingStata);
} else { } else {
changeLoadingStata(false); changeLoadingStata(false);
helpers.showErrorToast(res['ErrorEndUserMessage']); helpers.showErrorToast(res['ErrorEndUserMessage']);
} }
}).catchError((err) { }).catchError((err) {
print('$err');
changeLoadingStata(false); changeLoadingStata(false);
helpers.showErrorToast(err);
print('$err');
helpers.showErrorToast();
}); });
} }
} }

@ -6,6 +6,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:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
class LabResultWidget extends StatefulWidget { class LabResultWidget extends StatefulWidget {
final List<LabResult> labResult; final List<LabResult> labResult;
@ -30,7 +31,7 @@ class _LabResultWidgetState extends State<LabResultWidget> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
'General Result', TranslationBase.of(context).generalResult,
fontSize: 2.5 * SizeConfig.textMultiplier, fontSize: 2.5 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@ -57,23 +58,18 @@ class _LabResultWidgetState extends State<LabResultWidget> {
margin: EdgeInsets.only(top: 10), margin: EdgeInsets.only(top: 10),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(10)), borderRadius: BorderRadius.all(Radius.circular(10)),
), ),
child: Column( child: Column(
children: widget.labResult.map((result) { children: widget.labResult.map((result) {
return Container( return Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: borderRadius: BorderRadius.all(Radius.circular(10)),
BorderRadius.all(Radius.circular(10)),
border: Border( border: Border(
bottom: BorderSide( bottom:
color: Colors.grey, width: 0.5), BorderSide(color: Colors.grey, width: 0.5),
top: BorderSide( top: BorderSide(color: Colors.grey, width: 0.5),
color: Colors.grey, width: 0.5), left: BorderSide(color: Colors.grey, width: 0.5),
left: BorderSide( right: BorderSide(color: Colors.grey, width: 0.5),
color: Colors.grey, width: 0.5),
right: BorderSide(
color: Colors.grey, width: 0.5),
), ),
), ),
margin: EdgeInsets.only(top: 10), margin: EdgeInsets.only(top: 10),
@ -92,7 +88,8 @@ class _LabResultWidgetState extends State<LabResultWidget> {
), ),
child: Center( child: Center(
child: Texts( child: Texts(
'Description', TranslationBase.of(context)
.description,
color: Colors.white, color: Colors.white,
), ),
), ),
@ -103,7 +100,9 @@ class _LabResultWidgetState extends State<LabResultWidget> {
child: Container( child: Container(
color: Hexcolor('#515B5D'), color: Hexcolor('#515B5D'),
child: Center( child: Center(
child: Texts('Value', color: Colors.white), child: Texts(
TranslationBase.of(context).value,
color: Colors.white),
), ),
height: 60), height: 60),
), ),
@ -116,7 +115,9 @@ class _LabResultWidgetState extends State<LabResultWidget> {
), ),
), ),
child: Center( child: Center(
child: Texts('Range', color: Colors.white), child: Texts(
TranslationBase.of(context).range,
color: Colors.white),
), ),
height: 60), height: 60),
), ),
@ -143,8 +144,7 @@ class _LabResultWidgetState extends State<LabResultWidget> {
Expanded( Expanded(
child: Container( child: Container(
child: Center( child: Center(
child: Texts( child: Texts('${result.resultValue}',
'${result.resultValue}',
color: Colors.grey[800]), color: Colors.grey[800]),
), ),
height: 60), height: 60),

@ -11,6 +11,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 MyReferralPatientWidget extends StatefulWidget { class MyReferralPatientWidget extends StatefulWidget {
final MyReferralPatientModel myReferralPatientModel; final MyReferralPatientModel myReferralPatientModel;
@ -31,7 +32,8 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
@override @override
void initState() { void initState() {
answerController = new TextEditingController(text: widget.myReferralPatientModel.referredDoctorRemarks ?? ''); answerController = new TextEditingController(
text: widget.myReferralPatientModel.referredDoctorRemarks ?? '');
super.initState(); super.initState();
} }
@ -59,260 +61,285 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
Icon(_showDetails Icon(_showDetails
? Icons.keyboard_arrow_up ? Icons.keyboard_arrow_up
: Icons.keyboard_arrow_down), : Icons.keyboard_arrow_down),
], ],
), ),
), ),
!_showDetails !_showDetails
? Container() ? Container()
: AnimatedContainer( : AnimatedContainer(
duration: Duration(milliseconds: 200), duration: Duration(milliseconds: 200),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
SizedBox(height: 5,), SizedBox(
Divider(color: Color(0xFF000000),height: 0.5,), height: 5,
Table( ),
border: TableBorder.symmetric(inside: BorderSide(width: 0.5),), Divider(
children: [ color: Color(0xFF000000),
TableRow( height: 0.5,
),
Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 0.5),
),
children: [ children: [
Container( TableRow(children: [
margin: EdgeInsets.all(2.5), Container(
padding: EdgeInsets.all(5), margin: EdgeInsets.all(2.5),
child: Column( padding: EdgeInsets.all(5),
crossAxisAlignment: CrossAxisAlignment.start, child: Column(
children: <Widget>[ crossAxisAlignment: CrossAxisAlignment.start,
AppText( children: <Widget>[
'File No', AppText(
fontSize: TranslationBase.of(context).fileNo,
1.7 * SizeConfig.textMultiplier, fontSize: 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
SizedBox(height: 5,), SizedBox(
AppText( height: 5,
'${widget.myReferralPatientModel.referringDoctor}', ),
fontSize: AppText(
1.7 * SizeConfig.textMultiplier, '${widget.myReferralPatientModel.referringDoctor}',
fontWeight: FontWeight.w300, fontSize: 1.7 * SizeConfig.textMultiplier,
) fontWeight: FontWeight.w300,
], )
],
),
), ),
), Container(
Container( margin: EdgeInsets.only(
margin: EdgeInsets.only(left: 4,top: 2.5,right: 2.5,bottom: 2.5), left: 4, top: 2.5, right: 2.5, bottom: 2.5),
padding: EdgeInsets.all(5), padding: EdgeInsets.all(5),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
'Referring Doctor', TranslationBase.of(context)
fontSize: .referralDoctor,
1.7 * SizeConfig.textMultiplier, fontSize: 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
SizedBox(height: 5,), SizedBox(
AppText( height: 5,
widget.myReferralPatientModel ),
.referringClinicDescription, AppText(
fontSize: widget.myReferralPatientModel
1.7 * SizeConfig.textMultiplier, .referringClinicDescription,
fontWeight: FontWeight.w300, fontSize: 1.7 * SizeConfig.textMultiplier,
) fontWeight: FontWeight.w300,
], )
],
),
), ),
), ]),
] TableRow(children: [
), Container(
TableRow( margin: EdgeInsets.all(2.5),
children: [ padding: EdgeInsets.all(5),
Container( child: Column(
margin: EdgeInsets.all(2.5), crossAxisAlignment: CrossAxisAlignment.start,
padding: EdgeInsets.all(5), children: <Widget>[
child: Column( AppText(
crossAxisAlignment: TranslationBase.of(context)
CrossAxisAlignment.start, .referringClinic,
children: <Widget>[ fontSize: 1.7 * SizeConfig.textMultiplier,
AppText( fontWeight: FontWeight.bold,
'Referring Clinic', ),
fontSize: SizedBox(
1.7 * SizeConfig.textMultiplier, height: 5,
fontWeight: FontWeight.bold, ),
), AppText(
SizedBox(height: 5,), '${widget.myReferralPatientModel.referringClinicDescription}',
AppText( fontSize: 1.7 * SizeConfig.textMultiplier,
'${widget.myReferralPatientModel.referringClinicDescription}', fontWeight: FontWeight.w300,
fontSize: )
1.7 * SizeConfig.textMultiplier, ],
fontWeight: FontWeight.w300, ),
)
],
), ),
), Container(
Container( margin: EdgeInsets.only(
margin: EdgeInsets.only(left: 4,top: 2.5,right: 2.5,bottom: 2.5), left: 4, top: 2.5, right: 2.5, bottom: 2.5),
padding: EdgeInsets.all(5), padding: EdgeInsets.all(5),
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start, children: <Widget>[
children: <Widget>[ AppText(
AppText( TranslationBase.of(context).frequency,
'Frequency', fontSize: 1.7 * SizeConfig.textMultiplier,
fontSize: fontWeight: FontWeight.bold,
1.7 * SizeConfig.textMultiplier, ),
fontWeight: FontWeight.bold, SizedBox(
height: 5,
),
AppText(
widget.myReferralPatientModel
.frequencyDescription,
fontSize: 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
)
]),
TableRow(
children: [
Container(
margin: EdgeInsets.all(2.5),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
AppText(
TranslationBase.of(context).priority,
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
SizedBox(
height: 5,
),
AppText(
'${widget.myReferralPatientModel.priorityDescription}',
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
), ),
SizedBox(height: 5,),
AppText(
widget.myReferralPatientModel
.frequencyDescription,
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
)
]
),
TableRow(
children: [
Container(
margin: EdgeInsets.all(2.5),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
AppText(
'Priority',
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
), ),
SizedBox(height: 5,), Container(
AppText( margin: EdgeInsets.only(
'${widget.myReferralPatientModel.priorityDescription}', left: 4,
fontSize: top: 2.5,
1.7 * SizeConfig.textMultiplier, right: 2.5,
fontWeight: FontWeight.w300, bottom: 2.5),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
AppText(
TranslationBase.of(context)
.maxResponseTime,
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
SizedBox(
height: 5,
),
AppText(
Helpers.getDateFormatted(widget
.myReferralPatientModel
.mAXResponseTime),
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
) )
], ],
), ),
), ],
Container( ),
margin: EdgeInsets.only(left: 4,top: 2.5,right: 2.5,bottom: 2.5), Divider(
padding: EdgeInsets.all(5), color: Color(0xFF000000),
child: Column( height: 0.5,
crossAxisAlignment: ),
CrossAxisAlignment.start, SizedBox(
children: <Widget>[ height: 5,
AppText( ),
'Max Response Time', Column(
fontSize: crossAxisAlignment: CrossAxisAlignment.start,
1.7 * SizeConfig.textMultiplier, children: <Widget>[
fontWeight: FontWeight.bold, AppText(
), TranslationBase.of(context)
SizedBox(height: 5,), .clinicDetailsandRemarks,
AppText( fontSize: 1.7 * SizeConfig.textMultiplier,
Helpers.getDateFormatted(widget fontWeight: FontWeight.bold,
.myReferralPatientModel textAlign: TextAlign.start,
.mAXResponseTime),
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
), ),
) Texts(
], '${widget.myReferralPatientModel.referringDoctorRemarks}',
), style: "bodyText1",
readMore: true,
], textAlign: TextAlign.start,
), maxLength: 100)
Divider(color: Color(0xFF000000),height: 0.5,), ],
SizedBox( ),
height: 5, SizedBox(
), height: 5,
Column( ),
crossAxisAlignment: CrossAxisAlignment.start, AppText(
children: <Widget>[ TranslationBase.of(context).answerSuggestions,
AppText( fontSize: 1.7 * SizeConfig.textMultiplier,
'Clinic Details and Remarks', fontWeight: FontWeight.bold,
fontSize: 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
textAlign: TextAlign.start,),
Texts(
'${widget.myReferralPatientModel.referringDoctorRemarks}',
style: "bodyText1",
readMore: true,
textAlign: TextAlign.start, textAlign: TextAlign.start,
maxLength: 100) ),
], SizedBox(
), height: 5,
SizedBox( ),
height: 5, Form(
), key: _formKey,
AppText( child: TextFields(
'Answer/Suggestions', maxLines: 2,
fontSize: 1.7 * SizeConfig.textMultiplier, minLines: 2,
fontWeight: FontWeight.bold, hintText:
textAlign: TextAlign.start, TranslationBase.of(context).answerThePatient,
), fontWeight: FontWeight.normal,
SizedBox( initialValue: widget.myReferralPatientModel
height: 5, .referredDoctorRemarks ??
), '',
Form( readOnly: _isLoading,
key: _formKey, validator: (value) {
child: TextFields( if (value.isEmpty)
maxLines: 2, return TranslationBase.of(context)
minLines: 2, .pleaseEnterAnswer;
hintText: 'Answer the patient', else
fontWeight: FontWeight.normal, return null;
initialValue: widget.myReferralPatientModel.referredDoctorRemarks ?? '', },
readOnly: _isLoading, ),
validator: (value) { ),
if (value.isEmpty) SizedBox(height: 10.0),
return "please enter answer"; SizedBox(height: 10.0),
else Container(
return null; width: double.infinity,
}, margin: EdgeInsets.only(left: 10, right: 10),
), child: Button(
), onTap: () async {
SizedBox(height: 10.0), final form = _formKey.currentState;
SizedBox(height: 10.0), if (form.validate()) {
Container( setState(() {
width: double.infinity, _isLoading = true;
margin: EdgeInsets.only(left: 10,right: 10), });
child: Button( try {
onTap: () async { await Provider.of<MyReferralPatientProvider>(
final form = _formKey.currentState; context,
if (form.validate()) { listen: false)
setState(() { .replay(answerController.text.toString(),
_isLoading = true; widget.myReferralPatientModel);
}); setState(() {
try { _isLoading = false;
await Provider.of<MyReferralPatientProvider>(context, listen: false).replay(answerController.text.toString(), widget.myReferralPatientModel); });
setState(() { DrAppToastMsg.showSuccesToast(
_isLoading = false; 'Reply Successfully');
}); } catch (e) {
DrAppToastMsg.showSuccesToast('Reply Successfully'); setState(() {
_isLoading = false;
} catch (e) { });
setState(() { DrAppToastMsg.showErrorToast(e);
_isLoading = false; }
}); }
DrAppToastMsg.showErrorToast(e); },
} title: TranslationBase.of(context).replay,
} loading: _isLoading,
}, ),
title: 'Reply', )
loading: _isLoading, ],
), ),
) )
],
),
)
], ],
), ),
), ),

@ -8,6 +8,7 @@ import 'package:hexcolor/hexcolor.dart';
import '../../../config/size_config.dart'; import '../../../config/size_config.dart';
import '../../shared/app_texts_widget.dart'; import '../../shared/app_texts_widget.dart';
import '../../shared/rounded_container_widget.dart'; import '../../shared/rounded_container_widget.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
/* /*
*@author: Elham Rababah *@author: Elham Rababah
@ -32,26 +33,26 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
name: 'Vital Sign', name: TranslationBase.of(context).vitalSign,
route: VITAL_SIGN_DETAILS, route: VITAL_SIGN_DETAILS,
icon: 'heartbeat.png'), icon: 'heartbeat.png'),
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
route: LAB_ORDERS, route: LAB_ORDERS,
name: 'Lab Order', name: TranslationBase.of(context).labOrder,
icon: 'lab.png'), icon: 'lab.png'),
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
route: PRESCRIPTIONS, route: PRESCRIPTIONS,
name: 'Prescription', name: TranslationBase.of(context).prescription,
icon: 'note.png'), icon: 'note.png'),
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
route: RADIOLOGY, route: RADIOLOGY,
name: 'Radiology', name: TranslationBase.of(context).radiology,
icon: 'radiology-1.png'), icon: 'radiology-1.png'),
Visibility( Visibility(
visible: selectedPatientType != 0 && selectedPatientType != 5, visible: selectedPatientType != 0 && selectedPatientType != 5,
@ -65,7 +66,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
key: key, key: key,
patient: patient, patient: patient,
route: PATIENT_INSURANCE_APPROVALS, route: PATIENT_INSURANCE_APPROVALS,
name: 'Insurance Aprovals', name: TranslationBase.of(context).insuranceApprovals,
icon: 'lab.png'), icon: 'lab.png'),
Visibility( Visibility(
visible: selectedPatientType != 0 && visible: selectedPatientType != 0 &&
@ -304,13 +305,13 @@ class PatientProfileButton extends StatelessWidget {
), ),
Container( Container(
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[ children: <Widget>[
Container( Container(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
child: new Image.asset(url + icon)) child: new Image.asset(url + icon))
], ],
)) ))
]), ]),
), ),
decoration: BoxDecoration( decoration: BoxDecoration(

@ -9,15 +9,16 @@ class AppScaffold extends StatelessWidget {
String appBarTitle; String appBarTitle;
Widget body; Widget body;
bool isLoading; bool isLoading;
bool isShowAppBar;
AppScaffold({this.appBarTitle ='', this.body, this.isLoading = false}); AppScaffold({this.appBarTitle ='', this.body, this.isLoading = false, this.isShowAppBar = true});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
AppGlobal.CONTEX = context; AppGlobal.CONTEX = context;
return Scaffold( return Scaffold(
backgroundColor: Hexcolor('#F5F5F5'), backgroundColor: Hexcolor('#F5F5F5'),
appBar: appBarTitle != '' appBar: isShowAppBar
? AppBar( ? AppBar(
elevation: 0, elevation: 0,
backgroundColor: Hexcolor('#515B5D'), backgroundColor: Hexcolor('#515B5D'),

Loading…
Cancel
Save