Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into fix-issues

 Conflicts:
	lib/screens/procedures/ProcedureCard.dart
	lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart
merge-requests/476/head
hussam al-habibeh 5 years ago
commit 6f914b3e93

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 760 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 595 B

@ -43,7 +43,7 @@ const Map<String, Map<String, String>> localizedValues = {
'notArrived': {'en': 'Not Arrived', 'ar': 'لم يصل'}, 'notArrived': {'en': 'Not Arrived', 'ar': 'لم يصل'},
'radiology': {'en': 'Radiology', 'ar': 'الأشعة'}, 'radiology': {'en': 'Radiology', 'ar': 'الأشعة'},
'service': {'en': 'Service', 'ar': 'خدمة'}, 'service': {'en': 'Service', 'ar': 'خدمة'},
'referral': {'en': 'Referral', 'ar': 'االإحالة'}, 'referral': {'en': 'Referral', 'ar': 'الإحالة'},
'inPatient': {'en': 'In Patient', 'ar': 'المريض الداخلي'}, 'inPatient': {'en': 'In Patient', 'ar': 'المريض الداخلي'},
'operations': {'en': 'Operations', 'ar': 'عمليات'}, 'operations': {'en': 'Operations', 'ar': 'عمليات'},
'patientServices': {'en': 'Patient Services', 'ar': 'خدمات المرضى'}, 'patientServices': {'en': 'Patient Services', 'ar': 'خدمات المرضى'},
@ -51,7 +51,7 @@ const Map<String, Map<String, String>> localizedValues = {
'myReferralPatient': {'en': 'My Referral Patient', 'ar': 'مرضى الاحالة'}, 'myReferralPatient': {'en': 'My Referral Patient', 'ar': 'مرضى الاحالة'},
'referPatient': {'en': 'Referral Patient', 'ar': 'إحالة مريض'}, 'referPatient': {'en': 'Referral Patient', 'ar': 'إحالة مريض'},
'myReferral': {'en': 'My Referral', 'ar': 'إحالة'}, 'myReferral': {'en': 'My Referral', 'ar': 'إحالة'},
'myReferredPatient': {'en': 'My Referred Patient', 'ar': 'مرضاي المحالين'}, 'myReferredPatient': {'en': 'Referred', 'ar': 'المحالين'},
'referredPatient': {'en': 'Referred Patient', 'ar': 'المرضى المحالين'}, 'referredPatient': {'en': 'Referred Patient', 'ar': 'المرضى المحالين'},
'referredOn': {'en': 'referred On : ', 'ar': ' : تمت الإحالة في'}, 'referredOn': {'en': 'referred On : ', 'ar': ' : تمت الإحالة في'},
'firstName': {'en': 'First Name', 'ar': 'الاسم الاول'}, 'firstName': {'en': 'First Name', 'ar': 'الاسم الاول'},
@ -843,4 +843,15 @@ const Map<String, Map<String, String>> localizedValues = {
"en": "Step", "en": "Step",
"ar": "خطوة" "ar": "خطوة"
}, },
"fieldRequired": {
"en": "This field is required",
"ar": "هذه الخانة مطلوبه"
},
"applyOrRescheduleLeave": {
"en": "Apply Or Reschedule Leave",
"ar": "التقدم بطلب أو إعادة جدولة الإجازة"
},"myQRCode": {
"en": "My QR Code",
"ar": "My QR Code"
},
}; };

@ -19,7 +19,7 @@ class MedicalFileViewModel extends BaseViewModel {
await _medicalFileService.getMedicalFile(mrn: mrn); await _medicalFileService.getMedicalFile(mrn: mrn);
if (_medicalFileService.hasError) { if (_medicalFileService.hasError) {
error = _medicalFileService.error; error = _medicalFileService.error;
setState(ViewState.ErrorLocal); setState(ViewState.Error);
} else } else
setState(ViewState.Idle); setState(ViewState.Idle);
} }

@ -46,7 +46,7 @@ class MyApp extends StatelessWidget {
child: Consumer<ProjectViewModel>( child: Consumer<ProjectViewModel>(
builder: (context, projectProvider, child) => MaterialApp( builder: (context, projectProvider, child) => MaterialApp(
showSemanticsDebugger: false, showSemanticsDebugger: false,
title: 'Flutter Demo', title: 'Doctors App',
locale: projectProvider.appLocal, locale: projectProvider.appLocal,
localizationsDelegates: [ localizationsDelegates: [
TranslationBaseDelegate(), TranslationBaseDelegate(),

@ -119,7 +119,7 @@ class _LoginsreenState extends State<Loginsreen> {
children: <Widget>[ children: <Widget>[
AuthHeader(loginType.knownUser), AuthHeader(loginType.knownUser),
SizedBox( SizedBox(
height: 60, height: 40,
), ),
LoginForm( LoginForm(
changeLoadingStata: changeLoadingStata, changeLoadingStata: changeLoadingStata,

@ -79,7 +79,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
PatientID: 0, PatientID: 0,
From: DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd') From: DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd')
.toString(), .toString(),
To: DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd') To: DateUtils.convertDateToFormat(
DateTime.now().add(Duration(days: 7, hours: 0)), 'yyyy-MM-dd')
.toString(), .toString(),
LanguageID: 2, LanguageID: 2,
stamp: "2020-03-02T13:56:39.170Z", stamp: "2020-03-02T13:56:39.170Z",
@ -1020,12 +1021,12 @@ class _DashboardScreenState extends State<DashboardScreen> {
), ),
hasBorder: false, hasBorder: false,
onTap: () { onTap: () {
// Navigator.push( Navigator.push(
// context, context,
// MaterialPageRoute( MaterialPageRoute(
// builder: (context) => builder: (context) =>
// SearchMedicinePatientScreen(), SearchMedicinePatientScreen(),
// )); ));
}, },
) )
], ],

@ -161,181 +161,6 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
), ),
); );
// return Padding(
// padding: EdgeInsets.symmetric(
// horizontal: 12.0, vertical: 8.0),
// child: InkWell(
// child: Container(
// width: double.infinity,
// margin: EdgeInsets.only(
// top: 10, left: 10, right: 10),
// padding: EdgeInsets.all(8.0),
// decoration: BoxDecoration(
// color: Colors.white,
// borderRadius: BorderRadius.all(
// Radius.circular(10.0),
// ),
// border: Border.all(
// color: Colors.grey[200], width: 0.5),
// ),
// child: Column(
// children: [
// Row(
// mainAxisAlignment:
// MainAxisAlignment.spaceBetween,
// children: [
// Row(
// children: [
// AppText(
// model
// .medicalFileList[0]
// .entityList[0]
// .timelines[index]
// .doctorName,
// fontWeight: FontWeight.w700,
// fontSize: 17.0,
// fontFamily: 'Poppins',
// )
// ],
// ),
// Row(
// children: [
// AppText(
// Helpers.convertStringToDate(model
// .medicalFileList[0]
// .entityList[0]
// .timelines[index]
// .date)
// .day
// .toString() +
// "/",
// ),
// AppText(
// Helpers.convertStringToDate(model
// .medicalFileList[0]
// .entityList[0]
// .timelines[index]
// .date)
// .month
// .toString() +
// "/",
// ),
// AppText(
// Helpers.convertStringToDate(
// model
// .medicalFileList[0]
// .entityList[0]
// .timelines[index]
// .date)
// .year
// .toString(),
// ),
// ],
// )
// ],
// ),
// Row(
// mainAxisAlignment:
// MainAxisAlignment.start,
// children: [
// Padding(
// padding: const EdgeInsets.all(8.0),
// child: Column(
// children: [
// ClipRRect(
// borderRadius:
// BorderRadius.all(
// Radius.circular(30)),
// child: Image.network(
// 'https://previews.123rf.com/images/yupiramos/yupiramos1705/yupiramos170524444/78443570-a-female-doctor-avatar-character-vector-illustration-design.jpg',
// fit: BoxFit.cover,
// width: 60,
// height: 70,
// ),
// ),
// ],
// ),
// ),
// Column(
// crossAxisAlignment:
// CrossAxisAlignment.start,
// children: [
// Row(
// children: [
// AppText(
// TranslationBase.of(context)
// .clinic +
// ": ",
// ),
// AppText(
// model
// .medicalFileList[0]
// .entityList[0]
// .timelines[index]
// .clinicName,
// fontWeight: FontWeight.w600,
// ),
// ],
// ),
// Row(
// mainAxisAlignment:
// MainAxisAlignment
// .spaceBetween,
// children: [
// AppText(
// TranslationBase.of(context)
// .branch +
// ": ",
// ),
// AppText(
// model
// .medicalFileList[0]
// .entityList[0]
// .timelines[index]
// .projectName,
// fontWeight: FontWeight.w600,
// ),
// ],
// ),
// ],
// ),
// ],
// ),
// Row(
// mainAxisAlignment:
// MainAxisAlignment.end,
// children: [
// Column(
// children: [
// Icon(
// Icons.remove_red_eye,
// size: 30.0,
// )
// ],
// )
// ],
// ),
// ],
// ),
// ),
// onTap: () {
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) =>
// MedicalFileDetails(
// age: patient.age,
// firstName: patient.firstName,
// lastName: patient.lastName,
// gender: patient.genderDescription,
// encounterNumber: index,
// pp: patient.patientId,
// patient: patient,
// )),
// );
// },
// ),
// );
}) })
: Column( : Column(
children: [ children: [

@ -176,11 +176,12 @@ class _PatientsScreenState extends State<PatientsScreen> {
patiantAppointment = patiantAppointment =
convertDateFormat(responseModelList[i].appointmentDate); convertDateFormat(responseModelList[i].appointmentDate);
} }
if (patiantAppointment != null) {
String dateAppointment = checkDate(patiantAppointment);
String dateAppointment = checkDate(patiantAppointment); if (dateAppointment.contains(str) || str == 'All') {
filterDate.add(responseModelList[i]);
if (dateAppointment.contains(str) || str == 'All') { }
filterDate.add(responseModelList[i]);
} }
} catch (e) { } catch (e) {
print(e); print(e);

@ -8,10 +8,12 @@ import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/order-procedure.dart'; import 'package:doctor_app_flutter/models/SOAP/order-procedure.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/profile/UCAF/page-stepper-widget.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/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/patients/profile/PatientHeaderWidgetNoAvatar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/PatientHeaderWidgetNoAvatar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.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: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/borderedButton.dart'; import 'package:doctor_app_flutter/widgets/shared/borderedButton.dart';
@ -45,6 +47,9 @@ class _UcafDetailScreenState extends State<UcafDetailScreen> {
}, },
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: true,
appBar: PatientProfileHeaderNewDesignAppBar(
patient, patientType, arrivalType),
appBarTitle: TranslationBase.of(context).ucaf, appBarTitle: TranslationBase.of(context).ucaf,
body: Column( body: Column(
children: [ children: [
@ -54,7 +59,32 @@ class _UcafDetailScreenState extends State<UcafDetailScreen> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
PatientHeaderWidgetNoAvatar(patient), // PatientHeaderWidgetNoAvatar(patient),
Container(
margin: EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
"${TranslationBase.of(context).patient}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.w600,
),
AppText(
"${TranslationBase.of(context).ucaf}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 3,
fontWeight: FontWeight.bold,
)
],
),
),
PageStepperWidget(
stepsCount: 2,
currentStepIndex: 2,
screenSize: screenSize,
),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
@ -80,48 +110,60 @@ class _UcafDetailScreenState extends State<UcafDetailScreen> {
), ),
Container( Container(
margin: EdgeInsets.symmetric(vertical: 8, horizontal: 16), margin: EdgeInsets.symmetric(vertical: 8, horizontal: 16),
child: BorderedButton( child: Row(
TranslationBase.of(context).save, children: [
hasBorder: true, Expanded(
vPadding: 8, child: Container(
hPadding: 8, child: BorderedButton(
borderColor: HexColor("#B8382B"), TranslationBase.of(context).cancel,
backgroundColor: HexColor("#B8382B"), hasBorder: true,
textColor: Colors.white, vPadding: 8,
fontSize: SizeConfig.textMultiplier * 2.0, hPadding: 8,
handler: () async { borderColor: Colors.white,
await model.postUCAF(patient); backgroundColor: Colors.white,
if (model.state == ViewState.Idle) { textColor: HexColor("#B8382B"),
DrAppToastMsg.showSuccesToast( fontSize: SizeConfig.textMultiplier * 2.2,
TranslationBase.of(context).postUcafSuccessMsg); handler: () {
Navigator.of(context).popUntil((route) { Navigator.of(context).popUntil((route) {
return route.settings.name == PATIENTS_PROFILE; return route.settings.name == PATIENTS_PROFILE;
}); });
} else { },
DrAppToastMsg.showErrorToast(model.error); ),
} ),
}, ),
), SizedBox(
), width: 8,
Container( ),
margin: EdgeInsets.only( Expanded(
left: 16, right: 16, top: 0.0, bottom: 8), child: Container(
child: BorderedButton( child: BorderedButton(
TranslationBase.of(context).cancel, TranslationBase.of(context).save,
hasBorder: true, hasBorder: true,
vPadding: 8, vPadding: 8,
hPadding: 8, hPadding: 8,
borderColor: Colors.white, borderColor: HexColor("#B8382B"),
backgroundColor: Colors.white, backgroundColor: HexColor("#B8382B"),
textColor: HexColor("#B8382B"), textColor: Colors.white,
fontSize: SizeConfig.textMultiplier * 2.2, fontSize: SizeConfig.textMultiplier * 2.0,
handler: () { handler: () async {
Navigator.of(context).popUntil((route) { await model.postUCAF(patient);
return route.settings.name == PATIENTS_PROFILE; if (model.state == ViewState.Idle) {
}); DrAppToastMsg.showSuccesToast(
}, TranslationBase.of(context).postUcafSuccessMsg);
Navigator.of(context).popUntil((route) {
return route.settings.name == PATIENTS_PROFILE;
});
} else {
DrAppToastMsg.showErrorToast(model.error);
}
},
),
),
),
],
), ),
), ),
], ],
), ),
)); ));

