From 0578bb5ed307ecdebdff3560451457d76334448e Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Tue, 13 Apr 2021 16:51:14 +0300 Subject: [PATCH] insurance approval & medical file design fix --- lib/screens/procedures/ProcedureCard.dart | 2 +- ..._header_with_appointment_card_app_bar.dart | 251 +++++++----------- 2 files changed, 102 insertions(+), 151 deletions(-) diff --git a/lib/screens/procedures/ProcedureCard.dart b/lib/screens/procedures/ProcedureCard.dart index 43be9b71..e9cdd316 100644 --- a/lib/screens/procedures/ProcedureCard.dart +++ b/lib/screens/procedures/ProcedureCard.dart @@ -148,7 +148,7 @@ class ProcedureCard extends StatelessWidget { color: Colors.grey, ), Texts( - entityList.clinicDescription??"", + entityList.clinicDescription ?? "", bold: true, fontSize: 12, ), diff --git a/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart b/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart index e8bc3513..02f859fa 100644 --- a/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart +++ b/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart @@ -15,8 +15,8 @@ import 'package:provider/provider.dart'; import 'large_avatar.dart'; -class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with PreferredSizeWidget { - +class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget + with PreferredSizeWidget { final PatiantInformtion patient; final String patientType; final String arrivalType; @@ -59,8 +59,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre } 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( color: Colors.white, ), @@ -81,12 +80,12 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre ), Expanded( child: AppText( - patient.firstName != null ? - (Helpers.capitalize(patient.firstName) + - " " + - Helpers.capitalize( - patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName), - fontSize: SizeConfig.textMultiplier *2.2, + patient.firstName != null + ? (Helpers.capitalize(patient.firstName) + + " " + + Helpers.capitalize(patient.lastName)) + : Helpers.capitalize(patient.patientDetails.fullName), + fontSize: SizeConfig.textMultiplier * 2.2, fontWeight: FontWeight.bold, backGroundcolor: Colors.white, fontFamily: 'Poppins', @@ -94,13 +93,13 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre ), gender == 1 ? Icon( - DoctorApp.male_2, - color: Colors.blue, - ) + DoctorApp.male_2, + color: Colors.blue, + ) : Icon( - DoctorApp.female_1, - color: Colors.pink, - ), + DoctorApp.female_1, + color: Colors.pink, + ), ]), ), Row(children: [ @@ -122,12 +121,10 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre ), Expanded( child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ - SERVICES_PATIANT2[ - int.parse(patientType)] == - "patientArrivalList" + SERVICES_PATIANT2[int.parse(patientType)] == + "patientArrivalList" ? Container( child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -165,57 +162,43 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre ], )) : SizedBox(), - if (SERVICES_PATIANT2[ - int.parse(patientType)] == + if (SERVICES_PATIANT2[int.parse(patientType)] == "List_MyOutPatient") Container( child: Row( - mainAxisAlignment: - MainAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, children: [ AppText( - TranslationBase.of(context) - .appointmentDate + + TranslationBase.of(context).appointmentDate + " : ", fontSize: 14, ), patient.startTime != null ? Container( - height: 15, - width: 60, - decoration: - BoxDecoration( - borderRadius: - BorderRadius - .circular( - 25), - color: HexColor( - "#20A169"), - ), - child: AppText( - patient.startTime, - color: Colors.white, - fontSize: 1.5 * - SizeConfig - .textMultiplier, - textAlign: TextAlign - .center, - fontWeight: - FontWeight.bold, - ), - ) + height: 15, + width: 60, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(25), + color: HexColor("#20A169"), + ), + child: AppText( + patient.startTime, + color: Colors.white, + fontSize: 1.5 * SizeConfig.textMultiplier, + textAlign: TextAlign.center, + fontWeight: FontWeight.bold, + ), + ) : SizedBox(), SizedBox( width: 3.5, ), Container( child: AppText( - convertDateFormat2(patient.appointmentDate.toString()?? ''), - fontSize: 1.5 * - SizeConfig - .textMultiplier, - fontWeight: - FontWeight.bold, + convertDateFormat2( + patient.appointmentDate.toString() ?? ''), + fontSize: 1.5 * SizeConfig.textMultiplier, + fontWeight: FontWeight.bold, ), ), SizedBox( @@ -228,34 +211,23 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre ), ), Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ RichText( text: TextSpan( style: TextStyle( - fontSize: 1.6 * - SizeConfig - .textMultiplier, + fontSize: 1.6 * SizeConfig.textMultiplier, color: Colors.black), children: [ new TextSpan( - text: - TranslationBase.of( - context) - .fileNumber, + text: TranslationBase.of(context).fileNumber, style: TextStyle( - fontSize: 12, - fontFamily: - 'Poppins')), + fontSize: 12, fontFamily: 'Poppins')), new TextSpan( - text: patient.patientId - .toString(), + text: patient.patientId.toString(), style: TextStyle( - fontWeight: - FontWeight.w700, - fontFamily: - 'Poppins', + fontWeight: FontWeight.w700, + fontFamily: 'Poppins', fontSize: 14)), ], ), @@ -263,32 +235,23 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre Row( children: [ AppText( - patient.nationalityName ?? - patient.nationality, + patient.nationalityName ?? patient.nationality, fontWeight: FontWeight.bold, fontSize: 12, ), patient.nationality != null ? ClipRRect( - borderRadius: - BorderRadius - .circular( - 20.0), - child: Image.network( - patient.nationalityFlagURL, - height: 25, - width: 30, - errorBuilder: - (BuildContext - context, - Object - exception, - StackTrace - stackTrace) { - return Text( - 'No Image'); - }, - )) + borderRadius: BorderRadius.circular(20.0), + child: Image.network( + patient.nationalityFlagURL, + height: 25, + width: 30, + errorBuilder: (BuildContext context, + Object exception, + StackTrace stackTrace) { + return Text('No Image'); + }, + )) : SizedBox() ], ) @@ -298,26 +261,19 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre child: RichText( text: new TextSpan( style: new TextStyle( - fontSize: 1.6 * - SizeConfig.textMultiplier, + fontSize: 1.6 * SizeConfig.textMultiplier, color: Colors.black, fontFamily: 'Poppins', ), children: [ new TextSpan( - text: TranslationBase.of( - context) - .age + - " : ", - style: TextStyle( - fontSize: 14)), + text: TranslationBase.of(context).age + " : ", + style: TextStyle(fontSize: 14)), new TextSpan( 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( - fontWeight: - FontWeight.w700, - fontSize: 14)), + fontWeight: FontWeight.w700, fontSize: 14)), ], ), ), @@ -332,14 +288,16 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre Container( width: 30, height: 30, - margin: EdgeInsets.only(left: projectViewModel.isArabic?10:85, right: projectViewModel.isArabic?85:10,top: 5), + margin: EdgeInsets.only( + left: projectViewModel.isArabic ? 10 : 85, + right: projectViewModel.isArabic ? 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), - ) - ), + shape: BoxShape.rectangle, + border: Border( + bottom: BorderSide(color: Colors.grey[400], width: 2.5), + left: BorderSide(color: Colors.grey[400], width: 2.5), + )), ), Expanded( child: Container( @@ -372,31 +330,22 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre if (orderNo != null && !isPrescriptions) Row( children: [ - Texts( - 'Order No: ', - color: Colors.grey[800], - fontSize: 12 - ), - Texts( - orderNo ?? '',fontSize: 12 - ) + Texts('Order No: ', + color: Colors.grey[800], + fontSize: 12), + Texts(orderNo ?? '', fontSize: 12) ], ), if (invoiceNO != null && !isPrescriptions) Row( children: [ - Texts( - 'Invoice: ', - color: Colors.grey[800], - fontSize: 12 - ), - Texts( - invoiceNO, - fontSize: 12 - ) + Texts('Invoice: ', + color: Colors.grey[800], + fontSize: 12), + Texts(invoiceNO, fontSize: 12) ], ), - if ( branch != null) + if (branch != null) Row( children: [ Texts('Branch: ', @@ -406,15 +355,15 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre ], ), if (isPrescriptions) - if(clinic!=null) - Row( - children: [ - Texts('Clinic: ', - color: Colors.grey[800], - fontSize: 12), - Texts(clinic ?? '', fontSize: 12) - ], - ), + if (clinic != null) + Row( + children: [ + Texts('Clinic: ', + color: Colors.grey[800], + fontSize: 12), + Texts(clinic ?? '', fontSize: 12) + ], + ), if (isMedicalFile && episode != null) Row( children: [ @@ -437,20 +386,22 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre children: [ Expanded( child: Texts( - !isPrescriptions? 'Result Date: ': 'Prescriptions Date ', + !isPrescriptions + ? 'Result Date: ' + : 'Prescriptions Date ', color: Colors.grey[800], fontSize: 12, ), ), Texts( - '${DateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}',fontSize: 14, + '${DateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}', + fontSize: 14, ) ], ) ]), ), ), - ], ), ), @@ -464,7 +415,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre } convertDateFormat2(String str) { - String newDate =""; + String newDate = ""; const start = "/Date("; const end = "+0300)"; @@ -475,10 +426,10 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre var date = new DateTime.fromMillisecondsSinceEpoch( int.parse(str.substring(startIndex + start.length, endIndex))); newDate = date.year.toString() + - "/" + - date.month.toString().padLeft(2, '0') + - "/" + - date.day.toString().padLeft(2, '0'); + "/" + + date.month.toString().padLeft(2, '0') + + "/" + + date.day.toString().padLeft(2, '0'); } return newDate.toString(); @@ -502,5 +453,5 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre } @override - Size get preferredSize => Size(double.maxFinite,290); + Size get preferredSize => Size(double.maxFinite, 290); }