@ -1,6 +1,7 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/patient-ucaf-viewmodel.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-ucaf-viewmodel.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/profile/UCAF/page-stepper-widget.dart'; import 'package:doctor_app_flutter/screens/patients/profile/UCAF/page-stepper-widget.dart';
@ -115,7 +116,8 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
title: AppText( title: AppText(
TranslationBase.of(context).inPatient, TranslationBase.of(context).inPatient,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.1, fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 2.2,
), ),
value: _inPatient, value: _inPatient,
onChanged: (newValue) { onChanged: (newValue) {
@ -123,6 +125,7 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
_inPatient = newValue; _inPatient = newValue;
}); });
}, },
activeColor: HexColor("#D02127"),
controlAffinity: controlAffinity:
ListTileControlAffinity.leading, ListTileControlAffinity.leading,
contentPadding: EdgeInsets.all(0), contentPadding: EdgeInsets.all(0),
@ -131,7 +134,8 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
title: AppText( title: AppText(
TranslationBase.of(context).emergencyCase, TranslationBase.of(context).emergencyCase,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.1, fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 2.2,
), ),
value: _emergencyCase, value: _emergencyCase,
onChanged: (newValue) { onChanged: (newValue) {
@ -139,14 +143,14 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
_emergencyCase = newValue; _emergencyCase = newValue;
}); });
}, },
activeColor: HexColor("#D02127"),
controlAffinity: controlAffinity:
ListTileControlAffinity.leading, ListTileControlAffinity.leading,
contentPadding: EdgeInsets.all(0), contentPadding: EdgeInsets.all(0),
), ),
AppTextFieldCustom( AppTextFieldCustom(
height: screenSize.height * 0.075, hintText: TranslationBase.of(context)
hintText: .durationOfIllness,
TranslationBase.of(context).durationOfIllness,
dropDownText: "3", dropDownText: "3",
inputType: TextInputType.number, inputType: TextInputType.number,
inputFormatters: [ inputFormatters: [
@ -163,6 +167,14 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
children: [ children: [
Row( Row(
children: [ children: [
Icon(
DoctorApp.warning,
size: 20,
color: Color(0xFFCC9B14),
),
SizedBox(
width: 8,
),
AppText( AppText(
"BP (H/L)", "BP (H/L)",
fontSize: fontSize:
@ -183,7 +195,7 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
], ],
), ),
SizedBox( SizedBox(
width: 4, width: 6,
), ),
Expanded( Expanded(
child: Row( child: Row(
@ -196,7 +208,7 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
), ),
SizedBox( SizedBox(
width: 8, width: 4,
), ),
Expanded( Expanded(
child: AppText( child: AppText(
@ -213,7 +225,7 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
], ],
), ),
SizedBox( SizedBox(
height: 4, height: 2,
), ),
Row( Row(
mainAxisAlignment: mainAxisAlignment:
@ -222,14 +234,14 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
Row( Row(
children: [ children: [
AppText( AppText(
"${TranslationBase.of(context).pulseBeats} :", "${TranslationBase.of(context).pulseBeats}:",
fontSize: fontSize:
SizeConfig.textMultiplier * 1.8, SizeConfig.textMultiplier * 1.8,
color: Colors.black, color: Colors.black,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
), ),
SizedBox( SizedBox(
width: 8, width: 4,
), ),
AppText( AppText(
"${model.patientVitalSigns.pulseBeatPerMinute}", "${model.patientVitalSigns.pulseBeatPerMinute}",
@ -246,10 +258,12 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
height: 16, height: 16,
), ),
AppText( AppText(
TranslationBase.of(context).chiefComplaintsAndSymptoms, TranslationBase.of(context)
.chiefComplaintsAndSymptoms,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 2.1, fontSize: SizeConfig.textMultiplier * 2.2,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: Color(0xFF2E303A),
), ),
SizedBox( SizedBox(
height: 4, height: 4,
@ -259,13 +273,15 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
.patientFeelsPainInHisBackAndCough, .patientFeelsPainInHisBackAndCough,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: Color(0xFF575757),
fontSize: SizeConfig.textMultiplier * 1.8, fontSize: SizeConfig.textMultiplier * 1.8,
), ),
SizedBox( SizedBox(
height: 8, height: 8,
), ),
AppTextFieldCustom( AppTextFieldCustom(
hintText: TranslationBase.of(context).instruction, hintText:
TranslationBase.of(context).instruction,
dropDownText: helpers.parseHtmlString(model dropDownText: helpers.parseHtmlString(model
.patientChiefComplaintList[0] .patientChiefComplaintList[0]
.chiefComplaint), .chiefComplaint),
@ -281,16 +297,18 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
AppText( AppText(
TranslationBase.of(context).otherConditions, TranslationBase.of(context).otherConditions,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0, fontSize: SizeConfig.textMultiplier * 2.1,
color: Color(0xFF2E303A),
), ),
...List.generate( ...List.generate(
conditionsData.length, conditionsData.length,
(index) => CheckboxListTile( (index) => CheckboxListTile(
title: AppText( title: AppText(
conditionsData[index]['name'], conditionsData[index]['name'],
fontWeight: FontWeight.bold, fontWeight: FontWeight.normal,
fontSize: fontSize:
SizeConfig.textMultiplier * 2.1, SizeConfig.textMultiplier * 2.1,
fontFamily: 'Poppins',
), ),
value: conditionsData[index] value: conditionsData[index]
['isChecked'], ['isChecked'],
@ -307,115 +325,76 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
SizedBox( SizedBox(
height: 8, height: 8,
), ),
Container( AppTextFieldCustom(
height: screenSize.height * 0.070, hintText: TranslationBase.of(context).other,
child: TextField( dropDownText: "None",
decoration: enabled: false,
Helpers.textFieldSelectorDecoration( ),
TranslationBase.of(context).other,
null,
false),
enabled: true,
controller: _otherController,
keyboardType: TextInputType.text,
)),
SizedBox( SizedBox(
height: 8, height: 8,
), ),
Container( AppTextFieldCustom(
height: screenSize.height * 0.070, hintText: TranslationBase.of(context).how,
child: TextField( dropDownText: "None",
decoration: enabled: false,
Helpers.textFieldSelectorDecoration( ),
TranslationBase.of(context).how,
null,
false),
enabled: true,
controller: _howController,
keyboardType: TextInputType.text,
)),
SizedBox( SizedBox(
height: 8, height: 8,
), ),
Row( Row(
children: [ children: [
Expanded( Expanded(
child: Container( child: AppTextFieldCustom(
height: screenSize.height * 0.070, hintText:
child: TextField( TranslationBase.of(context).when,
decoration: Helpers dropDownText: "None",
.textFieldSelectorDecoration( enabled: false,
TranslationBase.of(context) ),
.when,
null,
false),
enabled: true,
controller: _whenController,
keyboardType: TextInputType.text,
)),
), ),
SizedBox( SizedBox(
width: 4, width: 4,
), ),
Expanded( Expanded(
child: Container( child: AppTextFieldCustom(
height: screenSize.height * 0.070, hintText:
child: TextField( TranslationBase.of(context).where,
decoration: Helpers dropDownText: "None",
.textFieldSelectorDecoration( enabled: false,
TranslationBase.of(context) ),
.where,
null,
false),
enabled: true,
controller: _whereController,
keyboardType: TextInputType.text,
)),
), ),
], ],
), ),
SizedBox( SizedBox(
height: 8, height: 8,
), ),
Container( AppTextFieldCustom(
child: TextField( height: screenSize.height * 0.1,
decoration: hintText: TranslationBase.of(context)
Helpers.textFieldSelectorDecoration( .specifyPossibleLineManagement,
TranslationBase.of(context) dropDownText: "None",
.specifyPossibleLineManagement, enabled: false,
null,
false),
enabled: true,
controller: _managementsLineController,
keyboardType: TextInputType.text,
minLines: 4, minLines: 4,
maxLines: 6, maxLines: 6,
)), ),
SizedBox( SizedBox(
height: 16, height: 26,
), ),
AppText( AppText(
TranslationBase.of(context).significantSigns, TranslationBase.of(context).significantSigns,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0, fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 2.2,
), ),
SizedBox( SizedBox(
height: 8, height: 8,
), ),
Container( AppTextFieldCustom(
child: TextField( height: screenSize.height * 0.1,
decoration: hintText:
Helpers.textFieldSelectorDecoration( TranslationBase.of(context).backAbdomen,
TranslationBase.of(context) dropDownText: "BackLNeck",
.backAbdomen, enabled: false,
null, ),
false),
enabled: true,
controller: _signsController,
keyboardType: TextInputType.multiline,
minLines: null,
maxLines: null,
)),
], ],
), ),
), ),
@ -430,7 +409,11 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
color: HexColor("#D02127"), color: HexColor("#D02127"),
onPressed: () { onPressed: () {
Navigator.of(context).pushNamed(PATIENT_UCAF_DETAIL, Navigator.of(context).pushNamed(PATIENT_UCAF_DETAIL,
arguments: {'patient': patient}); arguments: {
'patient': patient,
'patientType': patientType,
'arrivalType': arrivalType
});
}, },
), ),
), ),

@ -4,6 +4,15 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
/// *
/// By Mousa Zaid Mousa Abuzaid
/// At 13/4/2021
/*
All hex value from 100% to 0% alpha: used in line 122
https://gist.github.com/lopspower/03fb1cc0ac9f32ef38f4
*/
class PageStepperWidget extends StatelessWidget { class PageStepperWidget extends StatelessWidget {
final int stepsCount; final int stepsCount;
final int currentStepIndex; final int currentStepIndex;
@ -38,6 +47,7 @@ class PageStepperWidget extends StatelessWidget {
} }
class StepWidget extends StatelessWidget { class StepWidget extends StatelessWidget {
final int index; final int index;
final bool isInProgress; final bool isInProgress;
final bool isFinalStep; final bool isFinalStep;
@ -68,27 +78,28 @@ class StepWidget extends StatelessWidget {
Container( Container(
padding: EdgeInsets.all(0.0), padding: EdgeInsets.all(0.0),
margin: EdgeInsets.symmetric(horizontal: 1), margin: EdgeInsets.symmetric(horizontal: 1),
width: 25, width: 30,
height: 25, height: 30,
decoration: BoxDecoration( decoration: BoxDecoration(
color: isInProgress ? Color(0xFFCC9B14) : Color(0xFFC9C9C9), color: status == StepStatus.InProgress ? Color(0xFFCC9B14) : status == StepStatus.Locked ? Color(0xFFE3E3E3) : Color(0xFF359846),
shape: BoxShape.circle, shape: BoxShape.circle,
border: Border.all( border: Border.all(
color: isInProgress ? Color(0xFFCC9B14) : Color(0xFFC9C9C9), color: status == StepStatus.InProgress ? Color(0xFFCC9B14) : status == StepStatus.Locked ? Color(0xFFE3E3E3) : Color(0xFF359846),
width: 1), width: 1),
), ),
child: Center( child: Center(
child: Icon( child: Icon(
Icons.check, Icons.check,
size: 20, size: 20,
color: status == StepStatus.InProgress ? Colors.white : status == StepStatus.Locked ? Colors.grey.shade800 : Color(0xFF359846), color: status == StepStatus.Locked ? Color(0xFF969696) : Colors.white,
)), )),
), ),
if (!isFinalStep) if (!isFinalStep)
Container( Container(
margin: EdgeInsets.symmetric(horizontal: 4),
width: dividerWidth, width: dividerWidth,
height: 2, height: 2,
color: Colors.grey, color: status == StepStatus.Completed ? Color(0xFF359846) : Color(0xFFCCCCCC),
), ),
], ],
), ),
@ -98,23 +109,27 @@ class StepWidget extends StatelessWidget {
AppText( AppText(
"${TranslationBase.of(context).step} $index", "${TranslationBase.of(context).step} $index",
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: status == StepStatus.InProgress ? Colors.black : status == StepStatus.Locked ? Colors.grey : Color(0xFF359846), color: status == StepStatus.Locked ? Color(0xFF969696) : Colors.black,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.6, fontSize: SizeConfig.textMultiplier * 1.6,
), ),
Container( Container(
margin: EdgeInsets.symmetric(vertical: 4), margin: EdgeInsets.symmetric(vertical: 4),
padding: EdgeInsets.symmetric(horizontal: 4, vertical: 2), padding: EdgeInsets.symmetric(horizontal: 12, vertical: 4),
decoration: BoxDecoration( decoration: BoxDecoration(
color: status == StepStatus.InProgress color: status == StepStatus.InProgress
? Color(0xFFF1E9D3) ? Color(0xFFF1E9D3)
: status == StepStatus.Locked : status == StepStatus.Locked
? Color(0xFFD8E8DB) ? Color(0x29797979)
: Color(0xFFCCCCCC), : Color(0xFFD8E8D8),
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(8.0), Radius.circular(4.0),
), ),
border: Border.all(color: HexColor('#707070'), width: 0.30), border: Border.all(color: status == StepStatus.InProgress
? Color(0xFFF1E9D3)
: status == StepStatus.Locked
? Color(0x29797979)
: Color(0xFFD8E8D8), width: 0.30),
), ),
child: AppText( child: AppText(
status == StepStatus.InProgress status == StepStatus.InProgress

@ -44,6 +44,12 @@ class _AdmissionRequestThirdScreenState
bool _isSickLeaveRequired = false; bool _isSickLeaveRequired = false;
bool _patientPregnant = false; bool _patientPregnant = false;
String clinicError;
String doctorError;
String sickLeaveCommentError;
String medicalHistoryError;
String surgicalHistoryError;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map; final routeArgs = ModalRoute.of(context).settings.arguments as Map;
@ -117,15 +123,16 @@ class _AdmissionRequestThirdScreenState
height: screenSize.height * 0.075, height: screenSize.height * 0.075,
hintText: TranslationBase.of(context).clinic, hintText: TranslationBase.of(context).clinic,
isDropDown: true, isDropDown: true,
validationError: clinicError,
dropDownText: _selectedClinic != null dropDownText: _selectedClinic != null
? _selectedClinic['clinicGroupName'] ? projectViewModel.isArabic? _selectedClinic['clinicNameArabic'] : _selectedClinic['clinicNameEnglish']
: null, : null,
enabled: false, enabled: false,
onClick: model.clinicList != null && onClick: model.clinicList != null &&
model.clinicList.length > 0 model.clinicList.length > 0
? () { ? () {
openListDialogField( openListDialogField(
'clinicGroupName', projectViewModel.isArabic? 'clinicNameArabic' : 'clinicNameEnglish',
'clinicID', 'clinicID',
model.clinicList, (selectedValue) { model.clinicList, (selectedValue) {
setState(() { setState(() {
@ -142,7 +149,7 @@ class _AdmissionRequestThirdScreenState
if (model.state == ViewState.Idle && if (model.state == ViewState.Idle &&
model.clinicList.length > 0) { model.clinicList.length > 0) {
openListDialogField( openListDialogField(
'clinicGroupName', projectViewModel.isArabic? 'clinicNameArabic' : 'clinicNameEnglish',
'clinicID', 'clinicID',
model.clinicList, (selectedValue) { model.clinicList, (selectedValue) {
setState(() { setState(() {
@ -170,6 +177,7 @@ class _AdmissionRequestThirdScreenState
? _selectedDoctor['DoctorName'] ? _selectedDoctor['DoctorName']
: null, : null,
enabled: false, enabled: false,
validationError: doctorError,
onClick: _selectedClinic != null onClick: _selectedClinic != null
? model.doctorsList != null && ? model.doctorsList != null &&
model.doctorsList.length > 0 model.doctorsList.length > 0
@ -263,6 +271,7 @@ class _AdmissionRequestThirdScreenState
controller: _sickLeaveCommentsController, controller: _sickLeaveCommentsController,
minLines: 2, minLines: 2,
maxLines: 4, maxLines: 4,
validationError: sickLeaveCommentError,
inputType: TextInputType.multiline, inputType: TextInputType.multiline,
), ),
SizedBox( SizedBox(
@ -331,6 +340,7 @@ class _AdmissionRequestThirdScreenState
controller: _postMedicalHistoryController, controller: _postMedicalHistoryController,
minLines: 4, minLines: 4,
maxLines: 6, maxLines: 6,
validationError: medicalHistoryError,
inputType: TextInputType.multiline, inputType: TextInputType.multiline,
), ),
SizedBox( SizedBox(
@ -341,6 +351,7 @@ class _AdmissionRequestThirdScreenState
controller: _postSurgicalHistoryController, controller: _postSurgicalHistoryController,
minLines: 2, minLines: 2,
maxLines: 4, maxLines: 4,
validationError: surgicalHistoryError,
inputType: TextInputType.multiline, inputType: TextInputType.multiline,
), ),
], ],
@ -401,6 +412,34 @@ class _AdmissionRequestThirdScreenState
} else { } else {
DrAppToastMsg.showErrorToast( DrAppToastMsg.showErrorToast(
TranslationBase.of(context).pleaseFill); TranslationBase.of(context).pleaseFill);
setState(() {
if(_selectedClinic == null){
clinicError = TranslationBase.of(context).fieldRequired;
}else {
clinicError = null;
}
if(_selectedDoctor == null){
doctorError = TranslationBase.of(context).fieldRequired;
}else {
doctorError = null;
}
if(_sickLeaveCommentsController.text == ""){
sickLeaveCommentError = TranslationBase.of(context).fieldRequired;
}else {
sickLeaveCommentError = null;
}
if(_postMedicalHistoryController.text == ""){
medicalHistoryError = TranslationBase.of(context).fieldRequired;
}else {
medicalHistoryError = null;
}
if(_postSurgicalHistoryController.text == ""){
surgicalHistoryError = TranslationBase.of(context).fieldRequired;
}else {
surgicalHistoryError = null;
}
});
} }
}, },
), ),

@ -38,6 +38,10 @@ class _AdmissionRequestThirdScreenState
dynamic _selectedIcd; dynamic _selectedIcd;
dynamic _selectedDiagnosisType; dynamic _selectedDiagnosisType;
String diagnosisError;
String icdError;
String diagnosisTypeError;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map; final routeArgs = ModalRoute.of(context).settings.arguments as Map;
@ -112,6 +116,7 @@ class _AdmissionRequestThirdScreenState
: null, : null,
enabled: false, enabled: false,
isDropDown: true, isDropDown: true,
validationError: diagnosisError,
onClick: model.diagnosisTypesList != null && onClick: model.diagnosisTypesList != null &&
model.diagnosisTypesList.length > 0 model.diagnosisTypesList.length > 0
? () { ? () {
@ -157,6 +162,7 @@ class _AdmissionRequestThirdScreenState
: null, : null,
enabled: false, enabled: false,
isDropDown: true, isDropDown: true,
validationError: icdError,
onClick: model.icdCodes != null && onClick: model.icdCodes != null &&
model.icdCodes.length > 0 model.icdCodes.length > 0
? () { ? () {
@ -204,6 +210,7 @@ class _AdmissionRequestThirdScreenState
: null, : null,
enabled: false, enabled: false,
isDropDown: true, isDropDown: true,
validationError: diagnosisTypeError,
onClick: model.listOfDiagnosisSelectionTypes != onClick: model.listOfDiagnosisSelectionTypes !=
null && null &&
model.listOfDiagnosisSelectionTypes.length > model.listOfDiagnosisSelectionTypes.length >
@ -312,6 +319,26 @@ class _AdmissionRequestThirdScreenState
} else { } else {
DrAppToastMsg.showErrorToast( DrAppToastMsg.showErrorToast(
TranslationBase.of(context).pleaseFill); TranslationBase.of(context).pleaseFill);
setState(() {
if(_selectedDiagnosis == null){
diagnosisError = TranslationBase.of(context).fieldRequired;
}else {
diagnosisError = null;
}
if(_selectedIcd == null){
icdError = TranslationBase.of(context).fieldRequired;
}else {
icdError = null;
}
if(_selectedDiagnosisType == null){
diagnosisTypeError = TranslationBase.of(context).fieldRequired;
}else {
diagnosisTypeError = null;
}
});
} }
}, },
), ),

@ -50,6 +50,18 @@ class _AdmissionRequestSecondScreenState
dynamic _selectedRoomCategory; dynamic _selectedRoomCategory;
dynamic _selectedAdmissionType; dynamic _selectedAdmissionType;
String costError;
String plansError;
String otherInterventionsError;
String expectedDaysError;
String expectedDatesError;
String floorError;
String roomError;
String treatmentsError;
String complicationsError;
String proceduresError;
String admissionTypeError;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map; final routeArgs = ModalRoute.of(context).settings.arguments as Map;
@ -125,6 +137,7 @@ class _AdmissionRequestSecondScreenState
hintText: hintText:
TranslationBase.of(context).estimatedCost, TranslationBase.of(context).estimatedCost,
controller: _estimatedCostController, controller: _estimatedCostController,
validationError: costError,
inputType: TextInputType.number, inputType: TextInputType.number,
inputFormatters: [ inputFormatters: [
FilteringTextInputFormatter.allow( FilteringTextInputFormatter.allow(
@ -138,6 +151,7 @@ class _AdmissionRequestSecondScreenState
hintText: TranslationBase.of(context).postPlans, hintText: TranslationBase.of(context).postPlans,
controller: _postPlansEstimatedCostController, controller: _postPlansEstimatedCostController,
inputType: TextInputType.multiline, inputType: TextInputType.multiline,
validationError: plansError,
minLines: 4, minLines: 4,
maxLines: 6, maxLines: 6,
), ),
@ -150,6 +164,7 @@ class _AdmissionRequestSecondScreenState
controller: controller:
_otherDepartmentsInterventionsController, _otherDepartmentsInterventionsController,
inputType: TextInputType.multiline, inputType: TextInputType.multiline,
validationError: otherInterventionsError,
minLines: 2, minLines: 2,
maxLines: 4, maxLines: 4,
), ),
@ -170,6 +185,7 @@ class _AdmissionRequestSecondScreenState
hintText: hintText:
TranslationBase.of(context).expectedDays, TranslationBase.of(context).expectedDays,
controller: _expectedDaysController, controller: _expectedDaysController,
validationError: expectedDaysError,
inputType: TextInputType.number, inputType: TextInputType.number,
inputFormatters: [ inputFormatters: [
FilteringTextInputFormatter.allow( FilteringTextInputFormatter.allow(
@ -188,6 +204,7 @@ class _AdmissionRequestSecondScreenState
: null, : null,
enabled: false, enabled: false,
isDropDown: true, isDropDown: true,
validationError: expectedDatesError,
suffixIcon: Icon( suffixIcon: Icon(
Icons.calendar_today, Icons.calendar_today,
color: Colors.black, color: Colors.black,
@ -215,6 +232,7 @@ class _AdmissionRequestSecondScreenState
: null, : null,
enabled: false, enabled: false,
isDropDown: true, isDropDown: true,
validationError: floorError,
onClick: model.floorList != null && onClick: model.floorList != null &&
model.floorList.length > 0 model.floorList.length > 0
? () { ? () {
@ -314,6 +332,7 @@ class _AdmissionRequestSecondScreenState
: null, : null,
enabled: false, enabled: false,
isDropDown: true, isDropDown: true,
validationError: roomError,
onClick: model.roomCategoryList != null && onClick: model.roomCategoryList != null &&
model.roomCategoryList.length > 0 model.roomCategoryList.length > 0
? () { ? () {
@ -365,6 +384,7 @@ class _AdmissionRequestSecondScreenState
TranslationBase.of(context).treatmentLine, TranslationBase.of(context).treatmentLine,
controller: _treatmentLineController, controller: _treatmentLineController,
inputType: TextInputType.multiline, inputType: TextInputType.multiline,
validationError: treatmentsError,
minLines: 3, minLines: 3,
maxLines: 5, maxLines: 5,
), ),
@ -376,6 +396,7 @@ class _AdmissionRequestSecondScreenState
TranslationBase.of(context).complications, TranslationBase.of(context).complications,
controller: _complicationsController, controller: _complicationsController,
inputType: TextInputType.multiline, inputType: TextInputType.multiline,
validationError: complicationsError,
minLines: 3, minLines: 3,
maxLines: 5, maxLines: 5,
), ),
@ -387,6 +408,7 @@ class _AdmissionRequestSecondScreenState
TranslationBase.of(context).otherProcedure, TranslationBase.of(context).otherProcedure,
controller: _otherProceduresController, controller: _otherProceduresController,
inputType: TextInputType.multiline, inputType: TextInputType.multiline,
validationError: proceduresError,
minLines: 3, minLines: 3,
maxLines: 5, maxLines: 5,
), ),
@ -402,6 +424,7 @@ class _AdmissionRequestSecondScreenState
: null, : null,
enabled: false, enabled: false,
isDropDown: true, isDropDown: true,
validationError: admissionTypeError,
onClick: model.admissionTypeList != null && onClick: model.admissionTypeList != null &&
model.admissionTypeList.length > 0 model.admissionTypeList.length > 0
? () { ? () {
@ -533,6 +556,75 @@ class _AdmissionRequestSecondScreenState
} else { } else {
DrAppToastMsg.showErrorToast( DrAppToastMsg.showErrorToast(
TranslationBase.of(context).pleaseFill); TranslationBase.of(context).pleaseFill);
setState(() {
if (_estimatedCostController.text == "") {
costError = TranslationBase.of(context).fieldRequired;
} else {
costError = null;
}
if (_postPlansEstimatedCostController.text == "") {
plansError = TranslationBase.of(context).fieldRequired;
} else {
plansError = null;
}
if (_expectedDaysController.text == "") {
expectedDaysError = TranslationBase.of(context).fieldRequired;
} else {
expectedDaysError = null;
}
if (_expectedAdmissionDate == null) {
expectedDatesError = TranslationBase.of(context).fieldRequired;
} else {
expectedDatesError = null;
}
if (_otherDepartmentsInterventionsController.text == "") {
otherInterventionsError = TranslationBase.of(context).fieldRequired;
} else {
otherInterventionsError = null;
}
if (_selectedFloor == null) {
floorError = TranslationBase.of(context).fieldRequired;
} else {
floorError = null;
}
if (_selectedRoomCategory == null) {
roomError = TranslationBase.of(context).fieldRequired;
} else {
roomError = null;
}
if (_treatmentLineController.text == "") {
treatmentsError = TranslationBase.of(context).fieldRequired;
} else {
treatmentsError = null;
}
if (_complicationsController.text == "") {
complicationsError = TranslationBase.of(context).fieldRequired;
} else {
complicationsError = null;
}
if (_otherProceduresController.text == "") {
proceduresError = TranslationBase.of(context).fieldRequired;
} else {
proceduresError = null;
}
if (_selectedAdmissionType == null) {
admissionTypeError = TranslationBase.of(context).fieldRequired;
} else {
admissionTypeError = null;
}
});
} }
}, },
), ),

@ -43,6 +43,8 @@ class _LaboratoryResultPageState extends State<LaboratoryResultPage> {
orderNo: widget.patientLabOrders.orderNo, orderNo: widget.patientLabOrders.orderNo,
appointmentDate:widget.patientLabOrders.orderDate, appointmentDate:widget.patientLabOrders.orderDate,
doctorName: widget.patientLabOrders.doctorName, doctorName: widget.patientLabOrders.doctorName,
branch: widget.patientLabOrders.projectName,
clinic: widget.patientLabOrders.clinicDescription,
profileUrl: widget.patientLabOrders.doctorImageURL, profileUrl: widget.patientLabOrders.doctorImageURL,
invoiceNO: widget.patientLabOrders.invoiceNo, invoiceNO: widget.patientLabOrders.invoiceNo,
), ),

@ -150,6 +150,7 @@ class LabsHomePage extends StatelessWidget {
invoiceNO: ' ${labOrder.invoiceNo}', invoiceNO: ' ${labOrder.invoiceNo}',
profileUrl: labOrder.doctorImageURL, profileUrl: labOrder.doctorImageURL,
branch: labOrder.projectName, branch: labOrder.projectName,
clinic: labOrder.clinicDescription,
appointmentDate: labOrder.orderDate, appointmentDate: labOrder.orderDate,
orderNo: labOrder.orderNo, orderNo: labOrder.orderNo,
); );

@ -141,24 +141,29 @@ class PatientProfileScreen extends StatelessWidget {
if (patient.episodeNo != 0) if (patient.episodeNo != 0)
BorderedButton( BorderedButton(
"${TranslationBase.of(context).update}\n${TranslationBase.of(context).episode}", "${TranslationBase.of(context).update}\n${TranslationBase.of(context).episode}",
backgroundColor: Colors.red.shade700, backgroundColor:
textColor: Colors.white, patient.patientStatusType == 43
vPadding: 8, ? Colors.red.shade700
radius: 30, : Colors.grey.shade700,
hPadding: 20, textColor: Colors.white,
fontWeight: FontWeight.normal, vPadding: 8,
fontSize: 12, radius: 30,
fontFamily: 'Poppins', hPadding: 20,
icon: Image.asset( fontWeight: FontWeight.normal,
"assets/images/modilfy-episode.png", fontSize: 12,
color: Colors.white, fontFamily: 'Poppins',
height: 30, icon: Image.asset(
"assets/images/modilfy-episode.png",
color: Colors.white,
height: 30,
), ),
handler: () { handler: () {
Navigator.of(context).pushNamed( if (patient.patientStatusType == 43) {
UPDATE_EPISODE, Navigator.of(context).pushNamed(
arguments: {'patient': patient}); UPDATE_EPISODE,
}, arguments: {'patient': patient});
}
}
), ),
], ],
), ),

@ -43,6 +43,8 @@ class RadiologyDetailsPage extends StatelessWidget {
arrivalType: arrivalType ?? "0", arrivalType: arrivalType ?? "0",
appointmentDate: finalRadiology.orderDate, appointmentDate: finalRadiology.orderDate,
doctorName: finalRadiology.doctorName, doctorName: finalRadiology.doctorName,
clinic: finalRadiology.clinicDescription,
branch: finalRadiology.projectName,
profileUrl: finalRadiology.doctorImageURL, profileUrl: finalRadiology.doctorImageURL,
invoiceNO: finalRadiology.invoiceNo.toString(), invoiceNO: finalRadiology.invoiceNo.toString(),
), ),
@ -54,6 +56,7 @@ class RadiologyDetailsPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Container( Container(
width: double.maxFinite,
margin: EdgeInsets.all(8), margin: EdgeInsets.all(8),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,

@ -138,9 +138,10 @@ class RadiologyHomePage extends StatelessWidget {
profileUrl: model.radiologyList[index].doctorImageURL, profileUrl: model.radiologyList[index].doctorImageURL,
invoiceNO: '${model.radiologyList[index].invoiceNo}', invoiceNO: '${model.radiologyList[index].invoiceNo}',
branch: '${model.radiologyList[index].projectName}', branch: '${model.radiologyList[index].projectName}',
appointmentDate: model.radiologyList[index].orderDate, clinic: model.radiologyList[index].clinicDescription,
), appointmentDate: model.radiologyList[index].orderDate,
)), ),
)),
], ],
), ),
), ),

@ -44,12 +44,12 @@ class _PatientReferralScreen extends State<PatientReferralScreen>
child: Container( child: Container(
height: 60.0, height: 60.0,
// margin: EdgeInsets.only(top: 10.0), // margin: EdgeInsets.only(top: 10.0),
width: MediaQuery.of(context).size.width * 0.92, // 0.9, width: MediaQuery.of(context).size.width * 1, // 0.92,
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border( border: Border(
bottom: BorderSide( bottom: BorderSide(
color: Theme.of(context).dividerColor, color: Theme.of(context).dividerColor,
width: 0.9), //width: 0.7 width: 1), //width: 0.7
), ),
color: Colors.white), color: Colors.white),
child: Center( child: Center(
@ -68,7 +68,7 @@ class _PatientReferralScreen extends State<PatientReferralScreen>
width: MediaQuery.of(context).size.width * 0.30, width: MediaQuery.of(context).size.width * 0.30,
child: Center( child: Center(
child: child:
AppText(TranslationBase.of(context).myReferral), AppText(TranslationBase.of(context).referral),
), ),
), ),
Container( Container(

@ -10,6 +10,7 @@ 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/patients/patient-referral-item-widget.dart'; import 'package:doctor_app_flutter/widgets/patients/patient-referral-item-widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart';
import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart'; import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
@ -38,6 +39,11 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
DateTime appointmentDate; DateTime appointmentDate;
final _remarksController = TextEditingController(); final _remarksController = TextEditingController();
String branchError = null;
String hospitalError = null;
String clinicError = null;
String doctorError = null;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
@ -71,7 +77,9 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
appBarTitle: TranslationBase.of(context).referPatient, appBarTitle: TranslationBase.of(context).referPatient,
isShowAppBar: false, isShowAppBar: true,
appBar: PatientProfileHeaderNewDesignAppBar(
patient, patientType, arrivalType),
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
child: Column( child: Column(
@ -80,8 +88,8 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
PatientProfileHeaderNewDesign( /*PatientProfileHeaderNewDesign(
patient, patientType, arrivalType), patient, patientType, arrivalType),*/
Container( Container(
margin: EdgeInsets.all(16.0), margin: EdgeInsets.all(16.0),
child: Column( child: Column(
@ -145,6 +153,28 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: HexColor("#359846"), color: HexColor("#359846"),
onPressed: () { onPressed: () {
setState(() {
if(_referTo == null){
branchError = TranslationBase.of(context).fieldRequired;
}else {
branchError = null;
}
if(_selectedBranch == null){
hospitalError = TranslationBase.of(context).fieldRequired;
}else {
hospitalError = null;
}
if(_selectedClinic == null){
clinicError = TranslationBase.of(context).fieldRequired;
}else {
clinicError = null;
}
if(_selectedDoctor == null){
doctorError = TranslationBase.of(context).fieldRequired;
}else {
doctorError = null;
}
});
if (appointmentDate == null || if (appointmentDate == null ||
_selectedBranch == null || _selectedBranch == null ||
_selectedClinic == null || _selectedClinic == null ||
@ -186,6 +216,7 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
dropDownText: _referTo != null ? _referTo['name'] : null, dropDownText: _referTo != null ? _referTo['name'] : null,
enabled: false, enabled: false,
isDropDown: true, isDropDown: true,
validationError: branchError,
onClick: referToList != null onClick: referToList != null
? () { ? () {
ListSelectDialog dialog = ListSelectDialog( ListSelectDialog dialog = ListSelectDialog(
@ -238,6 +269,7 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
: null, : null,
enabled: false, enabled: false,
isDropDown: true, isDropDown: true,
validationError: hospitalError,
onClick: model.branchesList != null && onClick: model.branchesList != null &&
model.branchesList.length > 0 && model.branchesList.length > 0 &&
_referTo != null && _referTo != null &&
@ -285,6 +317,7 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
: null, : null,
enabled: false, enabled: false,
isDropDown: true, isDropDown: true,
validationError: clinicError,
onClick: _selectedBranch != null && onClick: _selectedBranch != null &&
model.clinicsList != null && model.clinicsList != null &&
model.clinicsList.length > 0 model.clinicsList.length > 0
@ -332,6 +365,7 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
_selectedDoctor != null ? _selectedDoctor['DoctorName'] : null, _selectedDoctor != null ? _selectedDoctor['DoctorName'] : null,
enabled: false, enabled: false,
isDropDown: true, isDropDown: true,
validationError: doctorError,
onClick: _selectedClinic != null && onClick: _selectedClinic != null &&
model.doctorsList != null && model.doctorsList != null &&
model.doctorsList.length > 0 model.doctorsList.length > 0
@ -357,7 +391,13 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
}, },
); );
} }
: null, : (){
if(_selectedClinic == null){
DrAppToastMsg.showErrorToast("You need to select a clinic first");
} else if(model.doctorsList == null || model.doctorsList.length == 0){
DrAppToastMsg.showErrorToast("There is no doctors for this clinic");
}
},
), ),
SizedBox( SizedBox(
height: 10, height: 10,

@ -90,10 +90,10 @@ class LineChartCurvedBloodPressure extends StatelessWidget {
height: 20, height: 20,
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
color: Colors.grey), color: Colors.red),
), ),
SizedBox(width: 5,), SizedBox(width: 5,),
AppText(TranslationBase.of(context).diastolicLng) AppText(TranslationBase.of(context).diastolicLng,)
], ],
), ),
], ],
@ -248,7 +248,7 @@ class LineChartCurvedBloodPressure extends StatelessWidget {
final LineChartBarData lineChartBarData2 = LineChartBarData( final LineChartBarData lineChartBarData2 = LineChartBarData(
spots: spots2, spots: spots2,
isCurved: true, isCurved: true,
colors: [Colors.grey], colors: [Colors.red],
barWidth: 5, barWidth: 5,
isStrokeCapRound: true, isStrokeCapRound: true,
dotData: FlDotData( dotData: FlDotData(

@ -51,7 +51,7 @@ class VitalSignItem extends StatelessWidget {
"$lastVal", "$lastVal",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.4, fontSize: SizeConfig.textMultiplier * 1.4,
fontWeight: FontWeight.w800, fontWeight: FontWeight.bold,
margin: 0, margin: 0,
), ),
Expanded( Expanded(
@ -88,7 +88,7 @@ class VitalSignItem extends StatelessWidget {
"$des", "$des",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.3, fontSize: SizeConfig.textMultiplier * 1.3,
fontWeight: FontWeight.w600, fontWeight: FontWeight.bold,
), ),
), ),
), ),

@ -36,6 +36,7 @@ class PrescriptionItemsPage extends StatelessWidget {
patientType: patientType??"0", patientType: patientType??"0",
arrivalType: arrivalType??"0", arrivalType: arrivalType??"0",
clinic: prescriptions.clinicDescription, clinic: prescriptions.clinicDescription,
branch: prescriptions.name,
isPrescriptions: true, isPrescriptions: true,
appointmentDate: DateUtils.getDateTimeFromServerFormat(prescriptions.appointmentDate), appointmentDate: DateUtils.getDateTimeFromServerFormat(prescriptions.appointmentDate),
doctorName: prescriptions.doctorName, doctorName: prescriptions.doctorName,

@ -1,6 +1,6 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/model/procedure/get_ordered_procedure_model.dart'; import 'package:doctor_app_flutter/core/model/procedure/get_ordered_procedure_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart';
@ -27,7 +27,7 @@ class ProcedureCard extends StatelessWidget {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return Container( return Container(
width: double.maxFinite, width: double.maxFinite,
//height: MediaQuery.of(context).size.height * .22, height: MediaQuery.of(context).size.height * .22,
margin: EdgeInsets.all(10), margin: EdgeInsets.all(10),
padding: EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5), padding: EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5),
decoration: BoxDecoration( decoration: BoxDecoration(
@ -80,7 +80,7 @@ class ProcedureCard extends StatelessWidget {
), ),
Texts( Texts(
entityList.procedureName, entityList.procedureName,
fontWeight: FontWeight.w700, bold: true,
fontSize: 14, fontSize: 14,
), ),
], ],
@ -120,135 +120,55 @@ class ProcedureCard extends StatelessWidget {
Texts( Texts(
entityList.orderNo.toString(), entityList.orderNo.toString(),
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.w700, bold: true,
), ),
], ],
), ),
// Row(
// children: [
// Texts(
// TranslationBase.of(context).doctorName + ": ",
// //color: Colors.grey,
// fontSize: 12,
// color: Colors.grey,
// ),
// Texts(
// entityList.doctorName.toString(),
// fontSize: 12,
// bold: true,
// ),
// ],
// ),
// Row(
// children: [
// Texts(
// TranslationBase.of(context).clinic + ": ",
// //color: Colors.grey,
// fontSize: 12,
// color: Colors.grey,
// ),
// Texts(
// entityList.clinicDescription.toString(),
// bold: true,
// fontSize: 12,
// ),
// ],
// ),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Expanded( Texts(
child: Texts( TranslationBase.of(context).doctorName + ": ",
entityList.remarks.toString() ?? '----', //color: Colors.grey,
fontSize: 12, fontSize: 12,
), color: Colors.grey,
),
Texts(
entityList.doctorName.toString(),
fontSize: 12,
bold: true,
), ),
if (entityList.categoryID == 2 ||
entityList.categoryID == 4)
InkWell(
child: Icon(Icons.edit),
onTap: onTap,
)
], ],
), ),
Row( Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Texts(
width: 30, TranslationBase.of(context).clinic + ": ",
height: 30, //color: Colors.grey,
margin: EdgeInsets.only( fontSize: 12,
left: color: Colors.grey,
projectViewModel.isArabic ? 5 : 5 /*10:85*/,
right:
projectViewModel.isArabic ? 5 : 5 /*85:10*/,
top: 5),
decoration: BoxDecoration(
shape: BoxShape.rectangle,
border: Border(
bottom: BorderSide(
color: Colors.grey[400], width: 2.5),
left: BorderSide(
color: Colors.grey[400], width: 2.5),
)),
), ),
Expanded( Texts(
flex: 4, entityList.clinicDescription??"",
child: Container( bold: true,
margin: EdgeInsets.only( fontSize: 12,
left: 5, top: 25, right: 10, bottom: 0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
RichText(
text: TextSpan(
style: TextStyle(
fontSize:
2.0 * SizeConfig.textMultiplier,
color: Colors.black),
children: <TextSpan>[
TextSpan(
text: "Dr.".toString(),
style: TextStyle(
fontSize: 13,
fontFamily: 'Poppins')),
TextSpan(
text: entityList.doctorName,
style: TextStyle(
fontWeight: FontWeight.w700,
fontFamily: 'Poppins',
fontSize: 14)),
],
),
),
RichText(
text: TextSpan(
style: TextStyle(
fontSize:
2.0 * SizeConfig.textMultiplier,
color: Colors.black),
children: <TextSpan>[
TextSpan(
text: TranslationBase.of(context)
.clinic,
style: TextStyle(
fontSize: 13,
fontFamily: 'Poppins')),
TextSpan(
text: entityList.clinicDescription,
style: TextStyle(
fontWeight: FontWeight.w700,
fontFamily: 'Poppins',
fontSize: 14)),
],
),
)
],
),
),
), ),
], ],
), ),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(
entityList.remarks.toString() ?? '',
fontSize: 12,
),
if (entityList.categoryID == 2 ||
entityList.categoryID == 4)
InkWell(
child: Icon(DoctorApp.edit),
onTap: onTap,
)
],
)
], ],
), ),
//onTap: onTap, //onTap: onTap,

@ -29,122 +29,119 @@ class ProcedureScreen extends StatelessWidget {
builder: (BuildContext context, ProcedureViewModel model, Widget child) => builder: (BuildContext context, ProcedureViewModel model, Widget child) =>
AppScaffold( AppScaffold(
isShowAppBar: true, isShowAppBar: true,
baseViewModel: model,
appBar: PatientProfileHeaderNewDesignAppBar( appBar: PatientProfileHeaderNewDesignAppBar(
patient, arrivalType ?? '0', patientType), patient, arrivalType ?? '0', patientType),
body: NetworkBaseView( body: SingleChildScrollView(
baseViewModel: model, child: Container(
child: SingleChildScrollView( child: Column(
child: Container( crossAxisAlignment: CrossAxisAlignment.start,
color: Colors.white, children: [
child: Column( SizedBox(
crossAxisAlignment: CrossAxisAlignment.start, height: 12,
children: [ ),
SizedBox( Padding(
height: 12, padding: const EdgeInsets.all(8.0),
), child: Column(
Padding( crossAxisAlignment: CrossAxisAlignment.start,
padding: const EdgeInsets.all(8.0), children: [
child: Column( Texts(
crossAxisAlignment: CrossAxisAlignment.start, 'Order Test or',
children: [ style: "caption2",
Texts( color: Colors.black,
'Order Test or', fontSize: 13,
style: "caption2", ),
color: Colors.black, Texts(
fontSize: 13, 'Procedure',
), bold: true,
Texts( fontSize: 22,
'Procedure', ),
bold: true, ],
fontSize: 22,
),
],
),
), ),
if (patientType != null && patientType == '7' && patient.patientStatusType == 43) ),
InkWell( if (patientType != null && patientType == '7' && patient.patientStatusType == 43)
onTap: () { InkWell(
addSelectedProcedure(context, model, patient); onTap: () {
}, addSelectedProcedure(context, model, patient);
child: Container( },
width: double.maxFinite, child: Container(
height: 140, width: double.maxFinite,
margin: EdgeInsets.all(10), height: 140,
decoration: BoxDecoration( margin: EdgeInsets.all(10),
color: Colors.grey[300], decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10), color: Colors.grey[300],
), borderRadius: BorderRadius.circular(10),
child: Center( ),
child: Container( child: Center(
height: 90, child: Container(
child: Column( height: 90,
children: [ child: Column(
Container( children: [
height: 40, Container(
width: 40, height: 40,
decoration: BoxDecoration( width: 40,
color: Colors.grey[600], decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10), color: Colors.grey[600],
), borderRadius: BorderRadius.circular(10),
child: Center(
child: Icon(
Icons.add,
color: Colors.white,
),
),
), ),
SizedBox( child: Center(
height: 10, child: Icon(
Icons.add,
color: Colors.white,
),
), ),
Texts( ),
'Add More Procedure', SizedBox(
color: Colors.grey[600], height: 10,
fontWeight: FontWeight.w600, ),
) Texts(
], 'Add More Procedure',
), color: Colors.grey[600],
fontWeight: FontWeight.w600,
)
],
), ),
), ),
), ),
), ),
if (model.procedureList.isNotEmpty) ),
...List.generate( if (model.procedureList.isNotEmpty)
model.procedureList[0].rowcount, ...List.generate(
(index) => ProcedureCard( model.procedureList[0].rowcount,
categoryID: (index) => ProcedureCard(
model.procedureList[0].entityList[index].categoryID, categoryID:
entityList: model.procedureList[0].entityList[index], model.procedureList[0].entityList[index].categoryID,
onTap: () { entityList: model.procedureList[0].entityList[index],
if (model.procedureList[0].entityList[index].categoryID == onTap: () {
2 || if (model.procedureList[0].entityList[index].categoryID ==
model.procedureList[0].entityList[index].categoryID == 4) 2 ||
updateProcedureForm(context, model.procedureList[0].entityList[index].categoryID == 4)
model: model, updateProcedureForm(context,
patient: patient, model: model,
remarks: model patient: patient,
.procedureList[0].entityList[index].remarks, remarks: model
orderType: model.procedureList[0] .procedureList[0].entityList[index].remarks,
.entityList[index].orderType orderType: model.procedureList[0]
.toString(), .entityList[index].orderType
orderNo: model .toString(),
.procedureList[0].entityList[index].orderNo, orderNo: model
procedureName: model.procedureList[0] .procedureList[0].entityList[index].orderNo,
.entityList[index].procedureName, procedureName: model.procedureList[0]
categoreId: model.procedureList[0] .entityList[index].procedureName,
.entityList[index].categoryID categoreId: model.procedureList[0]
.toString(), .entityList[index].categoryID
procedureId: model.procedureList[0] .toString(),
.entityList[index].procedureId, procedureId: model.procedureList[0]
limetNo: model.procedureList[0] .entityList[index].procedureId,
.entityList[index].lineItemNo); limetNo: model.procedureList[0]
// } else .entityList[index].lineItemNo);
// helpers.showErrorToast( // } else
// 'You Cant Update This Procedure'); // helpers.showErrorToast(
}, // 'You Cant Update This Procedure');
), },
), ),
], ),
), ],
), ),
), ),
), ),

@ -57,25 +57,25 @@ class _ProfileScreenState extends State<ProfileScreen> {
children: <Widget>[ children: <Widget>[
DrawerItem( DrawerItem(
TranslationBase.of(context).gender, TranslationBase.of(context).gender,
Icons.person_pin, icon: Icons.person_pin,
color: Colors.black, color: Colors.black,
subTitle: doctorProfile.genderDescription //"Male" subTitle: doctorProfile.genderDescription //"Male"
, ,
), ),
DrawerItem(TranslationBase.of(context).clinic, Icons.build, DrawerItem(TranslationBase.of(context).clinic, icon: Icons.build,
color: Colors.black, color: Colors.black,
subTitle: subTitle:
doctorProfile.clinicDescription //"Neurology Clinic", doctorProfile.clinicDescription //"Neurology Clinic",
), ),
DrawerItem( DrawerItem(
TranslationBase.of(context).hospital, TranslationBase.of(context).hospital,
Icons.local_hospital, icon: Icons.local_hospital,
color: Colors.black, color: Colors.black,
subTitle: doctorProfile.projectName, //"Al-Takkassussi", subTitle: doctorProfile.projectName, //"Al-Takkassussi",
), ),
DrawerItem( DrawerItem(
TranslationBase.of(context).speciality, TranslationBase.of(context).speciality,
Icons.crop_square, icon: Icons.crop_square,
color: Colors.black, color: Colors.black,
subTitle: doctorProfile.doctorRate == 0 subTitle: doctorProfile.doctorRate == 0
? TranslationBase.of(context).beingBad ? TranslationBase.of(context).beingBad

@ -10,7 +10,9 @@ import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.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/patients/profile/patient-page-header-widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.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: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/card_with_bgNew_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart';
@ -29,12 +31,16 @@ class AddSickLeavScreen extends StatelessWidget {
onModelReady: (model) => model.getSickLeave(patient.patientMRN), onModelReady: (model) => model.getSickLeave(patient.patientMRN),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: false, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).sickleave, appBar: PatientProfileHeaderNewDesignAppBar(
patient,
routeArgs['patientType'] ?? "0",
routeArgs['arrivalType'] ?? "0",
),
body: SingleChildScrollView( body: SingleChildScrollView(
child: Column(children: [ child: Column(children: [
PatientProfileHeaderNewDesign( // PatientProfileHeaderNewDesign(
patient, routeArgs['patientType'], routeArgs['arrivalType']), // patient, routeArgs['patientType'], routeArgs['arrivalType']),
patient.patientStatusType == 43 patient.patientStatusType == 43
? Column( ? Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,

@ -10,6 +10,7 @@ import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.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/patients/profile/patient-page-header-widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.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:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
@ -30,13 +31,17 @@ class ShowSickLeaveScreen extends StatelessWidget {
model.getSickLeave(patient.patientMRN ?? patient.patientId), model.getSickLeave(patient.patientMRN ?? patient.patientId),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: false, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).sickleave, appBar: PatientProfileHeaderNewDesignAppBar(
patient,
routeArgs['patientType'] ?? "0",
routeArgs['arrivalType'] ?? "0",
),
body: SingleChildScrollView( body: SingleChildScrollView(
child: Column( child: Column(
children: [ children: [
PatientProfileHeaderNewDesign( // PatientProfileHeaderNewDesign(
patient, routeArgs['patientType'], routeArgs['arrivalType']), // patient, routeArgs['patientType'], routeArgs['arrivalType']),
Column( Column(
children: model.getAllSIckLeave children: model.getAllSIckLeave
.map<Widget>((GetAllSickLeaveResponse item) { .map<Widget>((GetAllSickLeaveResponse item) {

@ -622,6 +622,11 @@ class TranslationBase {
String get rescheduleLeaves => String get rescheduleLeaves =>
localizedValues['reschedule-leave'][locale.languageCode]; localizedValues['reschedule-leave'][locale.languageCode];
String get applyOrRescheduleLeave =>
localizedValues['applyOrRescheduleLeave'][locale.languageCode];
String get myQRCode =>
localizedValues['myQRCode'][locale.languageCode];
String get addMedication => String get addMedication =>
localizedValues['addMedication'][locale.languageCode]; localizedValues['addMedication'][locale.languageCode];
@ -1211,7 +1216,7 @@ class TranslationBase {
String get remove => localizedValues['remove'][locale.languageCode]; String get remove => localizedValues['remove'][locale.languageCode];
String get step => localizedValues['step'][locale.languageCode]; String get step => localizedValues['step'][locale.languageCode];
String get fieldRequired => localizedValues['fieldRequired'][locale.languageCode];
String get noSickLeave => localizedValues['no-sickleve'][locale.languageCode]; String get noSickLeave => localizedValues['no-sickleve'][locale.languageCode];
String get changeOfSchedule => String get changeOfSchedule =>
localizedValues['changeOfSchedule'][locale.languageCode]; localizedValues['changeOfSchedule'][locale.languageCode];

@ -319,7 +319,7 @@ class _KnownUserLoginState extends State<KnownUserLogin> {
} }
navigateToHome() { navigateToHome() {
Navigator.of(context).pushNamed(HOME); Navigator.of(context).pushReplacementNamed(HOME);
} }
showErorrMsg(localMsg) { showErorrMsg(localMsg) {

@ -69,220 +69,232 @@ class _LoginFormState extends State<LoginForm> {
return Form( return Form(
key: loginFormKey, key: loginFormKey,
child: Container( child: Column(
width: SizeConfig.realScreenWidth * 0.90, mainAxisAlignment: MainAxisAlignment.spaceBetween,
child: Column( children: <Widget>[
crossAxisAlignment: CrossAxisAlignment.start, Container(
children: <Widget>[ width: SizeConfig.realScreenWidth * 0.90,
buildSizedBox(), height: SizeConfig.realScreenHeight * 0.65,
Padding( child:
child: AppText( Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
TranslationBase.of(context).enterCredentials, buildSizedBox(),
fontSize: 18, Padding(
fontWeight: FontWeight.w600, child: AppText(
), TranslationBase.of(context).enterCredentials,
padding: EdgeInsets.only(top: 10, bottom: 10)), fontSize: 18,
Container( fontWeight: FontWeight.bold,
decoration: BoxDecoration( ),
borderRadius: BorderRadius.all(Radius.circular(6.0)), padding: EdgeInsets.only(top: 10, bottom: 10)),
border: Border.all( Container(
width: 1.0, decoration: BoxDecoration(
color: HexColor("#CCCCCC"), borderRadius: BorderRadius.all(Radius.circular(6.0)),
), border: Border.all(
color: Colors.white), width: 1.0,
child: Column( color: HexColor("#CCCCCC"),
crossAxisAlignment: CrossAxisAlignment.start, ),
children: [ color: Colors.white),
Padding( child: Column(
padding: EdgeInsets.only(left: 10, top: 10), crossAxisAlignment: CrossAxisAlignment.start,
child: AppText( children: [
TranslationBase.of(context).enterId, Padding(
fontWeight: FontWeight.w600, padding: EdgeInsets.only(left: 10, top: 10),
)), child: AppText(
AppTextFormField( TranslationBase.of(context).enterId,
labelText: '', fontWeight: FontWeight.w800,
borderColor: Colors.white, fontSize: 14,
// keyboardType: TextInputType.number, )),
textInputAction: TextInputAction.next, AppTextFormField(
// decoration: buildInputDecoration( labelText: '',
// context, borderColor: Colors.white,
// TranslationBase.of(context).enterId, // keyboardType: TextInputType.number,
// 'assets/images/user_id_icon.png'), textInputAction: TextInputAction.next,
validator: (value) { // decoration: buildInputDecoration(
if (value != null && value.isEmpty) { // context,
return TranslationBase.of(context) // TranslationBase.of(context).enterId,
.pleaseEnterYourID; // 'assets/images/user_id_icon.png'),
} validator: (value) {
return null; if (value != null && value.isEmpty) {
}, return TranslationBase.of(context)
onSaved: (value) { .pleaseEnterYourID;
if (value != null) userInfo.userID = value.trim(); }
}, return null;
onChanged: (value) { },
if (value != null) userInfo.userID = value.trim(); onSaved: (value) {
}, if (value != null) userInfo.userID = value.trim();
onFieldSubmitted: (_) { },
focusPass.nextFocus(); onChanged: (value) {
}, if (value != null) userInfo.userID = value.trim();
// onEditingComplete: () {}, },
// autofocus: false, onFieldSubmitted: (_) {
) focusPass.nextFocus();
])), },
buildSizedBox(), // onEditingComplete: () {},
Container( // autofocus: false,
decoration: BoxDecoration( )
borderRadius: BorderRadius.all(Radius.circular(6.0)), ])),
border: Border.all( buildSizedBox(),
width: 1.0, Container(
color: HexColor("#CCCCCC"), decoration: BoxDecoration(
), borderRadius: BorderRadius.all(Radius.circular(6.0)),
color: Colors.white), border: Border.all(
child: Column( width: 1.0,
crossAxisAlignment: CrossAxisAlignment.start, color: HexColor("#CCCCCC"),
children: [ ),
Padding( color: Colors.white),
padding: EdgeInsets.only(left: 10, top: 10), child: Column(
child: AppText( crossAxisAlignment: CrossAxisAlignment.start,
TranslationBase.of(context).enterPassword, children: [
fontWeight: FontWeight.w600, Padding(
)), padding: EdgeInsets.only(left: 10, top: 10),
AppTextFormField( child: AppText(
focusNode: focusPass, TranslationBase.of(context).enterPassword,
obscureText: true, fontWeight: FontWeight.w800,
borderColor: Colors.white, fontSize: 14,
textInputAction: TextInputAction.next, )),
// decoration: buildInputDecoration( AppTextFormField(
// context, focusNode: focusPass,
// TranslationBase.of(context).enterPassword, obscureText: true,
// 'assets/images/password_icon.png'), borderColor: Colors.white,
validator: (value) { textInputAction: TextInputAction.next,
if (value != null && value.isEmpty) { // decoration: buildInputDecoration(
return TranslationBase.of(context) // context,
.pleaseEnterPassword; // TranslationBase.of(context).enterPassword,
} // 'assets/images/password_icon.png'),
return null; validator: (value) {
}, if (value != null && value.isEmpty) {
onSaved: (value) { return TranslationBase.of(context)
userInfo.password = value; .pleaseEnterPassword;
}, }
onFieldSubmitted: (_) { return null;
focusPass.nextFocus(); },
helpers.showCupertinoPicker(context, projectsList, onSaved: (value) {
'facilityName', onSelectProject); userInfo.password = value;
}, },
onTap: () { onFieldSubmitted: (_) {
this.getProjects(userInfo.userID); focusPass.nextFocus();
}, helpers.showCupertinoPicker(context, projectsList,
) 'facilityName', onSelectProject);
])), },
buildSizedBox(), onTap: () {
projectsList.length > 0 this.getProjects(userInfo.userID);
? Container( },
decoration: BoxDecoration( )
borderRadius: BorderRadius.all(Radius.circular(6.0)), ])),
border: Border.all( buildSizedBox(),
width: 1.0, projectsList.length > 0
color: HexColor("#CCCCCC"), ? Container(
), decoration: BoxDecoration(
color: Colors.white), borderRadius: BorderRadius.all(Radius.circular(6.0)),
child: Column( border: Border.all(
crossAxisAlignment: CrossAxisAlignment.start, width: 1.0,
children: [ color: HexColor("#CCCCCC"),
Padding( ),
padding: EdgeInsets.only(left: 10, top: 10), color: Colors.white),
child: AppText( child: Column(
TranslationBase.of(context).selectYourProject, crossAxisAlignment: CrossAxisAlignment.start,
fontWeight: FontWeight.w600, children: [
)), Padding(
AppTextFormField( padding: EdgeInsets.only(left: 10, top: 10),
focusNode: focusProject, child: AppText(
controller: projectIdController, TranslationBase.of(context).selectYourProject,
borderColor: Colors.white, fontWeight: FontWeight.w600,
onTap: () { )),
helpers.showCupertinoPicker( AppTextFormField(
context, focusNode: focusProject,
projectsList, controller: projectIdController,
'facilityName', borderColor: Colors.white,
onSelectProject); suffixIcon: Icons.arrow_drop_down,
}, onTap: () {
// showCursor: false, helpers.showCupertinoPicker(
// //readOnly: true, context,
// decoration: buildInputDecoration( projectsList,
// context, 'facilityName',
// TranslationBase.of(context).selectYourProject, onSelectProject);
// 'assets/images/password_icon.png'), },
validator: (value) { // showCursor: false,
if (value != null && value.isEmpty) { // //readOnly: true,
return TranslationBase.of(context) // decoration: buildInputDecoration(
.pleaseEnterYourProject; // context,
} // TranslationBase.of(context).selectYourProject,
return null; // 'assets/images/password_icon.png'),
}) validator: (value) {
])) if (value != null && value.isEmpty) {
: Container( return TranslationBase.of(context)
decoration: BoxDecoration( .pleaseEnterYourProject;
borderRadius: BorderRadius.all(Radius.circular(6.0)), }
border: Border.all( return null;
width: 1.0, })
color: HexColor("#CCCCCC"), ]))
), : Container(
color: Colors.white), decoration: BoxDecoration(
child: Column( borderRadius: BorderRadius.all(Radius.circular(6.0)),
crossAxisAlignment: CrossAxisAlignment.start, border: Border.all(
children: [ width: 1.0,
Padding( color: HexColor("#CCCCCC"),
padding: EdgeInsets.only(left: 10, top: 10), ),
child: AppText( color: Colors.white),
TranslationBase.of(context).selectYourProject, child: Column(
fontWeight: FontWeight.w600, crossAxisAlignment: CrossAxisAlignment.start,
)), children: [
AppTextFormField( Padding(
readOnly: true, borderColor: Colors.white padding: EdgeInsets.only(left: 10, top: 10),
child: AppText(
TranslationBase.of(context).selectYourProject,
fontWeight: FontWeight.w800,
fontSize: 14,
)),
AppTextFormField(
readOnly: true, borderColor: Colors.white,
prefix: IconButton(
icon: Icon(Icons.arrow_drop_down),
iconSize: 30,
padding: EdgeInsets.only(bottom: 30),
),
// decoration: buildInputDecoration( // decoration: buildInputDecoration(
// context, // context,
// TranslationBase.of(context) // TranslationBase.of(context)
// .pleaseEnterYourProject, // .pleaseEnterYourProject,
// 'assets/images/password_icon.png') // 'assets/images/password_icon.png')
)
) ])),
])), ]),
buildSizedBox(), ),
Row(
Row( mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: Button( child: Button(
title: TranslationBase.of(context).login, title: TranslationBase.of(context).login,
color: Colors.red[700], color: HexColor('#D02127'),
onTap: () { onTap: () {
login(context, authProv, widget.changeLoadingStata); login(context, authProv, widget.changeLoadingStata);
}, },
)), )),
], ],
) )
// Row( // Row(
// mainAxisAlignment: MainAxisAlignment.end, // mainAxisAlignment: MainAxisAlignment.end,
// children: <Widget>[ // children: <Widget>[
// RaisedButton( // RaisedButton(
// onPressed: () { // onPressed: () {
// login(context, authProv, widget.changeLoadingStata); // login(context, authProv, widget.changeLoadingStata);
// }, // },
// textColor: Colors.white, // textColor: Colors.white,
// elevation: 0.0, // elevation: 0.0,
// padding: const EdgeInsets.all(0.0), // padding: const EdgeInsets.all(0.0),
// shape: RoundedRectangleBorder( // shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(10), // borderRadius: BorderRadius.circular(10),
// side: BorderSide(width: 0.5, color: HexColor('#CCCCCC'))), // side: BorderSide(width: 0.5, color: HexColor('#CCCCCC'))),
// child: Container( // child: Container(
// padding: const EdgeInsets.all(10.0), // padding: const EdgeInsets.all(10.0),
// height: 50, // height: 50,
// width: SizeConfig.realScreenWidth * 0.35, // width: SizeConfig.realScreenWidth * 0.35,
// child: ), // child: ),
// ) // )
// ], // ],
// ), // ),
], ],
),
), ),
); );
} }

@ -155,7 +155,7 @@ class _VerificationMethodsState extends State<VerificationMethods> {
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Flexible( Flexible(
flex: 4, flex: 3,
child: ListTile( child: ListTile(
title: Text( title: Text(
TranslationBase.of( TranslationBase.of(
@ -164,15 +164,17 @@ class _VerificationMethodsState extends State<VerificationMethods> {
overflow: TextOverflow overflow: TextOverflow
.ellipsis, .ellipsis,
style: TextStyle( style: TextStyle(
fontFamily: 'Poppins', fontFamily:
fontWeight: 'Poppins',
FontWeight.w600, fontWeight:
), FontWeight.w800,
fontSize: 14),
), ),
subtitle: AppText( subtitle: AppText(
getType( getType(
user.logInTypeID, user.logInTypeID,
context), context),
fontSize: 14,
) )
// Text( // Text(
// user.editedOn != null // user.editedOn != null
@ -208,6 +210,9 @@ class _VerificationMethodsState extends State<VerificationMethods> {
: '--', : '--',
textAlign: textAlign:
TextAlign.right, TextAlign.right,
fontSize: 14,
fontWeight:
FontWeight.w800,
), ),
subtitle: AppText( subtitle: AppText(
user.editedOn != null user.editedOn != null
@ -223,6 +228,7 @@ class _VerificationMethodsState extends State<VerificationMethods> {
: '--', : '--',
textAlign: textAlign:
TextAlign.right, TextAlign.right,
fontSize: 14,
), ),
)) ))
], ],
@ -487,8 +493,8 @@ class _VerificationMethodsState extends State<VerificationMethods> {
children: [ children: [
Image.asset( Image.asset(
'assets/images/verify-whtsapp.png', 'assets/images/verify-whtsapp.png',
height: SizeConfig.imageSizeMultiplier * 13, height: 60,
width: SizeConfig.imageSizeMultiplier * 16, width: 60,
), ),
], ],
), ),
@ -497,7 +503,8 @@ class _VerificationMethodsState extends State<VerificationMethods> {
), ),
AppText( AppText(
TranslationBase.of(context).verifyWhatsApp, TranslationBase.of(context).verifyWhatsApp,
fontSize: SizeConfig.textMultiplier * 2.2, fontSize: 14,
fontWeight: FontWeight.w600,
) )
], ],
), ),
@ -520,8 +527,8 @@ class _VerificationMethodsState extends State<VerificationMethods> {
children: <Widget>[ children: <Widget>[
Image.asset( Image.asset(
'assets/images/verify-sms.png', 'assets/images/verify-sms.png',
height: SizeConfig.imageSizeMultiplier * 13, height: 60,
width: SizeConfig.imageSizeMultiplier * 16, width: 60,
), ),
projectsProvider.isArabic projectsProvider.isArabic
? SizedBox( ? SizedBox(
@ -532,9 +539,8 @@ class _VerificationMethodsState extends State<VerificationMethods> {
), ),
AppText( AppText(
TranslationBase.of(context).verifySMS, TranslationBase.of(context).verifySMS,
fontSize: projectsProvider.isArabic fontSize: 14,
? SizeConfig.textMultiplier * 1.8 fontWeight: FontWeight.w600,
: SizeConfig.textMultiplier * 2.2,
) )
], ],
), ),
@ -560,15 +566,16 @@ class _VerificationMethodsState extends State<VerificationMethods> {
children: <Widget>[ children: <Widget>[
Image.asset( Image.asset(
'assets/images/verification_fingerprint_icon.png', 'assets/images/verification_fingerprint_icon.png',
height: SizeConfig.imageSizeMultiplier * 13, height: 60,
width: SizeConfig.imageSizeMultiplier * 16, width: 60,
), ),
SizedBox( SizedBox(
height: 20, height: 20,
), ),
AppText( AppText(
TranslationBase.of(context).verifyFingerprint, TranslationBase.of(context).verifyFingerprint,
fontSize: SizeConfig.textMultiplier * 2.2, fontSize: 14,
fontWeight: FontWeight.w600,
) )
], ],
), ),
@ -602,15 +609,16 @@ class _VerificationMethodsState extends State<VerificationMethods> {
children: <Widget>[ children: <Widget>[
Image.asset( Image.asset(
'assets/images/verification_faceid_icon.png', 'assets/images/verification_faceid_icon.png',
height: SizeConfig.imageSizeMultiplier * 13, height: 60,
width: SizeConfig.imageSizeMultiplier * 16, width: 60,
), ),
SizedBox( SizedBox(
height: 20, height: 20,
), ),
AppText( AppText(
TranslationBase.of(context).verifyFaceID, TranslationBase.of(context).verifyFaceID,
fontSize: SizeConfig.textMultiplier * 2.2, fontSize: 14,
fontWeight: FontWeight.w600,
) )
], ],
), ),
@ -640,8 +648,8 @@ class _VerificationMethodsState extends State<VerificationMethods> {
children: <Widget>[ children: <Widget>[
Image.asset( Image.asset(
'assets/images/login/more_icon.png', 'assets/images/login/more_icon.png',
height: SizeConfig.imageSizeMultiplier * 13, height: 60,
width: SizeConfig.imageSizeMultiplier * 16, width: 60,
), ),
projectsProvider.isArabic projectsProvider.isArabic
? SizedBox( ? SizedBox(
@ -652,7 +660,8 @@ class _VerificationMethodsState extends State<VerificationMethods> {
), ),
AppText( AppText(
TranslationBase.of(context).moreVerification, TranslationBase.of(context).moreVerification,
fontSize: SizeConfig.textMultiplier * 2.2, fontSize: 14,
fontWeight: FontWeight.w600,
// textAlign: TextAlign.center, // textAlign: TextAlign.center,
) )
], ],

@ -35,9 +35,6 @@ class MyScheduleWidget extends StatelessWidget {
fontFamily: 'Poppins', fontFamily: 'Poppins',
// fontSize: 18 // fontSize: 18
), ),
SizedBox(
height: 10,
),
AppText( AppText(
' ${workingHoursTable.date.day} ${(DateUtils.getMonth(workingHoursTable.date.month).toString().substring(0, 3))}', ' ${workingHoursTable.date.day} ${(DateUtils.getMonth(workingHoursTable.date.month).toString().substring(0, 3))}',
fontSize: 18, fontSize: 18,

@ -60,20 +60,8 @@ class SMSOTP {
builder: (context) { builder: (context) {
projectProvider = Provider.of(context); projectProvider = Provider.of(context);
return AlertDialog( return AlertDialog(
contentPadding: EdgeInsets.fromLTRB(24.0, 20.0, 0.0, 24.0), contentPadding: EdgeInsets.fromLTRB(24.0, 0.0, 0.0, 24.0),
title: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
IconButton(
icon: Icon(Icons.close),
onPressed: () {
this.isClosed = true;
Navigator.pop(context);
this.onFailure();
},
)
],
),
// shape: RoundedRectangleBorder( // shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.all(Radius.circular(10.0))), // borderRadius: BorderRadius.all(Radius.circular(10.0))),
content: StatefulBuilder(builder: (context, setState) { content: StatefulBuilder(builder: (context, setState) {
@ -89,21 +77,44 @@ class SMSOTP {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
type == 1 Padding(
? Padding( padding: EdgeInsets.all(10),
child: Icon( child: Row(
DoctorApp.verify_sms_1, mainAxisAlignment: MainAxisAlignment.spaceBetween,
size: 40, children: [
), type == 1
padding: EdgeInsets.only(bottom: 20), ? Padding(
) child: Icon(
: Padding( DoctorApp.verify_sms_1,
child: Icon( size: 40,
DoctorApp.verify_whtsapp, ),
size: 40, padding: EdgeInsets.only(bottom: 20),
), )
padding: EdgeInsets.only(bottom: 20), : Padding(
), child: Icon(
DoctorApp.verify_whtsapp,
size: 40,
),
padding: EdgeInsets.only(bottom: 20),
),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Padding(
padding: EdgeInsets.only(
left: 10, right: 10, bottom: 20),
child: IconButton(
icon: Icon(Icons.close),
iconSize: 40,
onPressed: () {
this.isClosed = true;
Navigator.pop(context);
this.onFailure();
},
))
],
)
])),
Padding( Padding(
padding: EdgeInsets.only(top: 5), padding: EdgeInsets.only(top: 5),
child: AppText( child: AppText(
@ -122,7 +133,7 @@ class SMSOTP {
child: Directionality( child: Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[ children: <Widget>[
Container( Container(
width: SizeConfig.realScreenWidth * 0.15, width: SizeConfig.realScreenWidth * 0.15,
@ -233,22 +244,23 @@ class SMSOTP {
)), )),
), ),
), ),
Padding( Column(
padding: EdgeInsets.only(top: 10), mainAxisAlignment: MainAxisAlignment.start,
child: Row(children: [ crossAxisAlignment: CrossAxisAlignment.start,
Expanded( children: [
child: AppText( AppText(
TranslationBase.of(context).validationMessage + ' ', TranslationBase.of(context).validationMessage + ' ',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), fontSize: 14,
), ),
AppText( AppText(
displayTime, displayTime,
color: Colors.red, color: Colors.red,
textAlign: TextAlign.center, textAlign: TextAlign.start,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 14,
) )
])) ])
], ],
))), ))),
); );

@ -102,14 +102,18 @@ class PatientCard extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Row(children: [ Row(children: [
AppText( Container(
(Helpers.capitalize(patientInfo.firstName) + width: 170,
" " + child: AppText(
Helpers.capitalize(patientInfo.lastName)), (Helpers.capitalize(patientInfo.firstName) +
fontSize: SizeConfig.textMultiplier * 2, " " +
fontWeight: FontWeight.bold, Helpers.capitalize(patientInfo.lastName)),
backGroundcolor: Colors.white, fontSize: 16,
fontFamily: 'Poppins', fontWeight: FontWeight.bold,
backGroundcolor: Colors.white,
fontFamily: 'Poppins',
textOverflow: TextOverflow.ellipsis,
),
), ),
patientInfo.gender == 1 patientInfo.gender == 1
? Icon( ? Icon(
@ -143,7 +147,10 @@ class PatientCard extends StatelessWidget {
errorBuilder: (BuildContext context, errorBuilder: (BuildContext context,
Object exception, Object exception,
StackTrace stackTrace) { StackTrace stackTrace) {
return Text('No Image'); return AppText(
'No Image',
fontSize: 10,
);
}, },
)) ))
: SizedBox() : SizedBox()

@ -282,48 +282,38 @@ class PatientReferralItemWidget extends StatelessWidget {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
RichText( AppText(
text: new TextSpan( referralStatus != null ? referralStatus : "",
style: new TextStyle( fontFamily: 'Poppins',
fontSize: 2.0 * SizeConfig.textMultiplier, fontSize: 1.9 * SizeConfig.textMultiplier,
color: Colors.black), fontWeight: FontWeight.w700,
children: <TextSpan>[ color: referralStatus != null
new TextSpan( ? referralStatus == 'Pending'
text: referralStatus != null ? Color(0xffc4aa54)
? referralStatus : referralStatus == 'Accepted'
: "", ? Colors.green[700]
style: TextStyle( : Colors.red[700]
color: referralStatus != null : Colors.grey[500],
? referralStatus == 'Pending'
? Color(0xffc4aa54)
: referralStatus == 'Accepted'
? Colors.green[700]
: Colors.red[700]
: Colors.grey[500],
fontWeight: FontWeight.w700,
fontFamily: 'Poppins',
fontSize:
2.0 * SizeConfig.textMultiplier)),
],
),
), ),
//TODO :ask backend to return in the standard format
AppText( AppText(
referredOn, referredOn,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 2.1 * SizeConfig.textMultiplier, fontSize: 2.0 * SizeConfig.textMultiplier,
color: Color(0XFF28353E),
) )
], ],
), ),
Row( Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Expanded( Expanded(
child: AppText( child: AppText(
patientInfo.patientName, patientInfo.patientName,
fontSize: SizeConfig.textMultiplier * 2.5, fontSize: SizeConfig.textMultiplier * 2.2,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
backGroundcolor: Colors.white, backGroundcolor: Colors.white,
color: Colors.black,
fontFamily: 'Poppins', fontFamily: 'Poppins',
), ),
), ),
@ -339,64 +329,68 @@ class PatientReferralItemWidget extends StatelessWidget {
DoctorApp.female_1, DoctorApp.female_1,
color: Colors.pink, color: Colors.pink,
), ),
SizedBox(
width: 4,
),
AppText(
referredOn,
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize: 1.8 * SizeConfig.textMultiplier,
color: Color(0XFF575757),
)
], ],
), ),
SizedBox(
width: 10,
),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Column( Expanded(
children: [ child: Column(
RichText( children: [
text: new TextSpan( Row(
style: new TextStyle( mainAxisAlignment: MainAxisAlignment.start,
fontSize: 2.0 * SizeConfig.textMultiplier, children: [
color: Colors.black), AppText(
children: <TextSpan>[ TranslationBase.of(context).fileNumber,
new TextSpan( fontFamily: 'Poppins',
text: TranslationBase.of(context) fontWeight: FontWeight.w600,
.fileNumber, fontSize: 1.7 * SizeConfig.textMultiplier,
style: TextStyle( color: Color(0XFF575757),
fontSize: 14, fontFamily: 'Poppins')), ),
new TextSpan( AppText(
text: patientInfo.patientID.toString(), patientInfo.patientID.toString(),
style: TextStyle( fontFamily: 'Poppins',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontFamily: 'Poppins', fontSize: 1.8 * SizeConfig.textMultiplier,
fontSize: 15)), color: Color(0XFF2E303A),
),
], ],
), ),
), Row(
Container( mainAxisAlignment: MainAxisAlignment.start,
child: RichText( children: [
text: new TextSpan( AppText(
style: new TextStyle( TranslationBase.of(context).referredFrom,
fontSize: 2.0 * SizeConfig.textMultiplier, fontFamily: 'Poppins',
color: Colors.black), fontWeight: FontWeight.w600,
children: <TextSpan>[ fontSize: 1.7 * SizeConfig.textMultiplier,
new TextSpan( color: Color(0XFF575757),
text: TranslationBase.of(context) ),
.referredFrom, AppText(
style: TextStyle( isSameBranch
fontSize: 14, ? TranslationBase.of(context).sameBranch
fontFamily: 'Poppins')), : TranslationBase.of(context)
new TextSpan( .otherBranch,
text: isSameBranch fontFamily: 'Poppins',
? TranslationBase.of(context) fontWeight: FontWeight.w700,
.sameBranch fontSize: 1.8 * SizeConfig.textMultiplier,
: TranslationBase.of(context) color: Color(0XFF2E303A),
.otherBranch, ),
style: TextStyle( ],
fontWeight: FontWeight.w700,
fontFamily: 'Poppins',
fontSize: 15)),
],
),
), ),
), ],
], ),
), ),
Row( Row(
children: [ children: [
@ -405,7 +399,8 @@ class PatientReferralItemWidget extends StatelessWidget {
patient.nationality*/ patient.nationality*/
"Saudi", "Saudi",
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 12, color: Color(0xFF2E303A),
fontSize: 1.4 * SizeConfig.textMultiplier,
), ),
/* patient.nationality != null /* patient.nationality != null
? ClipRRect( ? ClipRRect(
@ -434,48 +429,51 @@ class PatientReferralItemWidget extends StatelessWidget {
) )
], ],
), ),
Container( Row(
child: RichText( mainAxisAlignment: MainAxisAlignment.start,
text: new TextSpan( crossAxisAlignment: CrossAxisAlignment.start,
style: new TextStyle( children: [
fontSize: 2.0 * SizeConfig.textMultiplier, AppText(
color: Colors.black), TranslationBase.of(context).remarks + " : ",
children: <TextSpan>[ fontFamily: 'Poppins',
new TextSpan( fontWeight: FontWeight.w600,
text: fontSize: 1.7 * SizeConfig.textMultiplier,
TranslationBase.of(context).remarks + " : ", color: Color(0XFF575757),
style: TextStyle(
fontSize: 14, fontFamily: 'Poppins')),
new TextSpan(
text: patientInfo.remarksFromSource,
style: TextStyle(
fontWeight: FontWeight.w700,
fontFamily: 'Poppins',
fontSize: 15)),
],
), ),
), Expanded(
child: AppText(
patientInfo.remarksFromSource,
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontSize: 1.8 * SizeConfig.textMultiplier,
color: Color(0XFF2E303A),
),
),
],
), ),
Row( Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
width: 30, margin: EdgeInsets.only(left: 10, right: 0),
height: 30, child: Image.asset(
infoIcon != null ? 'assets/images/patient/ic_ref_arrow_up.png' : 'assets/images/patient/ic_ref_arrow_left.png',
height: 50,
width: 30,
),
),
Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: left: 0, top: 25, right: 0, bottom: 0),
projectViewModel.isArabic ? 10 : 10 /*10:85*/, padding: EdgeInsets.only(left: 4.0, right: 4.0),
right: child: Container(
projectViewModel.isArabic ? 10 : 10 /*85:10*/, width: 40,
top: 5), height: 40,
decoration: BoxDecoration( child: Image.asset(
shape: BoxShape.rectangle, 'assets/images/female_avatar.png',
border: Border( fit: BoxFit.cover,
bottom: BorderSide( ),
color: Colors.grey[400], width: 2.5), ),
left: BorderSide(
color: Colors.grey[400], width: 2.5),
)),
), ),
Expanded( Expanded(
flex: 4, flex: 4,

@ -171,7 +171,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
Container( Container(
child: AppText( child: AppText(
convertDateFormat2( convertDateFormat2(
patient.appointmentDate.toString() ?? ''), patient.appointmentDate ?? ''),
fontSize: 1.5 * SizeConfig.textMultiplier, fontSize: 1.5 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@ -281,7 +281,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
date.day.toString().padLeft(2, '0'); date.day.toString().padLeft(2, '0');
} }
return newDate.toString(); return newDate??'';
} }
isToday(date) { isToday(date) {

@ -15,8 +15,8 @@ import 'package:provider/provider.dart';
import 'large_avatar.dart'; import 'large_avatar.dart';
class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with PreferredSizeWidget {
with PreferredSizeWidget {
final PatiantInformtion patient; final PatiantInformtion patient;
final String patientType; final String patientType;
final String arrivalType; final String arrivalType;
@ -59,7 +59,8 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget
} }
return Container( return Container(
padding: EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5), padding: EdgeInsets.only(
left: 0, right: 5, bottom: 5, top: 5),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
), ),
@ -80,12 +81,12 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget
), ),
Expanded( Expanded(
child: AppText( child: AppText(
patient.firstName != null patient.firstName != null ?
? (Helpers.capitalize(patient.firstName) + (Helpers.capitalize(patient.firstName) +
" " + " " +
Helpers.capitalize(patient.lastName)) Helpers.capitalize(
: Helpers.capitalize(patient.patientDetails.fullName), patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName),
fontSize: SizeConfig.textMultiplier * 2.2, fontSize: SizeConfig.textMultiplier *2.2,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
backGroundcolor: Colors.white, backGroundcolor: Colors.white,
fontFamily: 'Poppins', fontFamily: 'Poppins',
@ -93,13 +94,13 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget
), ),
gender == 1 gender == 1
? Icon( ? Icon(
DoctorApp.male_2, DoctorApp.male_2,
color: Colors.blue, color: Colors.blue,
) )
: Icon( : Icon(
DoctorApp.female_1, DoctorApp.female_1,
color: Colors.pink, color: Colors.pink,
), ),
]), ]),
), ),
Row(children: [ Row(children: [
@ -121,10 +122,12 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget
), ),
Expanded( Expanded(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment:
CrossAxisAlignment.start,
children: [ children: [
SERVICES_PATIANT2[int.parse(patientType)] == SERVICES_PATIANT2[
"patientArrivalList" int.parse(patientType)] ==
"patientArrivalList"
? Container( ? Container(
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -162,43 +165,57 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget
], ],
)) ))
: SizedBox(), : SizedBox(),
if (SERVICES_PATIANT2[int.parse(patientType)] == if (SERVICES_PATIANT2[
int.parse(patientType)] ==
"List_MyOutPatient") "List_MyOutPatient")
Container( Container(
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment:
MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
TranslationBase.of(context).appointmentDate + TranslationBase.of(context)
.appointmentDate +
" : ", " : ",
fontSize: 14, fontSize: 14,
), ),
patient.startTime != null patient.startTime != null
? Container( ? Container(
height: 15, height: 15,
width: 60, width: 60,
decoration: BoxDecoration( decoration:
borderRadius: BorderRadius.circular(25), BoxDecoration(
color: HexColor("#20A169"), borderRadius:
), BorderRadius
child: AppText( .circular(
patient.startTime, 25),
color: Colors.white, color: HexColor(
fontSize: 1.5 * SizeConfig.textMultiplier, "#20A169"),
textAlign: TextAlign.center, ),
fontWeight: FontWeight.bold, child: AppText(
), patient.startTime,
) color: Colors.white,
fontSize: 1.5 *
SizeConfig
.textMultiplier,
textAlign: TextAlign
.center,
fontWeight:
FontWeight.bold,
),
)
: SizedBox(), : SizedBox(),
SizedBox( SizedBox(
width: 3.5, width: 3.5,
), ),
Container( Container(
child: AppText( child: AppText(
convertDateFormat2( convertDateFormat2(patient.appointmentDate.toString()?? ''),
patient.appointmentDate.toString() ?? ''), fontSize: 1.5 *
fontSize: 1.5 * SizeConfig.textMultiplier, SizeConfig
fontWeight: FontWeight.bold, .textMultiplier,
fontWeight:
FontWeight.bold,
), ),
), ),
SizedBox( SizedBox(
@ -211,23 +228,34 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget
), ),
), ),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [ children: [
RichText( RichText(
text: TextSpan( text: TextSpan(
style: TextStyle( style: TextStyle(
fontSize: 1.6 * SizeConfig.textMultiplier, fontSize: 1.6 *
SizeConfig
.textMultiplier,
color: Colors.black), color: Colors.black),
children: <TextSpan>[ children: <TextSpan>[
new TextSpan( new TextSpan(
text: TranslationBase.of(context).fileNumber, text:
TranslationBase.of(
context)
.fileNumber,
style: TextStyle( style: TextStyle(
fontSize: 12, fontFamily: 'Poppins')), fontSize: 12,
fontFamily:
'Poppins')),
new TextSpan( new TextSpan(
text: patient.patientId.toString(), text: patient.patientId
.toString(),
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w700, fontWeight:
fontFamily: 'Poppins', FontWeight.w700,
fontFamily:
'Poppins',
fontSize: 14)), fontSize: 14)),
], ],
), ),
@ -235,23 +263,32 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget
Row( Row(
children: [ children: [
AppText( AppText(
patient.nationalityName ?? patient.nationality, patient.nationalityName ??
patient.nationality,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 12, fontSize: 12,
), ),
patient.nationality != null patient.nationality != null
? ClipRRect( ? ClipRRect(
borderRadius: BorderRadius.circular(20.0), borderRadius:
child: Image.network( BorderRadius
patient.nationalityFlagURL, .circular(
height: 25, 20.0),
width: 30, child: Image.network(
errorBuilder: (BuildContext context, patient.nationalityFlagURL,
Object exception, height: 25,
StackTrace stackTrace) { width: 30,
return Text('No Image'); errorBuilder:
}, (BuildContext
)) context,
Object
exception,
StackTrace
stackTrace) {
return Text(
'No Image');
},
))
: SizedBox() : SizedBox()
], ],
) )
@ -261,19 +298,26 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget
child: RichText( child: RichText(
text: new TextSpan( text: new TextSpan(
style: new TextStyle( style: new TextStyle(
fontSize: 1.6 * SizeConfig.textMultiplier, fontSize: 1.6 *
SizeConfig.textMultiplier,
color: Colors.black, color: Colors.black,
fontFamily: 'Poppins', fontFamily: 'Poppins',
), ),
children: <TextSpan>[ children: <TextSpan>[
new TextSpan( new TextSpan(
text: TranslationBase.of(context).age + " : ", text: TranslationBase.of(
style: TextStyle(fontSize: 14)), context)
.age +
" : ",
style: TextStyle(
fontSize: 14)),
new TextSpan( new TextSpan(
text: text:
"${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth : patient.dateofBirth, context)}", "${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth : patient.dateofBirth, context)}",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w700, fontSize: 14)), fontWeight:
FontWeight.w700,
fontSize: 14)),
], ],
), ),
), ),
@ -288,16 +332,14 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget
Container( Container(
width: 30, width: 30,
height: 30, height: 30,
margin: EdgeInsets.only( margin: EdgeInsets.only(left: projectViewModel.isArabic?10:85, right: projectViewModel.isArabic?85:10,top: 5),
left: projectViewModel.isArabic ? 10 : 85,
right: projectViewModel.isArabic ? 85 : 10,
top: 5),
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border( border: Border(
bottom: BorderSide(color: Colors.grey[400], width: 2.5), bottom:BorderSide(color: Colors.grey[400],width: 2.5),
left: BorderSide(color: Colors.grey[400], width: 2.5), left: BorderSide(color: Colors.grey[400],width: 2.5),
)), )
),
), ),
Expanded( Expanded(
child: Container( child: Container(
@ -305,16 +347,15 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
if (doctorName != null && profileUrl != null) Container(
Container( child: LargeAvatar(
child: LargeAvatar( name: doctorName,
name: doctorName, url: profileUrl,
url: profileUrl,
),
width: 25,
height: 25,
margin: EdgeInsets.only(top: 10),
), ),
width: 25,
height: 25,
margin: EdgeInsets.only(top: 10),
),
Expanded( Expanded(
flex: 4, flex: 4,
child: Container( child: Container(
@ -331,22 +372,31 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget
if (orderNo != null && !isPrescriptions) if (orderNo != null && !isPrescriptions)
Row( Row(
children: <Widget>[ children: <Widget>[
Texts('Order No: ', Texts(
color: Colors.grey[800], 'Order No: ',
fontSize: 12), color: Colors.grey[800],
Texts(orderNo ?? '', fontSize: 12) fontSize: 12
),
Texts(
orderNo ?? '',fontSize: 12
)
], ],
), ),
if (invoiceNO != null && !isPrescriptions) if (invoiceNO != null && !isPrescriptions)
Row( Row(
children: <Widget>[ children: <Widget>[
Texts('Invoice: ', Texts(
color: Colors.grey[800], 'Invoice: ',
fontSize: 12), color: Colors.grey[800],
Texts(invoiceNO, fontSize: 12) fontSize: 12
),
Texts(
invoiceNO,
fontSize: 12
)
], ],
), ),
if (isPrescriptions && branch != null) if ( branch != null)
Row( Row(
children: [ children: [
Texts('Branch: ', Texts('Branch: ',
@ -356,6 +406,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget
], ],
), ),
if (isPrescriptions) if (isPrescriptions)
if(clinic!=null)
Row( Row(
children: [ children: [
Texts('Clinic: ', Texts('Clinic: ',
@ -384,25 +435,22 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget
), ),
Row( Row(
children: <Widget>[ children: <Widget>[
if (!isMedicalFile) Expanded(
Expanded( child: Texts(
child: Texts( !isPrescriptions? 'Result Date: ': 'Prescriptions Date ',
!isPrescriptions color: Colors.grey[800],
? 'Result Date: ' fontSize: 12,
: 'Prescriptions Date ',
color: Colors.grey[800],
fontSize: 12,
),
), ),
),
Texts( Texts(
'${DateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}', '${DateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}',fontSize: 14,
fontSize: 14,
) )
], ],
) )
]), ]),
), ),
), ),
], ],
), ),
), ),
@ -416,7 +464,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget
} }
convertDateFormat2(String str) { convertDateFormat2(String str) {
String newDate = ""; String newDate ="";
const start = "/Date("; const start = "/Date(";
const end = "+0300)"; const end = "+0300)";
@ -427,10 +475,10 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget
var date = new DateTime.fromMillisecondsSinceEpoch( var date = new DateTime.fromMillisecondsSinceEpoch(
int.parse(str.substring(startIndex + start.length, endIndex))); int.parse(str.substring(startIndex + start.length, endIndex)));
newDate = date.year.toString() + newDate = date.year.toString() +
"/" + "/" +
date.month.toString().padLeft(2, '0') + date.month.toString().padLeft(2, '0') +
"/" + "/" +
date.day.toString().padLeft(2, '0'); date.day.toString().padLeft(2, '0');
} }
return newDate.toString(); return newDate.toString();
@ -454,5 +502,5 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget
} }
@override @override
Size get preferredSize => Size(double.maxFinite, 290); Size get preferredSize => Size(double.maxFinite,290);
} }

@ -57,7 +57,7 @@ class ProfileWelcomeWidget extends StatelessWidget {
CircleAvatar( CircleAvatar(
// radius: (52) // radius: (52)
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(20),
child: Image.network( child: Image.network(
authProvider.doctorProfile.doctorImageURL, authProvider.doctorProfile.doctorImageURL,
fit: BoxFit.fill, fit: BoxFit.fill,

@ -0,0 +1,45 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/steps_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
class SOAPStepHeader extends StatelessWidget {
const SOAPStepHeader({
Key key,
this.currentIndex, this.changePageViewIndex,
}) : super(key: key);
final int currentIndex;
final Function changePageViewIndex;
@override
Widget build(BuildContext context) {
return Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).createNew,
fontSize: 3 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w500,
),
AppText(TranslationBase.of(context).episode,
fontSize: 3.5 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
Container(
color: Theme.of(context).scaffoldBackgroundColor,
child: StepsWidget(
index: currentIndex,
changeCurrentTab: changePageViewIndex,
height: 100,//MediaQuery.of(context).size.height * 0.17,
),
),
SizedBox(
height: 30,
),
],
);
}
}

@ -44,7 +44,6 @@ class ExpandableSOAPWidget extends StatelessWidget {
if(isRequired) if(isRequired)
Icon( Icon(
FontAwesomeIcons.asterisk, FontAwesomeIcons.asterisk,
color: AppGlobal.appPrimaryColor,
size: 12, size: 12,
) )
], ],

@ -26,13 +26,14 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../SOAP_step_header.dart';
import 'examination-item-card.dart'; import 'examination-item-card.dart';
import 'objective-add-examination-page.dart'; import 'objective-add-examination-page.dart';
class UpdateObjectivePage extends StatefulWidget { class UpdateObjectivePage extends StatefulWidget {
final Function changePageViewIndex; final Function changePageViewIndex;
final Function changeLoadingState; final Function changeLoadingState;
final int currentIndex;
final List<MySelectedExamination> mySelectedExamination; final List<MySelectedExamination> mySelectedExamination;
final PatiantInformtion patientInfo; final PatiantInformtion patientInfo;
@ -41,7 +42,7 @@ class UpdateObjectivePage extends StatefulWidget {
this.changePageViewIndex, this.changePageViewIndex,
this.mySelectedExamination, this.mySelectedExamination,
this.patientInfo, this.patientInfo,
this.changeLoadingState}); this.changeLoadingState, this.currentIndex});
@override @override
_UpdateObjectivePageState createState() => _UpdateObjectivePageState(); _UpdateObjectivePageState createState() => _UpdateObjectivePageState();
@ -108,6 +109,8 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
body: Column( body: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
SOAPStepHeader(currentIndex: widget.currentIndex, changePageViewIndex:widget.changePageViewIndex),
Expanded( Expanded(
child: SingleChildScrollView( child: SingleChildScrollView(
physics: ScrollPhysics(), physics: ScrollPhysics(),

@ -24,19 +24,23 @@ class StepsWidget extends StatelessWidget {
height: height == 0 ? 150 : height, height: height == 0 ? 150 : height,
width: MediaQuery.of(context).size.width * 0.9, width: MediaQuery.of(context).size.width * 0.9,
color: Colors.transparent, color: Colors.transparent,
child: Center( // child:,
child: Container(
width: MediaQuery.of(context).size.width * 0.87,
child: Divider(
color: Colors.grey,
height: 0.75,
thickness: 0.75,
),
),
),
), ),
Positioned( Positioned(
top: 43, top: 30
,
child: Center(
child: Container(
width: MediaQuery.of(context).size.width * 0.9,
child: Divider(
color: Colors.grey,
height: 0.75,
thickness: 0.75,
),
),
)),
Positioned(
top: 10,
left: 0, left: 0,
child: InkWell( child: InkWell(
onTap: () => changeCurrentTab(0), onTap: () => changeCurrentTab(0),
@ -87,7 +91,7 @@ class StepsWidget extends StatelessWidget {
), ),
), ),
Positioned( Positioned(
top: 43, top: 10,
left: MediaQuery left: MediaQuery
.of(context) .of(context)
.size .size
@ -143,7 +147,7 @@ class StepsWidget extends StatelessWidget {
), ),
), ),
Positioned( Positioned(
top: 43, top: 10,
left: MediaQuery left: MediaQuery
.of(context) .of(context)
.size .size
@ -201,7 +205,7 @@ class StepsWidget extends StatelessWidget {
), ),
), ),
Positioned( Positioned(
top: 43, top: 10,
right: 0, right: 0,
child: InkWell( child: InkWell(
onTap: () => index >= 3 ? changeCurrentTab(4) : null, onTap: () => index >= 3 ? changeCurrentTab(4) : null,
@ -271,7 +275,7 @@ class StepsWidget extends StatelessWidget {
), ),
), ),
Positioned( Positioned(
top: 43, top: 10,
right: 0, right: 0,
child: InkWell( child: InkWell(
onTap: () => changeCurrentTab(0), onTap: () => changeCurrentTab(0),
@ -321,7 +325,7 @@ class StepsWidget extends StatelessWidget {
), ),
), ),
Positioned( Positioned(
top: 43, top: 10,
right: MediaQuery right: MediaQuery
.of(context) .of(context)
.size .size
@ -374,7 +378,7 @@ class StepsWidget extends StatelessWidget {
), ),
), ),
Positioned( Positioned(
top: 43, top: 10,
right: MediaQuery right: MediaQuery
.of(context) .of(context)
.size .size
@ -432,7 +436,7 @@ class StepsWidget extends StatelessWidget {
), ),
), ),
Positioned( Positioned(
top: 43, top: 10,
left: 0, left: 0,
child: InkWell( child: InkWell(
onTap: () => index >= 3 ? changeCurrentTab(4) : null, onTap: () => index >= 3 ? changeCurrentTab(4) : null,

@ -1,5 +1,5 @@
import 'package:autocomplete_textfield/autocomplete_textfield.dart'; import 'package:autocomplete_textfield/autocomplete_textfield.dart';
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/model/get_medication_response_model.dart'; import 'package:doctor_app_flutter/core/model/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
@ -10,12 +10,14 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.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: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/dialogs/master_key_dailog.dart'; import 'package:doctor_app_flutter/widgets/shared/dialogs/master_key_dailog.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -40,30 +42,52 @@ class _UpdateMedicationWidgetState extends State<UpdateMedicationWidget> {
return Column( return Column(
children: [ children: [
Container( InkWell(
child: TextFields( onTap: () {
hintText: TranslationBase.of(context).addMedication, openMedicationList(context);
borderColor: HexColor('#707070'), },
borderWidth: 0.30, child: Container(
fontSize: 13.5, padding: EdgeInsets.symmetric(
borderRadius: 12, vertical: 8, horizontal: 8.0),
onTapTextFields: () { margin:
openMedicationList(context); EdgeInsets.symmetric(vertical: 8),
}, decoration: BoxDecoration(
readOnly: true, border: Border.all(
// hintColor: Colors.black, color: Colors.grey.shade400,
suffixIcon: EvaIcons.plusCircleOutline, width: 0.5),
suffixIconColor: Color(0xFF2B353E), borderRadius: BorderRadius.all(
fontWeight: FontWeight.w600, Radius.circular(8),
// controller: messageController, ),
validator: (value) { color: Colors.white,
if (value == null) ),
return TranslationBase child: Row(
.of(context) mainAxisAlignment:
.emptyMessage; MainAxisAlignment.spaceBetween,
else crossAxisAlignment:
return null; CrossAxisAlignment.center,
}), children: [
Expanded(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
AppText(
"${TranslationBase.of(context).addMedication}",
fontSize: SizeConfig
.textMultiplier *
1.8,
color: Colors.black,
fontWeight: FontWeight.bold,
),
],
)),
Icon(
Icons.add_box_rounded,
size: 25,
)
],
),
),
), ),
SizedBox( SizedBox(
height: 20, height: 20,
@ -77,6 +101,7 @@ class _UpdateMedicationWidgetState extends State<UpdateMedicationWidget> {
showModalBottomSheet( showModalBottomSheet(
backgroundColor: Colors.white, backgroundColor: Colors.white,
isScrollControlled: true, isScrollControlled: true,
isDismissible: false,
context: context, context: context,
builder: (context) { builder: (context) {
return AddMedication( return AddMedication(
@ -120,17 +145,20 @@ class _AddMedicationState extends State<AddMedication> {
String hintText, String selectedText, bool isDropDown, String hintText, String selectedText, bool isDropDown,
{IconData icon}) { {IconData icon}) {
return InputDecoration( return InputDecoration(
filled: true,
fillColor: Colors.white,
contentPadding: EdgeInsets.symmetric(vertical: 10, horizontal: 10), contentPadding: EdgeInsets.symmetric(vertical: 10, horizontal: 10),
focusedBorder: OutlineInputBorder( focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.grey, width: 1.0), borderSide: BorderSide(color: Colors.grey, width: 0.00),
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
), ),
enabledBorder: OutlineInputBorder( enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.grey, width: 1.0), borderSide: BorderSide(color: Colors.grey, width: 0.00),
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
), ),
disabledBorder: OutlineInputBorder( disabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.grey, width: 1.0), borderSide: BorderSide(color: Colors.grey, width: 0.00),
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
), ),
hintText: selectedText != null ? selectedText : hintText, hintText: selectedText != null ? selectedText : hintText,
@ -152,7 +180,6 @@ class _AddMedicationState extends State<AddMedication> {
.of(context) .of(context)
.size; .size;
return FractionallySizedBox( return FractionallySizedBox(
heightFactor: 0.7,
child: BaseView<SOAPViewModel>( child: BaseView<SOAPViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
if (model.medicationStrengthList.length == 0) { if (model.medicationStrengthList.length == 0) {
@ -172,388 +199,402 @@ class _AddMedicationState extends State<AddMedication> {
}, },
builder: (_, model, w) => builder: (_, model, w) =>
AppScaffold( AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: false, isShowAppBar: false,
body: SingleChildScrollView( body: Center(
child: Center( child: Container(
child: FractionallySizedBox( child: Column(
widthFactor: 0.9, crossAxisAlignment: CrossAxisAlignment.start,
child: Column( children: [
crossAxisAlignment: CrossAxisAlignment.start, Container(
padding:
EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5),
decoration: BoxDecoration(
color: Colors.white,
),
height: 115,
child: Container(
padding: EdgeInsets.only(left: 10, right: 10),
margin: EdgeInsets.only(top: 40),
child: Column(
children: [ children: [
Row(
SizedBox( mainAxisAlignment: MainAxisAlignment.spaceBetween,
height: 16, children: [
), RichText(
AppText( text: TextSpan(
TranslationBase style: TextStyle(
.of(context) fontSize: 20, color: Colors.black),
.addMedication, children: <TextSpan>[
fontWeight: FontWeight.bold, new TextSpan(
fontSize: 16, text: TranslationBase.of(context)
), .addMedication,
SizedBox( style: TextStyle(
height: 16, color: Color(0xFF2B353E),
), fontWeight: FontWeight.bold,
Container( fontFamily: 'Poppins',
height: screenSize.height * 0.070, fontSize: 20)),
child: InkWell( ],
onTap: model.allMedicationList != null ),
? () {
setState(() {
_selectedMedication = null;
});
}
: null,
child: _selectedMedication == null
? AutoCompleteTextField<
GetMedicationResponseModel>(
decoration: textFieldSelectorDecoration(
TranslationBase
.of(context)
.searchMedicineNameHere,
_selectedMedication != null
? _selectedMedication.genericName
: null,
true,
icon: EvaIcons.search),
itemSubmitted: (item) =>
setState(
() => _selectedMedication = item),
key: key,
suggestions: model.allMedicationList,
itemBuilder: (context, suggestion) =>
new Padding(
child: Texts(
suggestion.description + '/' +
suggestion.genericName),
padding: EdgeInsets.all(8.0)),
itemSorter: (a, b) => 1,
itemFilter: (suggestion, input) =>
suggestion.genericName
.toLowerCase()
.startsWith(input.toLowerCase()) ||
suggestion.description
.toLowerCase()
.startsWith(input.toLowerCase()) ||
suggestion.keywords
.toLowerCase()
.startsWith(input.toLowerCase()),
)
: TextField(
minLines: 2,
maxLines: 2,
decoration: textFieldSelectorDecoration(
TranslationBase
.of(context)
.searchMedicineNameHere,
_selectedMedication != null
? _selectedMedication.description +
(' (${_selectedMedication
.genericName} )')
: null,
true,
icon: EvaIcons.search),
enabled: false,
), ),
), InkWell(
), onTap: () {
if(isFormSubmitted && _selectedMedication == null) Navigator.pop(context);
CustomValidationError(),
SizedBox(
height: 5,
),
TextFields(
onTapTextFields: model.medicationDoseTimeList !=
null
? () {
MasterKeyDailog dialog = MasterKeyDailog(
list: model.medicationDoseTimeList,
okText: TranslationBase
.of(context)
.ok,
okFunction: (selectedValue) {
setState(() {
_selectedMedicationDose =
selectedValue;
doseController.text =
projectViewModel.isArabic
? _selectedMedicationDose
.nameAr
: _selectedMedicationDose
.nameEn;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: null,
hasLabelText: doseController.text !=
'' ? true : false,
showLabelText: true,
hintText: TranslationBase
.of(context)
.doseTime,
//TODO add translation
fontSize: 13.5,
readOnly: true,
// hintColor: Colors.black,
fontWeight: FontWeight.w600,
maxLines: 2,
minLines: 1,
controller: doseController,
validator: (value) {
if (value == null)
return TranslationBase
.of(context)
.emptyMessage;
else
return null;
}),
SizedBox(
height: 5,
),
if(isFormSubmitted &&
_selectedMedicationDose == null)
CustomValidationError(), SizedBox(
height: 5,
),
TextFields(
onTapTextFields: model
.medicationStrengthList != null
? () {
MasterKeyDailog dialog = MasterKeyDailog(
list: model.medicationStrengthList,
okText: TranslationBase
.of(context)
.ok,
okFunction: (selectedValue) {
setState(() {
_selectedMedicationStrength =
selectedValue;
strengthController.text =
projectViewModel.isArabic
? _selectedMedicationStrength
.nameAr
: _selectedMedicationStrength
.nameEn;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
}, },
); child: Icon(FontAwesomeIcons.times,
} size: 30, color: Color(0xFF2B353E)))
: null, ],
hasLabelText: strengthController.text !=
'' ? true : false,
showLabelText: true,
hintText: TranslationBase
.of(context)
.strength,
fontSize: 13.5,
readOnly: true,
// hintColor: Colors.black,
fontWeight: FontWeight.w600,
maxLines: 2,
minLines: 1,
controller: strengthController,
validator: (value) {
if (value == null)
return TranslationBase
.of(context)
.emptyMessage;
else
return null;
}), SizedBox(
height: 5,
), ),
if(isFormSubmitted && ],
_selectedMedicationStrength == null) ),
CustomValidationError(), ),
),
SizedBox(
height: 10,
),
SizedBox(
height: 16,
),
Expanded(
child: Center(
child: FractionallySizedBox(
widthFactor: 0.9,
child: Column(
children: [
SizedBox(
height: 16,
),
SizedBox(
height: 16,
),
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: model.allMedicationList != null
? () {
setState(() {
_selectedMedication = null;
});
}
: null,
child: _selectedMedication == null
? AutoCompleteTextField<
GetMedicationResponseModel>(
decoration:
textFieldSelectorDecoration(
SizedBox( TranslationBase.of(context)
height: 5, .searchMedicineNameHere,
), _selectedMedication != null
? _selectedMedication
.genericName
: null,
true,
icon: EvaIcons.search),
itemSubmitted: (item) => setState(
() =>
_selectedMedication = item),
key: key,
suggestions:
model.allMedicationList,
itemBuilder: (context,
suggestion) =>
new Padding(
child: Texts(suggestion
.description +
'/' +
suggestion.genericName),
padding:
EdgeInsets.all(8.0)),
itemSorter: (a, b) => 1,
itemFilter: (suggestion, input) =>
suggestion.genericName
.toLowerCase()
.startsWith(
input.toLowerCase()) ||
suggestion.description
.toLowerCase()
.startsWith(
input.toLowerCase()) ||
suggestion.keywords
.toLowerCase()
.startsWith(
input.toLowerCase()),
)
: AppTextFieldCustom(
hintText: _selectedMedication != null
? _selectedMedication
.description +
(' (${_selectedMedication.genericName} )')
: TranslationBase.of(context)
.searchMedicineNameHere,
minLines: 2,
maxLines: 2,
enabled: false,
),
),
),
if (isFormSubmitted &&
_selectedMedication == null)
CustomValidationError(),
SizedBox(
height: 5,
),
AppTextFieldCustom(
enabled: false,
onClick: model.medicationDoseTimeList != null
? () {
MasterKeyDailog dialog =
MasterKeyDailog(
list: model.medicationDoseTimeList,
okText:
TranslationBase.of(context).ok,
okFunction: (selectedValue) {
setState(() {
_selectedMedicationDose =
selectedValue;
TextFields( doseController
onTapTextFields: model .text = projectViewModel
.medicationRouteList != null .isArabic
? () { ? _selectedMedicationDose
MasterKeyDailog dialog = MasterKeyDailog( .nameAr
list: model.medicationRouteList, : _selectedMedicationDose
okText: TranslationBase .nameEn;
.of(context) });
.ok, },
okFunction: (selectedValue) { );
setState(() { showDialog(
_selectedMedicationRoute = barrierDismissible: false,
selectedValue; context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: null,
hintText:
TranslationBase.of(context).doseTime,
//TODO add translation
maxLines: 2,
minLines: 2,
isDropDown: true,
controller: doseController,
),
SizedBox(
height: 5,
),
if (isFormSubmitted &&
_selectedMedicationDose == null)
CustomValidationError(),
SizedBox(
height: 5,
),
AppTextFieldCustom(
enabled: false,
isDropDown: true,
onClick: model.medicationStrengthList != null
? () {
MasterKeyDailog dialog =
MasterKeyDailog(
list: model.medicationStrengthList,
okText:
TranslationBase.of(context).ok,
okFunction: (selectedValue) {
setState(() {
_selectedMedicationStrength =
selectedValue;
routeController.text = strengthController
projectViewModel.isArabic .text = projectViewModel
? _selectedMedicationRoute .isArabic
.nameAr ? _selectedMedicationStrength
: _selectedMedicationRoute .nameAr
.nameEn; : _selectedMedicationStrength
}); .nameEn;
}, });
); },
showDialog( );
barrierDismissible: false, showDialog(
context: context, barrierDismissible: false,
builder: (BuildContext context) { context: context,
return dialog; builder: (BuildContext context) {
}, return dialog;
); },
} );
: null, }
hasLabelText: routeController.text != : null,
'' ? true : false, hintText:
showLabelText: true, TranslationBase.of(context).strength,
hintText: TranslationBase // hintColor: Colors.black,
.of(context) // fontWeight: FontWeight.w600,
.route, maxLines: 2,
fontSize: 13.5, minLines: 2,
readOnly: true, controller: strengthController,
// hintColor: Colors.black, ),
fontWeight: FontWeight.w600, SizedBox(
maxLines: 2, height: 5,
minLines: 1, ),
controller: routeController, if (isFormSubmitted &&
validator: (value) { _selectedMedicationStrength == null)
if (value == null) CustomValidationError(),
return TranslationBase SizedBox(
.of(context) height: 5,
.emptyMessage; ),
else AppTextFieldCustom(
return null; enabled: false,
}), isDropDown: true,
SizedBox( onClick: model.medicationRouteList != null
height: 5, ? () {
), MasterKeyDailog dialog =
if(isFormSubmitted && MasterKeyDailog(
_selectedMedicationRoute == null) list: model.medicationRouteList,
CustomValidationError(), okText:
SizedBox( TranslationBase.of(context).ok,
height: 5, okFunction: (selectedValue) {
), setState(() {
TextFields( _selectedMedicationRoute =
onTapTextFields: model selectedValue;
.medicationFrequencyList != null
? () {
MasterKeyDailog dialog = MasterKeyDailog(
list: model.medicationFrequencyList,
okText: TranslationBase
.of(context)
.ok,
okFunction: (selectedValue) {
setState(() {
_selectedMedicationFrequency =
selectedValue;
frequencyController.text = routeController
projectViewModel.isArabic .text = projectViewModel
? _selectedMedicationFrequency .isArabic
.nameAr ? _selectedMedicationRoute
: _selectedMedicationFrequency .nameAr
.nameEn; : _selectedMedicationRoute
}); .nameEn;
}, });
); },
showDialog( );
barrierDismissible: false, showDialog(
context: context, barrierDismissible: false,
builder: (BuildContext context) { context: context,
return dialog; builder: (BuildContext context) {
}, return dialog;
); },
} );
: null, }
hasLabelText: frequencyController.text != : null,
'' ? true : false, hintText: TranslationBase.of(context).route,
showLabelText: true, maxLines: 2,
hintText: TranslationBase minLines: 2,
.of(context) controller: routeController,
.frequency, ),
//TODO add translation SizedBox(
fontSize: 13.5, height: 5,
readOnly: true, ),
// hintColor: Colors.black, if (isFormSubmitted &&
fontWeight: FontWeight.w600, _selectedMedicationRoute == null)
maxLines: 2, CustomValidationError(),
minLines: 1, SizedBox(
controller: frequencyController, height: 5,
validator: (value) { ),
if (value == null) AppTextFieldCustom(
return TranslationBase onClick: model.medicationFrequencyList != null
.of(context) ? () {
.emptyMessage; MasterKeyDailog dialog =
else MasterKeyDailog(
return null; list: model.medicationFrequencyList,
}), okText:
SizedBox( TranslationBase.of(context).ok,
height: 5, okFunction: (selectedValue) {
), setState(() {
if(isFormSubmitted && _selectedMedicationFrequency =
_selectedMedicationFrequency == null) selectedValue;
CustomValidationError(),
SizedBox(
height: 30,
),
AppButton(
title: TranslationBase
.of(context)
.add
.toUpperCase(),
onPressed: () {
setState(() {
isFormSubmitted = true;
});
if (_selectedMedication != null &&
_selectedMedicationDose !=
null &&
_selectedMedicationStrength != null &&
_selectedMedicationRoute != null &&
_selectedMedicationFrequency != null) {
widget.medicationController.text =
widget.medicationController.text +
'${_selectedMedication
.description } (${TranslationBase
.of(context)
.doseTime} ) ${doseController
.text} (${TranslationBase
.of(context)
.strength}) ${strengthController
.text} (${TranslationBase
.of(context)
.route }) ${routeController
.text} (${TranslationBase
.of(context)
.frequency }) ${frequencyController
.text} \n \n';
Navigator.of(context).pop();
}
},
),
]
frequencyController
.text = projectViewModel
.isArabic
? _selectedMedicationFrequency
.nameAr
: _selectedMedicationFrequency
.nameEn;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: null,
hintText:
TranslationBase.of(context).frequency,
//TODO add translation
enabled: false,
// hintColor: Colors.black,
maxLines: 2,
minLines: 2,
isDropDown: true,
controller: frequencyController,
),
SizedBox(
height: 5,
),
if (isFormSubmitted &&
_selectedMedicationFrequency == null)
CustomValidationError(),
SizedBox(
height: 30,
),
],
)),
),
),
]),
),
),
bottomSheet: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
border: Border.all(color: HexColor('#707070'), width: 0.30),
),
height: MediaQuery.of(context).size.height * 0.1,
width: double.infinity,
child: Column(
children: [
SizedBox(
height: 10,
),
Container(
child: FractionallySizedBox(
widthFactor: .80,
child: Center(
child: AppButton(
title: TranslationBase.of(context).addMedication.toUpperCase(),
color: Color(0xFF359846),
onPressed: () {
setState(() {
isFormSubmitted = true;
});
if (_selectedMedication != null &&
_selectedMedicationDose != null &&
_selectedMedicationStrength != null &&
_selectedMedicationRoute != null &&
_selectedMedicationFrequency != null) {
widget.medicationController.text = widget
.medicationController.text +
'${_selectedMedication.description} (${TranslationBase.of(context).doseTime} ) ${doseController.text} (${TranslationBase.of(context).strength}) ${strengthController.text} (${TranslationBase.of(context).route}) ${routeController.text} (${TranslationBase.of(context).frequency}) ${frequencyController.text} \n \n';
Navigator.of(context).pop();
}
},
), ),
), ),
), ),
),), ),
SizedBox(
height: 5,
),
],
),
),
),
), ),
); );
} }

@ -1,5 +1,6 @@
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/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
@ -21,10 +22,13 @@ import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjecti
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_history_widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_history_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.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:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import '../SOAP_step_header.dart';
import '../expandable_SOAP_widget.dart'; import '../expandable_SOAP_widget.dart';
import '../steps_widget.dart';
class UpdateSubjectivePage extends StatefulWidget { class UpdateSubjectivePage extends StatefulWidget {
final Function changePageViewIndex; final Function changePageViewIndex;
@ -32,13 +36,14 @@ class UpdateSubjectivePage extends StatefulWidget {
final List<MySelectedAllergy> myAllergiesList; final List<MySelectedAllergy> myAllergiesList;
final List<MySelectedHistory> myHistoryList; final List<MySelectedHistory> myHistoryList;
final PatiantInformtion patientInfo; final PatiantInformtion patientInfo;
final int currentIndex;
UpdateSubjectivePage( UpdateSubjectivePage(
{Key key, {Key key,
this.changePageViewIndex, this.changePageViewIndex,
this.myAllergiesList, this.myAllergiesList,
this.myHistoryList, this.myHistoryList,
this.patientInfo, this.changeLoadingState}); this.patientInfo, this.changeLoadingState, this.currentIndex});
@override @override
_UpdateSubjectivePageState createState() => _UpdateSubjectivePageState(); _UpdateSubjectivePageState createState() => _UpdateSubjectivePageState();
@ -231,10 +236,10 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
widthFactor: 0.9, widthFactor: 0.9,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox(
height: 30, SOAPStepHeader(currentIndex: widget.currentIndex, changePageViewIndex:widget.changePageViewIndex),
),
ExpandableSOAPWidget( ExpandableSOAPWidget(
headerTitle: TranslationBase.of(context) headerTitle: TranslationBase.of(context)
.chiefComplaints .chiefComplaints
@ -316,11 +321,11 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(10.0), Radius.circular(0.0),
), ),
border: Border.all( border: Border.all(
color: HexColor('#707070'), color: HexColor('#707070'),
width: 0.30), width: 0),
), ),
height: MediaQuery height: MediaQuery
.of(context) .of(context)
@ -535,3 +540,4 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {

@ -14,6 +14,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/helpers.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/patients/profile/soap_update/subjective/update_subjective_page.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart'; import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart';
@ -28,6 +29,7 @@ import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'SOAP_step_header.dart';
import 'custom_validation_error.dart'; import 'custom_validation_error.dart';
class UpdateAssessmentPage extends StatefulWidget { class UpdateAssessmentPage extends StatefulWidget {
@ -35,13 +37,13 @@ class UpdateAssessmentPage extends StatefulWidget {
List<MySelectedAssessment> mySelectedAssessmentList; List<MySelectedAssessment> mySelectedAssessmentList;
final PatiantInformtion patientInfo; final PatiantInformtion patientInfo;
final Function changeLoadingState; final Function changeLoadingState;
final int currentIndex;
UpdateAssessmentPage( UpdateAssessmentPage(
{Key key, {Key key,
this.changePageViewIndex, this.changePageViewIndex,
this.mySelectedAssessmentList, this.mySelectedAssessmentList,
this.patientInfo, this.patientInfo,
this.changeLoadingState}); this.changeLoadingState, this.currentIndex});
@override @override
_UpdateAssessmentPageState createState() => _UpdateAssessmentPageState(); _UpdateAssessmentPageState createState() => _UpdateAssessmentPageState();
@ -122,9 +124,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
SizedBox( SOAPStepHeader(currentIndex: widget.currentIndex, changePageViewIndex:widget.changePageViewIndex),
height: 30,
),
Container( Container(
width: double.infinity, width: double.infinity,
margin: EdgeInsets.only(top: 10, left: 10, right: 10), margin: EdgeInsets.only(top: 10, left: 10, right: 10),
@ -640,7 +640,8 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
{IconData icon}) { {IconData icon}) {
return InputDecoration( return InputDecoration(
fillColor: Colors.white, fillColor: Colors.white,
contentPadding: EdgeInsets.symmetric(vertical: 10, horizontal: 10),
contentPadding: EdgeInsets.symmetric(vertical: 15, horizontal: 10),
focusedBorder: OutlineInputBorder( focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0Xffffffff), width: 1.0), borderSide: BorderSide(color: Color(0Xffffffff), width: 1.0),
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
@ -688,7 +689,8 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox(
SizedBox(
height: 16, height: 16,
), ),
Row( Row(
@ -763,6 +765,7 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
.mySelectedAssessment.selectedICD == .mySelectedAssessment.selectedICD ==
null null
? AutoCompleteTextField<MasterKeyModel>( ? AutoCompleteTextField<MasterKeyModel>(
decoration: textFieldSelectorDecoration( decoration: textFieldSelectorDecoration(
TranslationBase.of(context) TranslationBase.of(context)
.nameOrICD, .nameOrICD,

@ -1,9 +1,8 @@
import 'package:doctor_app_flutter/config/config.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/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteReqModel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteResModel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/post_progress_note_request_model.dart'; import 'package:doctor_app_flutter/models/SOAP/post_progress_note_request_model.dart';
@ -13,39 +12,40 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/helpers.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/patients/profile/soap_update/subjective/update_subjective_page.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart'; import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.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: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/divider_with_spaces_around.dart';
import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart'; import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart';
import 'package:doctor_app_flutter/widgets/shared/new_text_Field.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'SOAP_step_header.dart';
class UpdatePlanPage extends StatefulWidget { class UpdatePlanPage extends StatefulWidget {
final Function changePageViewIndex; final Function changePageViewIndex;
final PatiantInformtion patientInfo; final PatiantInformtion patientInfo;
final Function changeLoadingState; final Function changeLoadingState;
GetPatientProgressNoteResModel patientProgressNote;
final int currentIndex;
GetPatientProgressNoteResModel patientProgressNote;
UpdatePlanPage( UpdatePlanPage(
{Key key, {Key key,
this.changePageViewIndex, this.changePageViewIndex,
this.patientInfo, this.patientInfo,
this.changeLoadingState, this.changeLoadingState,
this.patientProgressNote}); this.patientProgressNote,
this.currentIndex});
@override @override
_UpdatePlanPageState createState() => _UpdatePlanPageState(); _UpdatePlanPageState createState() => _UpdatePlanPageState();
} }
class _UpdatePlanPageState extends State<UpdatePlanPage> { class _UpdatePlanPageState extends State<UpdatePlanPage> {
bool isProgressNoteExpand = false; bool isAddProgress = true;
TextEditingController progressNoteController = TextEditingController progressNoteController =
TextEditingController(text: null); TextEditingController(text: null);
@ -62,7 +62,17 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
)), )),
); );
} }
TextEditingController typeController = TextEditingController();
@override
void initState() {
super.initState();
if(widget.patientProgressNote.planNote !=null ){
setState(() {
isAddProgress = false;
});
}
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -83,7 +93,9 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
widget.patientProgressNote.createdOn = model.patientProgressNoteList[0].createdOn; widget.patientProgressNote.createdOn = model.patientProgressNoteList[0].createdOn;
widget.patientProgressNote.editedOn = model.patientProgressNoteList[0].editedOn; widget.patientProgressNote.editedOn = model.patientProgressNoteList[0].editedOn;
widget.patientProgressNote.editedByName = model.patientProgressNoteList[0].editedByName; widget.patientProgressNote.editedByName = model.patientProgressNoteList[0].editedByName;
setState(() {
isAddProgress = false;
});
} }
widget.changeLoadingState(false); widget.changeLoadingState(false);
}, },
@ -96,241 +108,199 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
child: Center( child: Center(
child: FractionallySizedBox( child: FractionallySizedBox(
widthFactor: 0.95, widthFactor: 0.95,
child: Container( child: Column(
margin: EdgeInsets.all(8.0), children: [
padding: EdgeInsets.all(12.0), SOAPStepHeader(currentIndex: widget.currentIndex, changePageViewIndex:widget.changePageViewIndex),
decoration: BoxDecoration(
shape: BoxShape.rectangle, SizedBox(height: 10,),
color: Colors.white, Container(
borderRadius: BorderRadius.circular(12), margin: EdgeInsets.all(8.0),
border: Border.fromBorderSide(BorderSide( padding: EdgeInsets.all(12.0),
color: Colors.grey.shade400, decoration: BoxDecoration(
width: 0.4, shape: BoxShape.rectangle,
)), color: Colors.white,
), borderRadius: BorderRadius.circular(12),
child: Column( border: Border.fromBorderSide(BorderSide(
mainAxisAlignment: MainAxisAlignment.start, color: Colors.grey.shade400,
children: [ width: 0.4,
SizedBox( )),
height: 10,
), ),
HeaderBodyExpandableNotifier( child: Column(
headerWidget: Row( mainAxisAlignment: MainAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceAround, children: [
children: [
Row(
children: [
Texts(TranslationBase
.of(context)
.progressNoteSOAP,
variant: isProgressNoteExpand ? "bodyText" : '',
bold: isProgressNoteExpand ? true : false,
color: Colors.black),
Icon(
FontAwesomeIcons.asterisk,
color: Colors.black,
size: 12,
)
],
),
InkWell(
onTap: () {
setState(() {
isProgressNoteExpand = !isProgressNoteExpand;
});
},
child: Icon(isProgressNoteExpand
? Icons.keyboard_arrow_up
: Icons.keyboard_arrow_down))
],
),
bodyWidget: Column(children: [
SizedBox(
height: 2,
),
Column( Column(
children: [ crossAxisAlignment: CrossAxisAlignment.start,
if(widget.patientProgressNote.planNote == null) children: [
Container(
margin:
EdgeInsets.only(left: 10, right: 10, top: 15),
child: AppTextFieldCustom(
hintText: TranslationBase.of(context).progressNote,
controller: progressNoteController,
minLines: 2,
maxLines: 4,
inputType: TextInputType.multiline,
onChanged: (value){
// examination.remark = value;
},
),
),
SizedBox(
height: 20,
),
if ( widget.patientProgressNote.planNote != null)
Container( Container(
margin: margin: EdgeInsets.only(left: 5, right: 5),
EdgeInsets.only(left: 5, right: 5, top: 15), child: Texts(TranslationBase
child: Column( .of(context)
crossAxisAlignment: .progressNote)),
CrossAxisAlignment.start, if(isAddProgress)
children: [ Container(
margin:
SizedBox( EdgeInsets.only(left: 10, right: 10, top: 15),
height: 8,
child: AppTextFieldCustom(
hintText: TranslationBase.of(context).progressNote,
controller: progressNoteController,
minLines: 2,
maxLines: 4,
inputType: TextInputType.multiline,
onChanged: (value){
widget.patientProgressNote.planNote = value;
},
), ),
Row( ),
mainAxisAlignment: MainAxisAlignment.spaceAround, SizedBox(
height: 9,
),
if ( widget.patientProgressNote.planNote != null&& !isAddProgress)
Container(
margin:
EdgeInsets.only(left: 5, right: 5, ),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [ children: [
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Texts('Appointment No: '), Row(
Texts(widget.patientProgressNote.appointmentNo.toString()), children: [
Texts('Appointment No: ',fontSize: 12,),
Texts(widget.patientProgressNote.appointmentNo??'',fontWeight: FontWeight.w600,),
],
),
Texts(
widget.patientProgressNote.createdOn !=null?DateUtils.getDayMonthYearDateFormatted(DateTime.parse(widget.patientProgressNote.createdOn)):DateUtils.getDayMonthYearDateFormatted(DateTime.now()),
fontWeight: FontWeight
.w600,
fontSize: 14,
)
], ],
), ),
AppText( Row(
widget.patientProgressNote.createdOn !=null?DateUtils.getDayMonthYearDateFormatted(DateTime.parse(widget.patientProgressNote.createdOn)):DateUtils.getDayMonthYearDateFormatted(DateTime.now()),
fontWeight: FontWeight
.bold,
fontSize: 16,
)
],
),
Row(
children: [
Texts('Condition: '),
Texts(widget.patientProgressNote.mName.toString()),
], mainAxisAlignment:
), MainAxisAlignment.spaceBetween,
if(widget.patientProgressNote.createdByName !=null) crossAxisAlignment: CrossAxisAlignment.start,
Row( children: [
mainAxisAlignment: Row(
MainAxisAlignment.start, children: [
children: [ Texts('Condition: ',
AppText( fontSize: 12,),
TranslationBase.of(context).createdBy, Texts(
fontWeight: FontWeight.bold, widget.patientProgressNote.mName??'',fontWeight: FontWeight.w600),
fontSize: 16, ],
),
AppText(
widget.patientProgressNote.createdByName??"",
fontSize: 10,
color: Colors.grey,
),
],
),
if(widget.patientProgressNote.editedByName !=null)
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).editedBy,
fontWeight: FontWeight.bold,
fontSize: 16,
),
AppText(
widget.patientProgressNote.editedByName??"",
fontSize: 10,
color: Colors.grey,
),
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
SizedBox(
height: 6,
),
Padding(
padding: const EdgeInsets.all(0.0),
child: Container(
width: MediaQuery.of(context)
.size
.width *
0.6,
child: Texts(
progressNoteController.text,
fontSize: 10,
color: Colors.grey,
),
), ),
Texts(
widget.patientProgressNote.createdOn !=null?DateUtils.getHour(DateTime.parse(widget.patientProgressNote.createdOn)):DateUtils.getHour(DateTime.now()),
fontWeight: FontWeight.w600,
fontSize: 14,
)
],
),
SizedBox(height: 8,
), ),
], Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
Expanded(
child: Texts(
progressNoteController.text,
fontSize: 10,
),
), ),
], InkWell(
), onTap: (){
) setState(() {
isAddProgress = true;
widget.changePageViewIndex(3,isChangeState:false);
});
},
child: Icon(DoctorApp.edit,size: 18,))
],
),
], ],
) ),
]), )
isExpand: isProgressNoteExpand, ],
), ),
], ],
), ),
),
],
), ),
), ),
), ),
), ),
bottomSheet: Container( bottomSheet: Container(
width: double.maxFinite, width: double.maxFinite,
height: 70, height: 90,
child: Container( child: Padding(
margin: EdgeInsets.all(6), padding: const EdgeInsets.all(8.0),
child: Column( child: Container(
children: [ margin: EdgeInsets.all(6),
child: Column(
Row( children: [
children: [ Row(
Expanded( children: [
child: AppButton( Expanded(
title: 'Previous', child: AppButton(
color: Colors.white38, title: 'Previous',
fontColor: Colors.black, color: Colors.grey[300],
fontWeight: FontWeight.w700, fontColor: Colors.black,
loading: model.state == ViewState.BusyLocal, fontWeight: FontWeight.w400,
onPressed: () async { loading: model.state == ViewState.BusyLocal,
setState(() { onPressed: () async {
widget.changePageViewIndex(2); setState(() {
}); widget.changePageViewIndex(2);
}, });
},
),
), ),
), SizedBox(width: 5,),
SizedBox(width: 5,), Expanded(
Expanded( child: AppButton(
child: AppButton( title: isAddProgress? TranslationBase.of(context).next: "Finish",
title: TranslationBase.of(context).next, fontWeight: FontWeight.w400,
fontWeight: FontWeight.w700, loading: model.state == ViewState.BusyLocal,
loading: model.state == ViewState.BusyLocal, color: Colors.red[700],
disabled: progressNoteController.text.isEmpty, disabled: progressNoteController.text.isEmpty,
onPressed: () async { onPressed: () async {
if(widget.patientProgressNote.planNote.isEmpty) { if(isAddProgress) {
Map profile = await sharedPref.getObj(DOCTOR_PROFILE); Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
setState(() { setState(() {
widget.patientProgressNote.createdByName = widget.patientProgressNote.createdByName ?? doctorProfile.doctorName; widget.patientProgressNote.createdByName = widget.patientProgressNote.createdByName ?? doctorProfile.doctorName;
widget.patientProgressNote.editedByName = doctorProfile.doctorName; widget.patientProgressNote.editedByName = doctorProfile.doctorName;
widget.patientProgressNote.createdOn = DateTime.now().toString(); widget.patientProgressNote.createdOn = DateTime.now().toString();
widget.patientProgressNote.planNote = progressNoteController.text; widget.patientProgressNote.planNote = progressNoteController.text;
}); isAddProgress = !isAddProgress;
});
} else submitPlan(model);
submitPlan(model);
}, } else{
Navigator.of(context).pop();
}
},
),
), ),
), ],
], ),
),
], ],
),
), ),
), ),
), ),
@ -361,7 +331,7 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error); helpers.showErrorToast(model.error);
} else { } else {
Navigator.of(context).pop(); widget.changePageViewIndex(4,isChangeState:false);
} }
} else { } else {
helpers.showErrorToast(TranslationBase.of(context).progressNoteErrorMsg); helpers.showErrorToast(TranslationBase.of(context).progressNoteErrorMsg);

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/doctor_replay_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/doctor_replay_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteResModel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart';
@ -6,11 +7,13 @@ import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_history.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_history.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/steps_widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/steps_widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_assessment_page.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_assessment_page.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_plan_page.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_plan_page.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:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -38,9 +41,13 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
GetPatientProgressNoteResModel patientProgressNote = GetPatientProgressNoteResModel patientProgressNote =
GetPatientProgressNoteResModel(); GetPatientProgressNoteResModel();
changePageViewIndex(pageIndex) { changePageViewIndex(pageIndex,{isChangeState = true}) {
if (pageIndex != _currentIndex) changeLoadingState(true); if (pageIndex != _currentIndex && isChangeState)
changeLoadingState(true);
_controller.jumpToPage(pageIndex); _controller.jumpToPage(pageIndex);
setState(() {
_currentIndex = pageIndex;
});
} }
bool _isLoading = true; bool _isLoading = true;
@ -79,6 +86,7 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
color: Theme.of(context).scaffoldBackgroundColor), color: Theme.of(context).scaffoldBackgroundColor),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
// PatientPageHeaderWidget(patient), // PatientPageHeaderWidget(patient),
PatientProfileHeaderNewDesign(patient, '7', '7', height: MediaQuery.of(context).size.height * 0.28,), PatientProfileHeaderNewDesign(patient, '7', '7', height: MediaQuery.of(context).size.height * 0.28,),
@ -87,20 +95,10 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
height: 1, height: 1,
color: Color(0xffCCCCCC), color: Color(0xffCCCCCC),
), ),
Container( Container(
color: Theme.of(context).scaffoldBackgroundColor, color: Theme.of(context).scaffoldBackgroundColor,
margin: EdgeInsets.only( height: MediaQuery.of(context).size.height * 0.73,
left: MediaQuery.of(context).size.width * 0.05,
right: MediaQuery.of(context).size.width * 0.05),
child: StepsWidget(
index: _currentIndex,
changeCurrentTab: changePageViewIndex,
height: MediaQuery.of(context).size.height * 0.20,
),
),
Container(
color: Theme.of(context).scaffoldBackgroundColor,
height: MediaQuery.of(context).size.height * 0.50,
child: PageView( child: PageView(
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
controller: _controller, controller: _controller,
@ -113,22 +111,26 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
children: <Widget>[ children: <Widget>[
UpdateSubjectivePage( UpdateSubjectivePage(
changePageViewIndex: changePageViewIndex, changePageViewIndex: changePageViewIndex,
currentIndex: _currentIndex,
myAllergiesList: myAllergiesList, myAllergiesList: myAllergiesList,
myHistoryList: myHistoryList, myHistoryList: myHistoryList,
patientInfo: patient, patientInfo: patient,
changeLoadingState: changeLoadingState), changeLoadingState: changeLoadingState),
UpdateObjectivePage( UpdateObjectivePage(
changePageViewIndex: changePageViewIndex, changePageViewIndex: changePageViewIndex,
currentIndex: _currentIndex,
mySelectedExamination: mySelectedExamination, mySelectedExamination: mySelectedExamination,
patientInfo: patient, patientInfo: patient,
changeLoadingState: changeLoadingState), changeLoadingState: changeLoadingState),
UpdateAssessmentPage( UpdateAssessmentPage(
changePageViewIndex: changePageViewIndex, changePageViewIndex: changePageViewIndex,
currentIndex: _currentIndex,
mySelectedAssessmentList: mySelectedAssessment, mySelectedAssessmentList: mySelectedAssessment,
patientInfo: patient, patientInfo: patient,
changeLoadingState: changeLoadingState), changeLoadingState: changeLoadingState),
UpdatePlanPage( UpdatePlanPage(
changePageViewIndex: changePageViewIndex, changePageViewIndex: changePageViewIndex,
currentIndex: _currentIndex,
patientInfo: patient, patientInfo: patient,
patientProgressNote: patientProgressNote, patientProgressNote: patientProgressNote,
changeLoadingState: changeLoadingState) changeLoadingState: changeLoadingState)

@ -1,4 +1,5 @@
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'app_texts_widget.dart'; import 'app_texts_widget.dart';
@ -19,6 +20,7 @@ class AppTextFieldCustom extends StatefulWidget {
final int maxLines; final int maxLines;
final List<TextInputFormatter> inputFormatters; final List<TextInputFormatter> inputFormatters;
final Function(String) onChanged; final Function(String) onChanged;
final String validationError;
AppTextFieldCustom({ AppTextFieldCustom({
this.height = 0, this.height = 0,
@ -36,6 +38,7 @@ class AppTextFieldCustom extends StatefulWidget {
this.maxLines = 1, this.maxLines = 1,
this.inputFormatters, this.inputFormatters,
this.onChanged, this.onChanged,
this.validationError,
}); });
@override @override
@ -45,80 +48,115 @@ class AppTextFieldCustom extends StatefulWidget {
class _AppTextFieldCustomState extends State<AppTextFieldCustom> { class _AppTextFieldCustomState extends State<AppTextFieldCustom> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Column(
height: widget.height != 0 ? widget.height : null, children: [
decoration: widget.hasBorder Container(
? containerBorderDecoration(Color(0Xffffffff), Color(0xFFEFEFEF)) height: widget.height != 0 ? widget.height + 8 : null,
: null, decoration: widget.hasBorder
padding: EdgeInsets.only(top: 4.0, bottom: 4.0, left: 8.0, right: 8.0), ? containerBorderDecoration(
child: InkWell( Color(0Xffffffff),
onTap: widget.onClick ?? null, widget.validationError == null
child: Row( ? Color(0xFFEFEFEF)
crossAxisAlignment: CrossAxisAlignment.center, : Colors.red.shade700)
children: [ : null,
Expanded( padding:
child: Column( EdgeInsets.only(top: 4.0, bottom: 4.0, left: 8.0, right: 8.0),
crossAxisAlignment: CrossAxisAlignment.start, child: InkWell(
mainAxisAlignment: MainAxisAlignment.center, onTap: widget.onClick ?? null,
children: [ child: Row(
if ((widget.controller != null && crossAxisAlignment: CrossAxisAlignment.center,
widget.controller.text != "") || children: [
widget.dropDownText != null) Expanded(
AppText( child: Container(
widget.hintText, padding: widget.dropDownText == null
fontFamily: 'Poppins', ? EdgeInsets.symmetric(vertical: 0)
fontSize: SizeConfig.textMultiplier * 1.4, : EdgeInsets.symmetric(vertical: 8),
fontWeight: FontWeight.w600, child: Column(
), crossAxisAlignment: CrossAxisAlignment.start,
widget.dropDownText == null mainAxisAlignment: MainAxisAlignment.center,
? TextField( children: [
textAlign: TextAlign.left, if ((widget.controller != null &&
decoration: textFieldSelectorDecoration( widget.controller.text != "") ||
widget.hintText, null, true), widget.dropDownText != null)
style: TextStyle( AppText(
fontSize: SizeConfig.textMultiplier * 1.7, widget.hintText,
fontFamily: 'Poppins', fontFamily: 'Poppins',
color: Colors.grey.shade800, fontSize: SizeConfig.textMultiplier * 1.4,
fontWeight: FontWeight.w700,
), ),
controller: widget.controller, widget.dropDownText == null
keyboardType: widget.inputType, ? TextField(
enabled: widget.enabled, textAlign: TextAlign.left,
minLines: widget.minLines, decoration: textFieldSelectorDecoration(
maxLines: widget.maxLines, widget.hintText, null, true),
inputFormatters: widget.inputFormatters != null style: TextStyle(
? widget.inputFormatters fontSize: SizeConfig.textMultiplier * 1.7,
: [], fontFamily: 'Poppins',
onChanged: (value) { color: Colors.grey.shade800,
if (widget.onChanged != null){ ),
widget.onChanged(value); controller: widget.controller,
setState(() { keyboardType: widget.inputType,
enabled: widget.enabled,
}); minLines: widget.minLines,
} maxLines: widget.maxLines,
}, inputFormatters: widget.inputFormatters != null
) ? widget.inputFormatters
: AppText( : [],
widget.dropDownText, onChanged: (value) {
fontFamily: 'Poppins', if (widget.onChanged != null) {
color: Colors.grey.shade800, widget.onChanged(value);
fontSize: SizeConfig.textMultiplier * 1.7, setState(() {});
), }
], },
), )
: AppText(
widget.dropDownText,
fontFamily: 'Poppins',
color: Colors.grey.shade800,
fontSize: SizeConfig.textMultiplier * 1.7,
),
],
),
),
),
widget.isDropDown
? widget.suffixIcon != null
? widget.suffixIcon
: Icon(
Icons.keyboard_arrow_down,
color: widget.dropDownColor != null
? widget.dropDownColor
: Colors.black,
)
: Container(),
],
), ),
widget.isDropDown ),
? widget.suffixIcon != null
? widget.suffixIcon
: Icon(
Icons.keyboard_arrow_down,
color: widget.dropDownColor != null
? widget.dropDownColor
: Colors.black,
)
: Container(),
],
), ),
), if (widget.validationError != null)
Container(
margin: EdgeInsets.only(top: 8, right: 8, left: 8, bottom: 8),
child: Row(
children: [
Icon(
DoctorApp.warning,
size: 20,
color: Colors.red.shade700,
),
SizedBox(
width: 12,
),
AppText(
widget.validationError,
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.7,
color: Colors.red.shade700,
fontWeight: FontWeight.w700,
),
],
),
),
],
); );
} }

@ -45,18 +45,36 @@ class _AppDrawerState extends State<AppDrawer> {
flex: 4, flex: 4,
child: ListView(padding: EdgeInsets.zero, children: <Widget>[ child: ListView(padding: EdgeInsets.zero, children: <Widget>[
Container( Container(
margin: EdgeInsets.symmetric(horizontal: 20), margin: EdgeInsets.symmetric(horizontal: 15),
// height: SizeConfig.heightMultiplier * 50, // height: SizeConfig.heightMultiplier * 50,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Row(
child: Image.asset( children: [
'assets/images/dr_app_logo.png', Container(
), child: Image.asset(
margin: EdgeInsets.only(top: 10, bottom: 10), 'assets/images/dr_app_logo.png',
),
margin: EdgeInsets.only(top: 10, bottom: 10),
),
Container(
child: InkWell(
onTap: (){
Navigator.pop(context);
},
child: Icon(
DoctorApp.close_1,
size: 20,
),
),
margin: EdgeInsets.only(top: 20, bottom: 10),
)
],
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
), ),
SizedBox(height: 10), SizedBox(height: 5),
if (authProvider.doctorProfile != null) if (authProvider.doctorProfile != null)
InkWell( InkWell(
onTap: () { onTap: () {
@ -80,7 +98,7 @@ class _AppDrawerState extends State<AppDrawer> {
), ),
), ),
Padding( Padding(
padding: EdgeInsets.only(top: 5), padding: EdgeInsets.only(top: 0),
child: AppText( child: AppText(
authProvider.doctorProfile?.clinicDescription, authProvider.doctorProfile?.clinicDescription,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -91,14 +109,11 @@ class _AppDrawerState extends State<AppDrawer> {
], ],
), ),
), ),
SizedBox(height: 10), SizedBox(height: 40),
InkWell( InkWell(
child: DrawerItem( child: DrawerItem(
TranslationBase.of(context).rescheduleLeaves, TranslationBase.of(context).applyOrRescheduleLeave,
// " or " + icon: DoctorApp.reschedule__1,
// TranslationBase.of(context).leaves,
DoctorApp.reschedule__1,
// subTitle: , // subTitle: ,
), ),
onTap: () { onTap: () {
@ -111,19 +126,17 @@ class _AppDrawerState extends State<AppDrawer> {
)); ));
}, },
), ),
SizedBox(height: 15),
SizedBox(height: 10),
InkWell( InkWell(
child: DrawerItem( child: DrawerItem(
'My QR Code', TranslationBase
// " or " + .of(context)
// TranslationBase.of(context).leaves, .myQRCode,
icon: DoctorApp.qr_code_3,
DoctorApp.qr_code_3,
// subTitle: , // subTitle: ,
), ),
), ),
SizedBox(height: 15),
InkWell( InkWell(
child: Container( child: Container(
height: 80, height: 80,
@ -138,20 +151,25 @@ class _AppDrawerState extends State<AppDrawer> {
), ),
), ),
SizedBox( SizedBox(
height: 40, height: MediaQuery.of(context).size.height * 0.09,
), ),
Container( Container(
margin: EdgeInsets.symmetric(horizontal: 20), margin: EdgeInsets.symmetric(horizontal: 20),
child: Column( child: Column(
children: [ children: [
InkWell( InkWell(
child: DrawerItem( child: DrawerItem(
projectsProvider.isArabic projectsProvider.isArabic
? TranslationBase.of(context).lanEnglish ? TranslationBase
: TranslationBase.of(context).lanArabic, .of(context)
DoctorApp.qr_code), .lanEnglish
: TranslationBase
.of(context)
.lanArabic,
// icon: DoctorApp.qr_code,
assetLink: projectsProvider.isArabic
? 'assets/images/usa-flag.png'
: 'assets/images/saudi-arabia-flag.png',),
onTap: () { onTap: () {
if (projectsProvider.isArabic) if (projectsProvider.isArabic)
projectsProvider.changeLanguage('en'); projectsProvider.changeLanguage('en');
@ -159,9 +177,12 @@ class _AppDrawerState extends State<AppDrawer> {
projectsProvider.changeLanguage('ar'); projectsProvider.changeLanguage('ar');
}, },
), ),
SizedBox(height: 10),
InkWell( InkWell(
child: DrawerItem( child: DrawerItem(
TranslationBase.of(context).logout, DoctorApp.logout_1), TranslationBase
.of(context)
.logout, icon: DoctorApp.logout_1,),
onTap: () async { onTap: () async {
Navigator.pop(context); Navigator.pop(context);
await helpers.logout(); await helpers.logout();
@ -193,13 +214,13 @@ class _AppDrawerState extends State<AppDrawer> {
style: TextStyle( style: TextStyle(
color: Color(0xFF989898), color: Color(0xFF989898),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2, fontSize: 14,
fontFamily: 'Poppins',), fontFamily: 'Poppins',),
children: <TextSpan>[ children: <TextSpan>[
TextSpan(text: ' Cloud Solutions', TextSpan(text: ' Cloud Solutions',
style: TextStyle( style: TextStyle(
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
fontSize: SizeConfig.textMultiplier * 2, fontSize: 15,
fontFamily: 'Poppins',), fontFamily: 'Poppins',),
) )
] ]

@ -37,23 +37,23 @@ class _BottomNavBarState extends State<BottomNavBar> {
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [ children: [
BottomNavigationItem( BottomNavigationItem(
icon: DoctorApp.home_icon_active, icon: DoctorApp.home_1,
activeIcon: DoctorApp.home_active, activeIcon: DoctorApp.home_active_1,
changeIndex: _changeIndex, changeIndex: _changeIndex,
index: _index, index: _index,
currentIndex: 0, currentIndex: 0,
name: TranslationBase.of(context).home, name: TranslationBase.of(context).home,
), ),
BottomNavigationItem( BottomNavigationItem(
icon: DoctorApp.schedule_icon, icon: DoctorApp.schedule_1,
activeIcon: DoctorApp.scdedule_icon_active_1, activeIcon: DoctorApp.schedule_active_1,
changeIndex: _changeIndex, changeIndex: _changeIndex,
index: _index, index: _index,
currentIndex: 1, currentIndex: 1,
name: TranslationBase.of(context).mySchedule, name: TranslationBase.of(context).mySchedule,
), ),
BottomNavigationItem( BottomNavigationItem(
icon: DoctorApp.qr_code, icon: DoctorApp.qr_reader,
activeIcon: DoctorApp.qr_reader_active_1, activeIcon: DoctorApp.qr_reader_active_1,
changeIndex: _changeIndex, changeIndex: _changeIndex,
index: _index, index: _index,
@ -61,7 +61,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
name: TranslationBase.of(context).qr, name: TranslationBase.of(context).qr,
), ),
BottomNavigationItem( BottomNavigationItem(
icon: DoctorApp.message_icon, icon: DoctorApp.dr_reply_1,
activeIcon: DoctorApp.dr_reply_active_1, activeIcon: DoctorApp.dr_reply_active_1,
changeIndex: _changeIndex, changeIndex: _changeIndex,
index: _index, index: _index,

@ -34,19 +34,10 @@ class BottomNavigationItem extends StatelessWidget {
children: <Widget>[ children: <Widget>[
SizedBox(height: 15,), SizedBox(height: 15,),
Container( Container(
// decoration: BoxDecoration(boxShadow: [
// BoxShadow(
// color: currentIndex == index
// ? Color.fromRGBO(78, 62, 253, 0.4)
// : Color.fromRGBO(78, 62, 253, 0),
// blurRadius: 9.0,
// spreadRadius: -4.0,
// offset: Offset(0.0, 2.0))
// ]),
child: Icon(currentIndex == index ? activeIcon : icon, child: Icon(currentIndex == index ? activeIcon : icon,
/*color: currentIndex == index color: currentIndex == index
? Theme.of(context).primaryColor ? Color(0xFF333C45)
: Theme.of(context).dividerColor,*/ : Theme.of(context).dividerColor,
size: 22.0), size: 22.0),
), ),
SizedBox(height: 5,), SizedBox(height: 5,),

@ -82,7 +82,7 @@ class DoctorCard extends StatelessWidget {
], ],
), ),
Row( Row(
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Container( Container(
child: LargeAvatar( child: LargeAvatar(
@ -93,74 +93,81 @@ class DoctorCard extends StatelessWidget {
height: 55, height: 55,
), ),
Expanded( Expanded(
flex: 4, child: Row(
child: Container( crossAxisAlignment: CrossAxisAlignment.end,
margin: EdgeInsets.all(10), children: [
child: Column( Expanded(
crossAxisAlignment: CrossAxisAlignment.start, child: Container(
children: <Widget>[ margin: EdgeInsets.all(10),
if (orderNo != null && !isPrescriptions) child: Column(
Row( crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(
'order No:',
color: Colors.grey[500],
fontSize: 14,
),
Texts(
orderNo ?? '',
fontSize: 14,
)
],
),
if (invoiceNO != null && !isPrescriptions)
Row(
children: <Widget>[ children: <Widget>[
Texts( if (orderNo != null && !isPrescriptions)
'Invoice:', Row(
fontSize: 14, children: <Widget>[
color: Colors.grey[500], Texts(
'order No:',
color: Colors.grey[500],
fontSize: 14,
),
Texts(
orderNo ?? '',
fontSize: 14,
)
],
),
if (invoiceNO != null && !isPrescriptions)
Row(
children: <Widget>[
Texts(
'Invoice:',
fontSize: 14,
color: Colors.grey[500],
),
Texts(
invoiceNO,
fontSize: 14,
)
],
),
if(clinic!=null)
Row(
children: <Widget>[
Texts(
'Clinic: ',
color: Colors.grey[500],
fontSize: 14,
),
Texts(
clinic,
fontSize: 14,
)
],
), ),
Texts( if(branch!=null)
invoiceNO, Row(
fontSize: 14, children: <Widget>[
Texts(
'Branch: ',
fontSize: 14,
color: Colors.grey[500],
),
Texts(
branch,
fontSize: 14,
)
],
) )
], ]),
), ),
if(isPrescriptions) ),
Row( Icon(
children: <Widget>[ EvaIcons.eye,
Texts( )
'Clinic: ', ],
color: Colors.grey[500],
fontSize: 14,
),
Texts(
clinic,
fontSize: 14,
)
],
),
if(branch!=null)
Row(
children: <Widget>[
Texts(
'Branch: ',
fontSize: 14,
color: Colors.grey[500],
),
Texts(
branch,
fontSize: 14,
)
],
)
]),
), ),
), ),
Icon(
EvaIcons.eye,
)
], ],
), ),
], ],

@ -15,8 +15,9 @@ class DrawerItem extends StatefulWidget {
final String subTitle; final String subTitle;
final IconData icon; final IconData icon;
final Color color; final Color color;
final String assetLink;
DrawerItem(this.title, this.icon, {this.color, this.subTitle = ''}); DrawerItem(this.title, {this.icon, this.color, this.subTitle = '', this.assetLink});
@override @override
_DrawerItemState createState() => _DrawerItemState(); _DrawerItemState createState() => _DrawerItemState();
@ -26,10 +27,17 @@ class _DrawerItemState extends State<DrawerItem> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
margin: EdgeInsets.only(top: 5, bottom: 5, left: 0, right: 0), margin: EdgeInsets.only(top: 0, bottom: 5, left: 0, right: 0),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
if(widget.assetLink!=null)
Container(
height: 20,
width: 20,
child: Image.asset(widget.assetLink),
),
if(widget.assetLink==null)
Icon( Icon(
widget.icon, widget.icon,
color: widget.color ?? Colors.black87, color: widget.color ?? Colors.black87,
@ -49,16 +57,9 @@ class _DrawerItemState extends State<DrawerItem> {
color:widget.color ??Color(0xFF2E303A), color:widget.color ??Color(0xFF2E303A),
fontSize: 14, fontSize: 14,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.bold, fontWeight: FontWeight.w600,
), ),
), ),
AppText(
widget.subTitle,
visibility: !widget.subTitle.isNullOrEmpty(),
color: widget.color ?? Colors.black,
marginLeft: 5,
fontSize: SizeConfig.textMultiplier * 2.5,
),
], ],
), ),
), ),

@ -18,6 +18,12 @@ class HeaderBodyExpandableNotifier extends StatefulWidget {
class _HeaderBodyExpandableNotifierState class _HeaderBodyExpandableNotifierState
extends State<HeaderBodyExpandableNotifier> { extends State<HeaderBodyExpandableNotifier> {
@override
void initState() {
super.initState();
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
setState(() { setState(() {
@ -26,7 +32,6 @@ class _HeaderBodyExpandableNotifierState
widget.controller.expanded = true; widget.controller.expanded = true;
} }
}); });
return ExpandableNotifier( return ExpandableNotifier(
child: Padding( child: Padding(
padding: const EdgeInsets.only(left: 0, right: 0), padding: const EdgeInsets.only(left: 0, right: 0),

@ -137,14 +137,29 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState
items[index]), items[index]),
activeColor: Colors.red[800], activeColor: Colors.red[800],
onChanged: (bool newValue) { onChanged: (bool newValue) {
// setState(() { setState(() {
// if (widget if (widget
// .isServiceSelected(items[index])) { .isServiceSelected(
// widget.removeHistory(items[index]); items[index])) {
// } else { widget.removeAllergy(
// widget.addHistory(items[index]); items[index]);
// } } else {
// }); // TODO add Allergy
MySelectedAllergy
mySelectedAllergy =
new MySelectedAllergy(
selectedAllergy:
items[index],
selectedAllergySeverity:
_selectedAllergySeverity,
remark: null,
isChecked: true,
isExpanded: true);
widget.addAllergy(
mySelectedAllergy);
}
});
}), }),
InkWell( InkWell(
onTap: () { onTap: () {

@ -1,5 +1,6 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -32,8 +33,13 @@ class NetworkBaseView extends StatelessWidget {
break; break;
case ViewState.Error: case ViewState.Error:
return Center( return Center(
child: DrAppEmbeddedError( child: Column(
error: baseViewModel.error, children: [
SizedBox(height: 100,),
Image.asset('assets/images/no-data.png',height: 250),
Texts(baseViewModel.error??'')
],
), ),
); );
break; break;

Loading…
Cancel
Save